Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6979 Discussions

oneMKL fft convolution routine not work for large array

Kohn-Sham
Novice
343 Views

Hello.

 

I'm playing with vsl?ConvExec1D, and have problem for array size of over 2^25, throwing -2800 error.

I found it operate for array of size below 2^25. (but not confirmed the data is well calculated value yet.)

 

I checked for setvars for ILP64,MKL_ILP64 flag and libraries, and this flag works for DftiComputeForward routine with 2^32 size array.

I tried this code in Ubuntu environment but not work also.

 

My code is

 

#include <iostream>
#include <cstdio>
#include <cmath>
#include "mkl.h"


int main(){
MKL_INT64 size{(MKL_INT64)pow(2,29)};
MKL_INT64 xshape{size},yshape{size};
MKL_INT64 zshape{size*2-1};
MKL_INT64 xstride=1,ystride=1,zstride=1;
MKL_INT64 i;
int status;
VSLConvTaskPtr task;

MKL_Complex16 *x{(MKL_Complex16 *)mkl_malloc(xshape*sizeof(MKL_Complex16),64)};
MKL_Complex16 *y{(MKL_Complex16 *)mkl_malloc(yshape*sizeof(MKL_Complex16),64)};
MKL_Complex16 *z{(MKL_Complex16 *)mkl_malloc(zshape*sizeof(MKL_Complex16),64)};

// generate test data
for(i=0;i<xshape;i++){
x[i].real=1;
x[i].imag=0;
}
for(i=0;i<yshape;i++){
y[i].real=0;
y[i].imag=1;
}


vslzConvNewTask1D(&task,VSL_CONV_MODE_FFT,xshape,yshape,zshape);
status=vslzConvExec1D(task,x,xstride,y,ystride,z,zstride);
std::cout<<status<<std::endl;

mkl_free(x);
mkl_free(y);
mkl_free(z);
return 0;
}

 

Thank you for reading.

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
200 Views

We confirmed the behavior which looks like some kind of limitations..... we will document this limitations into one of the future releases.

--Gennady


0 Kudos
Reply