- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just wanted to confirm that if data is not aligned to 16 byte boundaries, then on win64 and linux64, the numerics are still identical? i..e it is only 32bit platforms that are affected?
I release that I need to have 16byte boundary alignment to get the best performance; its just that aligning all our f95 dynamically allocated arrays everywhere is going to be a big job because we have to change every allocate call (unless there is some trick you play with Fortran to ensure the alignment?).
Thank you!
Tony
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The basic question of possible numerical dependence on alignment doesn't go away entirely on 64-bit OS. The only advantage is that some of the possible ways for losing 16-byte alignment are eliminated. A Fortran ALLOCATE should automatically give you 16-byte alignment, I think even on 32-bit platform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A Fortran allocate does not always align to 16bytes - on win32 or win64 - using the Fortran allocate statement, though an alternative using a pointerand calling mkl_allocis provided in the MKL documentation.
Though I am somewhat concerned that even with alignment, the results from one call to the next could be different, even if the same number of cores are used? From a numerical analysis viewpoint, this is horrible; Even if the differences are within some error bound, since it takes away reproducability. Is my understanding correct?
Thanks!
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The MKL docs do warn about reproducibility. Consistent alignments and KMP_AFFINITY ought to help when using same number of threads and same platform.

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