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

FFT in Release-Configuration fails

DD42
Beginner
3,728 Views

I'm using oneAPI mkl to do 1D Fourier-Transforms (forward + backward).

In Debug-Configuration everything works as expected, switching to Release-Configuration even the simplest Dftixxx function seems to fail (with no error, no exception), whereas starting a debug session in release-configuration works fine again.

System: Windows 10, Visual Studio 2019, MKL version 2024.2, C(++), 

Use oneMKL Parallel

In order to exclude code errors from my side, tried example code "basic_dp_real_dft_1d.c" (attached) with some extra console outputs -> same behaviour: debug fine, release fails at line 60 calling 

DftiGetValue(0, DFTI_VERSION, version);

(no console output except of "Hello World", no error, no exception).

Any idea what I'm doing wrong?

Thanks + best regards

Dietmar

0 Kudos
11 Replies
Shiquan_Su
Moderator
3,674 Views

Hi, Dietmar:

I escalated your issue to our engineers. Would you please provide your build logs for both the debug build and release build? You should see the build log file generated at the end of your build process in the screen output. Usually, such an error occurs when the libraries are not linked as expected. You should be able to compare the link commands in your debug build and release build in your build log.

0 Kudos
DD42
Beginner
3,249 Views

Hi Shiquan_Su,

thanks for your quick response. Got the following outputs:

 

Build Release:

Neuerstellen gestartet...
1>------ Neues Erstellen gestartet: Projekt: TestMKL, Konfiguration: Release x64 ------
1>basic_dp_real_dft_1d.c
1>Code wird generiert.
1>Previous IPDB not found, fall back to full compilation.
1>All 12 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
1>Codegenerierung ist abgeschlossen.
1>TestMKL.vcxproj -> D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Release\TestMKL.exe
========== Alles neu erstellen: 1 erfolgreich, 0 fehlerhaft, 0 übersprungen ==========

command line compiler:

/JMC /permissive- /ifcOutput "x64\Debug\" /GS /W3 /Zc:wchar_t /ZI /Gm- /Od /sdl /Fd"x64\Debug\vc142.pdb" /Zc:inline /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /FC /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\TestMKL.pch" /diagnostics:column

command line linker:

/OUT:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.exe" /MANIFEST /NXCOMPAT /PDB:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\TestMKL.exe.intermediate.manifest" /LTCGOUT:"x64\Debug\TestMKL.iobj" /ERRORREPORT:PROMPT /ILK:"x64\Debug\TestMKL.ilk" /NOLOGO /TLBID:1

 

Build Debug:

euerstellen gestartet...
1>------ Neues Erstellen gestartet: Projekt: TestMKL, Konfiguration: Debug x64 ------
1>basic_dp_real_dft_1d.c
1>TestMKL.vcxproj -> D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.exe
========== Alles neu erstellen: 1 erfolgreich, 0 fehlerhaft, 0 übersprungen ==========

command line compiler:

/JMC /permissive- /ifcOutput "x64\Debug\" /GS /W3 /Zc:wchar_t /ZI /Gm- /Od /sdl /Fd"x64\Debug\vc142.pdb" /Zc:inline /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /D "_CRT_SECURE_NO_WARNINGS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /FC /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\TestMKL.pch" /diagnostics:column

 

command line linker:

/OUT:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.exe" /MANIFEST /NXCOMPAT /PDB:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\TestMKL.exe.intermediate.manifest" /LTCGOUT:"x64\Debug\TestMKL.iobj" /ERRORREPORT:PROMPT /ILK:"x64\Debug\TestMKL.ilk" /NOLOGO /TLBID:1

 

Best regards

Dietmar

0 Kudos
DD42
Beginner
3,621 Views

Hi Shiquan_Su,

did you receive my reply from this morning? I can't see it in the communication history.

Best regards

Dietmar

 

0 Kudos
DD42
Beginner
3,570 Views

Hi Shiquan_Su,

thank you very much for your quick response. Here are the infos:

 

Debug Config:

Build:

Neuerstellen gestartet...
1>------ Neues Erstellen gestartet: Projekt: TestMKL, Konfiguration: Debug x64 ------
1>basic_dp_real_dft_1d.c
1>TestMKL.vcxproj -> D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.exe
========== Alles neu erstellen: 1 erfolgreich, 0 fehlerhaft, 0 übersprungen ==========

compiler cmd line:

/JMC /permissive- /ifcOutput "x64\Debug\" /GS /W3 /Zc:wchar_t /ZI /Gm- /Od /sdl /Fd"x64\Debug\vc142.pdb" /Zc:inline /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /D "_CRT_SECURE_NO_WARNINGS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /FC /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\TestMKL.pch" /diagnostics:column

linker cmd line:

/OUT:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.exe" /MANIFEST /NXCOMPAT /PDB:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\TestMKL.exe.intermediate.manifest" /LTCGOUT:"x64\Debug\TestMKL.iobj" /ERRORREPORT:PROMPT /ILK:"x64\Debug\TestMKL.ilk" /NOLOGO /TLBID:1

 

Release Config:

Build:

Neuerstellen gestartet...
1>------ Neues Erstellen gestartet: Projekt: TestMKL, Konfiguration: Release x64 ------
1>basic_dp_real_dft_1d.c
1>Code wird generiert.
1>Previous IPDB not found, fall back to full compilation.
1>All 12 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
1>Codegenerierung ist abgeschlossen.
1>TestMKL.vcxproj -> D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Release\TestMKL.exe
========== Alles neu erstellen: 1 erfolgreich, 0 fehlerhaft, 0 übersprungen ==========

compiler cmd line:

/JMC /permissive- /ifcOutput "x64\Debug\" /GS /W3 /Zc:wchar_t /ZI /Gm- /Od /sdl /Fd"x64\Debug\vc142.pdb" /Zc:inline /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /D "_CRT_SECURE_NO_WARNINGS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /FC /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\TestMKL.pch" /diagnostics:column

linker cmd line:

/OUT:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.exe" /MANIFEST /NXCOMPAT /PDB:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Debug\TestMKL.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\TestMKL.exe.intermediate.manifest" /LTCGOUT:"x64\Debug\TestMKL.iobj" /ERRORREPORT:PROMPT /ILK:"x64\Debug\TestMKL.ilk" /NOLOGO /TLBID:1

 

Best regards

Dietmar

 

0 Kudos
Shiquan_Su
Moderator
3,603 Views

We can not find your reply in our system. I sent out a test email to you through our ticket system. Would you please check and reply to that?


0 Kudos
DD42
Beginner
3,602 Views

Hello Shiquan,

see your reply, but not mine though I re-entered it recently.

Is there a limitation in the number of characters or issues with special characters?

Best regards

Dietmar

 

0 Kudos
DD42
Beginner
3,601 Views

Hello Shiquan,

thank you for your quick response. I attached the infos in a seperate file. Hope that helps

Best regards

Dietmar

0 Kudos
Shiquan_Su
Moderator
3,520 Views

Thanks, Dietmar:

We see your log now. I am studying it, still have no idea what makes the difference between debug and release builds to lead to the error.

 

Shiquan

0 Kudos
Shiquan_Su
Moderator
3,423 Views

We studied your build log and cannot see how the mkl (dft) is compiled and linked to your executable. Can you share your full project?

We can see these lines in your release build process, saying some object files were recompiled:


1>basic_dp_real_dft_1d.c

1>Code wird generiert.

1>Previous IPDB not found, fall back to full compilation.

1>All 12 functions were compiled because no usable IPDB/IOBJ from the previous compilation was found.

1>Codegenerierung ist abgeschlossen.

1>TestMKL.vcxproj -> D:\Proj\AloX\Software\BornApprox\BornApproxLib\x64\Release\TestMKL.exe


Probably your debug build is using existing IOBJ files, which can fulfill your mkl(dft) calls. The best way is you set up your Microsoft VS to link to mkl properly. The following is a reference page:

https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-windows/2023-2/config-microsoft-visual-c-dev-sys-to-link-onemkl.html


0 Kudos
DD42
Beginner
3,389 Views

Dear Shiquan,

I used the automatic linking option. According to link.command.tlog

 

^D:\PROJ\ALOX\SOFTWARE\BORNAPPROX\BORNAPPROXLIB\TESTMKL\X64\RELEASE\BASIC_DP_REAL_DFT_1D.OBJ
/OUT:"D:\PROJ\ALOX\SOFTWARE\BORNAPPROX\BORNAPPROXLIB\X64\RELEASE\TESTMKL.EXE" /VERBOSE /INCREMENTAL:NO /NOLOGO MKL_INTEL_LP64_DLL.LIB MKL_INTEL_THREAD_DLL.LIB MKL_CORE_DLL.LIB LIBIOMP5MD.LIB KERNEL32.LIB USER32.LIB GDI32.LIB WINSPOOL.LIB COMDLG32.LIB ADVAPI32.LIB SHELL32.LIB OLE32.LIB OLEAUT32.LIB UUID.LIB ODBC32.LIB ODBCCP32.LIB /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:\PROJ\ALOX\SOFTWARE\BORNAPPROX\BORNAPPROXLIB\X64\RELEASE\TESTMKL.PDB" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG:incremental /LTCGOUT:"X64\RELEASE\TESTMKL.IOBJ" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:\PROJ\ALOX\SOFTWARE\BORNAPPROX\BORNAPPROXLIB\X64\RELEASE\TESTMKL.LIB" /MACHINE:X64 X64\RELEASE\BASIC_DP_REAL_DFT_1D.OBJ

the linked mkl-libs coincide with those to be used in manual link (?).

Moreover I made the following observation: when starting my test-app for the first time I got a message saying that mkl_intel_thread.2.dll is missing. So I copied it to my execution folder, Then I get the behaviour mentioned above. Now I copied some more dlls and the app makes some steps (->console outputs) further, but still doesn't run correctly. Though I'm pretty sure that I followed the instructions during the install process, my setup may be corrupt meanwhile for some reasons. Is that possible or may there be still some other problems.

Best regards Dietmar

0 Kudos
Shiquan_Su
Moderator
2,890 Views

From your automatic linking options: "/NOLOGO MKL_INTEL_LP64_DLL.LIB MKL_INTEL_THREAD_DLL.LIB MKL_CORE_DLL.LIB LIBIOMP5MD.LIB", it looks like your system tried to link to the mkl.

Can you check your computation environment against our link line advisor

https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html

You may compare what link line advisor suggests for linking option against your automatic linking options.

After you apply link line advisor suggestion for linking option, please let me know the actual error you see.


0 Kudos
Reply