- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm facing a problem probably due to misalignment so I decided to use mkl_*alloc with Parallel Direct Sparse Solver.
The solver needs 64byte alignment that is succesfully obtained my mkl_malloc/mkl_calloc specifying the alignment parameter.
Unfortunately this is not possible with mkl_realloc: its default is a simple 16byte alignment and nothing can be done to bypass this default behaviour.
Any workaround?
Thanks,
Dario
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
void* mkl_realloc (void *ptr, size_t size); If ptr is NULL, the function works as mkl_malloc !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, maybe I didn't specify that I WANT to reallocate that vector! If I didn't want to, I'd use mkl_malloc!
If I use mkl_realloc to reallocate, the address is no more 64byte aligned!
I can create another array with mkl_malloc and then copy the data, but the memory peak (mkl_peak_mem_usage()) is incredibly higher than using mkl_realloc.
Another question... does mkl_realloc try to "expand" the current array before moving it elsewhere?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the issue. mkl_realloc doesn't remember the alignment of the "original" array but it must to keep this alignment. We will fix this into one of the next releases/updates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the problem has been fixed in MKL v.11.3.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please amend the documentation on mkl_realloc by explicitly stating that alignment is preserved. Now it says nothing about the alignment of a new buffer.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page