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

FFT not working for N=2048

Ignac_A_
Beginner
700 Views

Hello,

I have a problem with mkl FFT. It stops working without a hint for N=2048.

Here is my implementation:

	MKL_LONG status;
	int nThreads = omp_get_num_threads();
	int th=0;

	DFTI_DESCRIPTOR_HANDLE handle = 0;
	status=DftiCreateDescriptor(&handle, DFTI_SINGLE, DFTI_COMPLEX,1,(MKL_LONG) nChannels);
	status=DftiSetValue(handle, DFTI_PLACEMENT, DFTI_INPLACE);
	status=DftiSetValue (handle, DFTI_NUMBER_OF_USER_THREADS, nThreads);
	status=DftiCommitDescriptor(handle);	
	#pragma omp parallel for shared(nChannels,nThreads, input) private(th)
	for (th = 0; th < nSpectra; th++) {
		DftiComputeForward(handle, &input[th*nChannels]);
	}
	DftiFreeDescriptor(&handle);

where N=nChannels. It works fine for N=1024 as well as for N=1536. All statuses are zero until  DftiComputeForward which stops and will not end.

Thanks.
 

0 Kudos
2 Replies
Ignac_A_
Beginner
700 Views

I should probably produce some small code which does this so here it is: 
 

0 Kudos
Gennady_F_Intel
Moderator
700 Views

I have checked how your test works on my side. intel64 bit. staic linking. I have sligthly changed the example to set the mkl_version () and some error status verification. 

See the output below.

Major version:           11

Minor version:           1

Update version:           2

Product Status:           Product

Major version:           11

Major version:           11

Build:                   << Version.Build <<

Processor optimization:  Intel(R) Advanced Vector Extensions (Intel(R) AVX) enabled processors

================================================================

Init
FFT 1024
status DftiComputeForward == 0 #Spectra == 0 nChannels == 1024
status DftiComputeForward == 0 #Spectra == 1 nChannels == 1024
status DftiComputeForward == 0 #Spectra == 2 nChannels == 1024
status DftiComputeForward == 0 #Spectra == 3 nChannels == 1024
status DftiComputeForward == 0 #Spectra == 4 nChannels == 1024
status DftiComputeForward == 0 #Spectra == 5 nChannels == 1024
status DftiComputeForward == 0 #Spectra == 6 nChannels == 1024
status DftiComputeForward == 0 #Spectra == 7 nChannels == 1024
status DftiComputeForward == 0 #Spectra == 8 nChannels == 1024
status DftiComputeForward == 0 #Spectra == 9 nChannels == 1024
FFT 2048
status DftiComputeForward == 0 #Spectra == 0 nChannels == 2048
status DftiComputeForward == 0 #Spectra == 1 nChannels == 2048
status DftiComputeForward == 0 #Spectra == 2 nChannels == 2048
status DftiComputeForward == 0 #Spectra == 3 nChannels == 2048
status DftiComputeForward == 0 #Spectra == 4 nChannels == 2048
status DftiComputeForward == 0 #Spectra == 5 nChannels == 2048
status DftiComputeForward == 0 #Spectra == 6 nChannels == 2048
status DftiComputeForward == 0 #Spectra == 7 nChannels == 2048
status DftiComputeForward == 0 #Spectra == 8 nChannels == 2048
status DftiComputeForward == 0 #Spectra == 9 nChannels == 2048
Finished!
Press any key to continue . . .

0 Kudos
Reply