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

Unexpected DftiCommitDescriptor failures/interactions using larger inputs with MKL 11.1

krok_k_
Beginner
1,830 Views

I am getting "MKL DFTI ERROR: Inconsistent configuration parameters" errors with DftiCommitDescriptor in unexpected circumstances when doing FFT/IFFT on large inputs.

The first unexpected problem is if I use " mkl_set_num_threads( 1 ); " and then attempt large (eg 134217728 doubles) fft the DftiCommitDescriptor returns a parameter error. If i do not use mkl_set_num_threads, or use more than 1 as the input parameter, the fft succeeds with no errors.

The next unexpected circumstance in when using "dftiSetValue( ifft, DFTI_BACKWARD_SCALE,((double) 1.0)/(L));" with a large (eg 134217728 doubles) input, a parameter error is given on the DftiCommitDescriptor (typically I set L to the input size, but it fails with any value (like 12) it seems). If I do not attempt to set the DFTI_BACKWARD_SCALE parameter, the IFFT succeeds with no errors.

In both circumstance, no errors occur unless the input is somewhat large (possibly blowing a 32-bit barrier someplace).

I do not expect the size of the input to affect the descriptor in this way.

Anyone have any insights into these issues?

0 Kudos
7 Replies
Gennady_F_Intel
Moderator
1,830 Views
MKL 11.1? what exact version of MKL you use? the latest version is 11.0 upddate1. can you give us the example of that case to check the problem on our side?
0 Kudos
krok_k_
Beginner
1,830 Views
I am using MKL 11.0 update 1 on an Intel(R) Xeon(R) CPU E5-2687W 0 @ 3.10GHz Below is the test. I am seeing failures on case 1B and case 2A. Here is the output I get when I run this code: Test Case 2A Large fft, with DFTI_BACKWARD_SCALE --error status fft3=MKL DFTI ERROR: Inconsistent configuration parameters Test Case 2B Large fft, without DFTI_BACKWARD_SCALE --No error! Test Case 2C Small fft, with DFTI_BACKWARD_SCALE --No error! Test Case 1A Large fft, no call to mkl_set_num_threads --No error! Test Case 1B Large fft, WITH call to mkl_set_num_threads --error status fft2=MKL DFTI ERROR: Inconsistent configuration parameters Test Case 1C Small fft, WITH call to mkl_set_num_threads --No error! =============SOURCE================= #include stdio.h //notice html markup of this forum munges the brackets out #include mkl.h void TestIntelCase2A() { DFTI_DESCRIPTOR_HANDLE ifft; __int64 status; __int64 fftsize=134217728; printf("Test Case 2A Large fft, with DFTI_BACKWARD_SCALE\n"); status=DftiCreateDescriptor ( &ifft, DFTI_DOUBLE, DFTI_REAL, 1,fftsize); if(status) { printf("--error status fft1=%s\n",DftiErrorMessage(status)); goto error; } status = DftiSetValue( ifft, DFTI_BACKWARD_SCALE,((double) 1.0)/(fftsize)); if(status) { printf("--error status fft2=%s\n",DftiErrorMessage(status)); goto error; } status=DftiCommitDescriptor ( ifft ); if(status) { printf("--error status fft3=%s\n",DftiErrorMessage(status)); goto error; } printf("--No error!\n"); error:; } void TestIntelCase2B() { DFTI_DESCRIPTOR_HANDLE ifft; __int64 status; __int64 fftsize=134217728; printf("Test Case 2B Large fft, without DFTI_BACKWARD_SCALE\n"); status=DftiCreateDescriptor ( &ifft, DFTI_DOUBLE, DFTI_REAL, 1,fftsize); if(status) { printf("--error status fft1=%s\n",DftiErrorMessage(status)); goto error; } status=DftiCommitDescriptor ( ifft ); if(status) { printf("--error status fft3=%s\n",DftiErrorMessage(status)); goto error; } printf("--No error!\n"); error:; } void TestIntelCase2C() { DFTI_DESCRIPTOR_HANDLE ifft; __int64 status; __int64 fftsize=1048576; printf("Test Case 2C Small fft, with DFTI_BACKWARD_SCALE\n"); status=DftiCreateDescriptor ( &ifft, DFTI_DOUBLE, DFTI_REAL, 1,fftsize); if(status) { printf("--error status fft1=%s\n",DftiErrorMessage(status)); goto error; } status = DftiSetValue( ifft, DFTI_BACKWARD_SCALE,((double) 1.0)/(fftsize)); if(status) { printf("--error status fft2=%s\n",DftiErrorMessage(status)); goto error; } status=DftiCommitDescriptor ( ifft ); if(status) { printf("--error status fft3=%s\n",DftiErrorMessage(status)); goto error; } printf("--No error!\n"); error:; } void TestIntelCase1A() { DFTI_DESCRIPTOR_HANDLE fft; __int64 status; __int64 fftsize=134217728; printf("Test Case 1A Large fft, no call to mkl_set_num_threads\n"); status=DftiCreateDescriptor ( &fft, DFTI_DOUBLE, DFTI_REAL, 1,fftsize); if(status) { printf("--error status fft1=%s\n",DftiErrorMessage(status)); goto error; } status=DftiCommitDescriptor ( fft ); if(status) { printf("--error status fft2=%s\n",DftiErrorMessage(status)); goto error; } printf("--No error!\n"); error:; } void TestIntelCase1B() { DFTI_DESCRIPTOR_HANDLE fft; __int64 status; __int64 fftsize=134217728; mkl_set_num_threads( 1 ); printf("Test Case 1B Large fft, WITH call to mkl_set_num_threads\n"); status=DftiCreateDescriptor ( &fft, DFTI_DOUBLE, DFTI_REAL, 1,fftsize); if(status) { printf("--error status fft1=%s\n",DftiErrorMessage(status)); goto error; } status=DftiCommitDescriptor ( fft ); if(status) { printf("--error status fft2=%s\n",DftiErrorMessage(status)); goto error; } printf("--No error!\n"); error:; } void TestIntelCase1C() { DFTI_DESCRIPTOR_HANDLE fft; __int64 status; __int64 fftsize=1048576; mkl_set_num_threads( 1 ); printf("Test Case 1C Small fft, WITH call to mkl_set_num_threads\n"); status=DftiCreateDescriptor ( &fft, DFTI_DOUBLE, DFTI_REAL, 1,fftsize); if(status) { printf("--error status fft1=%s\n",DftiErrorMessage(status)); goto error; } status=DftiCommitDescriptor ( fft ); if(status) { printf("--error status fft2=%s\n",DftiErrorMessage(status)); goto error; } printf("--No error!\n"); error:; } void tests() { //Notice: run case 2 before case 1 so the threading settings in case 1 don't impact case 2 TestIntelCase2A(); TestIntelCase2B(); TestIntelCase2C(); TestIntelCase1A(); TestIntelCase1B(); TestIntelCase1C(); }
0 Kudos
Dmitry_B_Intel
Employee
1,830 Views
Hi K. Please make sure you compile for and link with with proper MKL interface layer - you probably need to link with mkl_intel_ilp64. On Windows DftiCreateDescriptor interprets the length argument as a 32-bit number, unless compiled with -DMKL_ILP64. Thanks Dima
0 Kudos
krok_k_
Beginner
1,830 Views
I am using the -DMKL_ILP64 and -lmkl_intel_ilp64 switches. Anyway 134217728 is a 32-bit number (2^27). Also, as I said and as these samples demonstrate, the code works correctly with this input except in two odd cases.
0 Kudos
Dmitry_B_Intel
Employee
1,830 Views
Hi K, I have reproduced the issue and see what you say. This is indeed a defect in implementation. I am sorry for not reading this attentively in the first place. Thanks Dima
0 Kudos
Gennady_F_Intel
Moderator
1,830 Views

Hi K,

the fix of the issue available in the 11.0 update3. pls check it on your side and let us know the result.

--Gennady

0 Kudos
Gennady_F_Intel
Moderator
1,830 Views

I am very sorry - the previos message was not correct - please see the update 5 ( version 11.0) which contains the fix of this problem.

0 Kudos
Reply