Community
cancel
Showing results for 
Search instead for 
Did you mean: 
109 Views

Do the MKL FFT Handler creation uses malloc??

Hi,

When we want to use MKL FFT we create a handler for that. So do this handler creation involves malloc system call? If not which method is used to allocate memory.

 

Thanks

sivaramakrishna

0 Kudos
4 Replies
Evgueni_P_Intel
Employee
109 Views

MKL calls the i_malloc callback function which has the same interface as malloc and can be overridden by the user.

109 Views

Thank you Evgueni Petrov.

what happens If more than one thread calls creation of handler of its own. do they run sequncially or parallel?.

Thanks

sivaramakrishna

Evgueni_P_Intel
Employee
109 Views

MKL does not serialize execution of DftiCreateDescriptor in different application threads.

109 Views

Hi Evgueni Petrov,

I was trying call FFT by multiple threads at a time. code snippet looks like below. I noticed  [MKLSERVICE]@lock function in vtune profiler. when i pulled the handler creation outside the loop, i did not find [MKLSERVICE]@lock in vtune profiler. This is actually making me to believe that MKL is doing some locking while allocating handler.

#pragma omp parallel num_threads(236)
for(i = 0; i < 236; i++)
{
                          .
                          .
                          .
                       some functions..
                          .
                          .

                      create handler one for each 'i'.
                      Call FFT using 'i'.

}

Thanks

sivaramakrishna

Reply