- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use the directive to align the array at 64 byte, and I want to check whether this works. The following code is my try. However, it is likely that the alignment directive doesn't work because the mod result isn't zero. program aligntest integer ,dimension(9) :: a integer ,dimension(9) :: b !dir$ attributes align: 64 :: a,b a=0 b=1 !use the address mod 64*8=512 print *,mod(loc(a),512) print *,mod(loc(b),512) end program aligntest
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You specified that the variables should be aligned to a multiple of 64 bytes. Why, then, do you expect alignment to 512-byte boundaries? Replace 512 by 64 throughout, or vice versa.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You specified that the variables should be aligned to a multiple of 64 bytes. Why, then, do you expect alignment to 512-byte boundaries? Replace 512 by 64 throughout, or vice versa.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page