- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi all,

I have been trying to alloacate arbitrary sized array of complex numbers using mkl_malloc and MKL_Complex16 or 8. However the regular mkl_malloc syntax (used say for array of double values) seems to produce segmentation_fault. On the other hand if mkl_malloc is changed to regular malloc everything passes but MKL_FFT functions don't return correct result. Here is the line I try to use:

struct _MKL_Complex16 * x = (struct _MKL_Complex16*) mkl_malloc(128 * sizeof(struct _MKL_Complex16), 64);

Where for example I try to allocate memory for 128 complex numbers. and 64 is allignment becuase my OS is 64-bit (is this correct?)... In real pratcitce I will need to allocate much more then 128 numbers. My advisor is telling me that on cluster we will need arrays sized in gigabytes so I really need a mechanism that can allocate lots of memory on heap.

Thanks for any help,

Bogdan

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Please make sure the compiler knows the prototype of mkl_malloc function. That is, #include <mkl.h> or at least #include <mkl_service.h>. Including just mkl_types.h is not enough.

Also, a correct program may produce segmentation faults if it is linked incorrectly. Could you post your build lines?

Thanks

Dima

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Dima,

you where actually right. I forgot to put mkl.h into includes. I only put #include "mkl_dfti.h" which was not enough.

Everything works now.

Thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page