- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am following the oneMKL 2D FFT code examples to perform a real to complex forward transform in-place. However, after the transform has been computed, the data does not appear to have changed. No errors are produced.
Attempting to upload the code on this site as a .cpp or even .txt file gives the error :
"The attachment's main.cpp/.txt content type (text/plain) does not match its file extension and has been removed."
I have instead uploaded the C++ code and CMakeLists here.
Any help is much appreciated.
Best regards,
Bjarke
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bjarke,
Thanks for posting on Intel Communities.
We have tried running the code in our environment and we could see the results being printed as well. Could you please let us know your environment details?
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shanmukh,
Thank you for your response. I am using Qt Creator 8.0.1 with Qt 6.4.0 MSVC2019 64bit and the following environment variables:
-DCMAKE_BUILD_TYPE:STRING=Debug
-DCMAKE_CXX_FLAGS_INIT:STRING=-DQT_QML_DEBUG
-DCMAKE_C_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe
-DCMAKE_GENERATOR:STRING=Ninja
-DCMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/mkl_test
-DCMAKE_PREFIX_PATH:PATH=C:/Qt/6.4.0/msvc2019_64
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=C:/Qt/Tools/QtCreator/share/qtcreator/package-manager/auto-setup.cmake
-DENABLE_BLACS:BOOL=OFF
-DENABLE_BLAS95:BOOL=OFF
-DENABLE_CDFT:BOOL=OFF
-DENABLE_CPARDISO:BOOL=OFF
-DENABLE_LAPACK95:BOOL=OFF
-DENABLE_OMP_OFFLOAD:BOOL=OFF
-DENABLE_SCALAPACK:BOOL=OFF
-DMKL_ARCH:STRING=intel64
-DMKL_DIR:PATH=C:/Program Files (x86)/Intel/oneAPI/mkl/2022.2.0/lib/cmake/mkl
-DMKL_H:PATH=C:/Program Files (x86)/Intel/oneAPI/mkl/2022.2.0/include
-DMKL_INTERFACE_FULL:STRING=intel_ilp64
-DMKL_LINK:STRING=dynamic
-DMKL_MPI:STRING=intelmpi
-DMKL_THREADING:STRING=intel_thread
-DOMP_DLL_DIR:PATH=C:/Program Files (x86)/Intel/oneAPI/mkl/2022.2.0/../../compiler/latest/windows/redist/intel64_win/compiler
-DOMP_LIBRARY:FILEPATH=C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/compiler/lib/intel64_win/libiomp5md.lib
-DQT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP:BOOL=OFF
-DQT_QMAKE_EXECUTABLE:FILEPATH=C:/Qt/6.4.0/msvc2019_64/bin/qmake.exe
-Dmkl_core_file:STRING=C:/Program Files (x86)/Intel/oneAPI/mkl/2022.2.0/lib/intel64/mkl_core_dll.lib
-Dmkl_intel_ilp64_file:FILEPATH=C:/Program Files (x86)/Intel/oneAPI/mkl/2022.2.0/lib/intel64/mkl_intel_ilp64_dll.lib
-Dmkl_intel_thread_file:FILEPATH=C:/Program Files (x86)/Intel/oneAPI/mkl/2022.2.0/lib/intel64/mkl_intel_thread_dll.lib
Best regards,
Bjarke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should also add that the 1D FFTs from the code examples work fine for me. It is just that the 2D FFTs do not seem to update the results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shanmukh,
Your output indeed looks correct. I have attached my output for the 2D FFT in question but also for a 1D FFT with similar code which manages to produce the expected result. The code for the 1D FFT is also attached.
Best regards,
Bjarke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bjarke,
Could you please try compiling and running the code on Intel oneAPI command prompt and check for the results?
Please refer to the below link for more information regarding running the sample project using the command line.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again Shanmukh,
The transform indeed works when using the oneAPI command prompt to build and run the program. However, I still need to work out how to use the code through my IDE, as I want to integrate it with a larger project. Even when running Qt Creator through the oneAPI command prompt, the 2D FFT does not seem to work, while the 1D FFT still works. Do you have ideas for, what I could try?
Best regards,
Bjarke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bjarke,
A gentle reminder:
We have not heard back from you. Has the information provided helped? Kindly let us know if we could help you further.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shanmukh, I have been busy with some pressing matters, but I expect to look into this soon. BR, Bjarke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bjarke,
Could you please refer to the below link details about hardware, operating system, and software prerequisites for the Intel® oneAPI Math Kernel Library.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shanmukh,
I see that Qt Creator is not officially supported. However, when building with CMake in Visual Studio 2019, I get the same issue. However if built with nmake and run through the CLI, everything works as expected. So what could I try to make it work with CMake?
Best regards,
Bjarke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shanmukh,
I do not see an attached screenshot. Was the project built using the CMakeLists.txt I provided?
Best regards,
Bjarke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again,
I found out that the statuses returned DftiCommitDescriptor and DftiComputeForward are different depending on whether I use nmake or CMake.
Building with nmake I get:
status = DftiCreateDescriptor(&my_desc_handle, DFTI_SINGLE,
DFTI_REAL, 2, dim_sizes);
status = 0
status = DftiCommitDescriptor(my_desc_handle);
status = 0
status = DftiComputeForward(my_desc_handle, r2c_data);
status = 0
status = DftiFreeDescriptor(&my_desc_handle);
status = 0
While building with CMake I get:
status = DftiCreateDescriptor(&my_desc_handle, DFTI_SINGLE,
DFTI_REAL, 2, dim_sizes);
status = 0
status = DftiCommitDescriptor(my_desc_handle);
status = 9
status = DftiComputeForward(my_desc_handle, r2c_data);
status = 2
status = DftiFreeDescriptor(&my_desc_handle);
status = 0
I cannot seem to find any documentation for these status values. Perhaps you could explain what they mean?
Best regards,
Bjarke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bjarke,
Could you please refresh the page and check for the screenshot? Below are various types of predefined error statuses.
0 | DFTI_NO_ERROR | No error. The zero status belongs to this class. |
1 | DFTI_MEMORY_ERROR | Usually associated with memory allocation. |
2 | DFTI_INVALID_CONFIGURATION | Invalid settings in one or more configuration parameters. |
3 | DFTI_INCONSISTENT_CONFIGURATION | Inconsistent configuration or input parameters. |
4 | DFTI_NUMBER_OF_THREADS_ERROR | Number
of OMP threads in the computation function is not equal to the number of OMP threads in the initialization stage (commit function). |
5 | DFTI_MULTITHREADED_ERROR | Usually associated with a value that OMP routines return in case of errors. |
6 | DFTI_BAD_DESCRIPTOR | Descriptor is unusable for computation. |
7 | DFTI_UNIMPLEMENTED | Unimplemented legitimate settings; implementation dependent. |
8 | DFTI_MKL_INTERNAL_ERROR | Internal library error. |
9 | DFTI_1D_LENGTH_EXCEEDS_INT32 | Length of one of the dimensions exceeds 232 -1 (4bytes). |
9 | DFTI_1D_MEMORY_EXCEEDS_INT32 | Data size of one of the transforms exceeds 231 -1 bytes. |
You could also go through the below link for more details regarding the same.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shanmukh,
Thank you for the error codes. According to these, it seems that the length of a dimension in the 30x30 transform exceeds 2E32.
By the way, the latest screenshot you sent was of the 1D FFT code which I said ran fine in my environment.
Anyways, I have the corresponding example working using the FFTW3 interface, so I will be sticking to that.
Best regards,
Bjarke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bjarke,
I have the corresponding example working using the FFTW3 interface, so I will be sticking to that.
>> Thanks for sharing with us the details. As your issue has been resolved, Could you please let us know if we could close this case at our end?
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can close it. Thank you for the help. Best regards, Bjarke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bjarke,
Thanks for the confirmation! If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Have a great day!
Best Regards,
Shanmukh.SS
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page