Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
718 Discussions

Problem of using /MTd /MDd flag with icx compiler in windows.

Kohn-Sham
New Contributor I
580 Views

Hi.

 

I'm trying to figure out the unstable application motion problem in windows. 

Original post is 

Application that have MKL linking work correct Intermittently in Windows

and

/Ot (/O2) flag remove too much of source code in windows 

With same source code, bug_tbb_mkl_problem_windows.cpp, I found that application runs fail when app is compiled with /MTd, /MDd flag. There is reproducer at top most hyperlink.

 

I tried Forcing setting compiler linking libraries in the document, Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference, 2024.1, p.381, "Redistributable Library Considerations"

I tested below all, and app runs well if compiled with /MT or /MD, but doesn't with /MTd or /MDd

 

icx /MT /O2 /DMKL_ILP64 /Fe"C:/test.exe" "c:/bug_tbb_mkl_problem_windows.cpp" /Qmkl /Qtbb

icx /MD /O2 /DMKL_ILP64 /Fe"C:/test.exe" "c:/bug_tbb_mkl_problem_windows.cpp" /Qmkl /Qtbb /link /NODEFAULTLIB:svml_dispmt.lib /NODEFAULTLIB:libmmt.lib /NODEFAULTLIB:libcmt.lib


icx /MTd /O2 /debug:full /DMKL_ILP64 /Fe"C:/test.exe" "c:/bug_tbb_mkl_problem_windows.cpp" /Qmkl /Qtbb /link /NODEFAULTLIB:libcmt.lib

icx /MDd /O2 /debug:full /DMKL_ILP64 /Fe"C:/test.exe" "c:/bug_tbb_mkl_problem_windows.cpp" /Qmkl /Qtbb /link /NODEFAULTLIB:libcmt.lib

icx /MTd /O2 /D_DEBUG /DMKL_ILP64 /Fe"C:/test.exe" "c:/bug_tbb_mkl_problem_windows.cpp" libircmt.lib svml_dispmt.lib libdecimal.lib libmmt.lib libcmtd.lib oldnames.lib mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib /Qtbb /link /NODEFAULTLIB:libcmt.lib /LIBPATH:"C:/Program Files (x86)/Intel/oneAPI/compiler/2024.2/lib" /LIBPATH:"C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.41.34120/lib/x64" /LIBPATH:"C:/Program Files (x86)/Intel/oneAPI/mkl/2024.2/lib"

 

I read _DEBUG issues.  and tested /D_DEBUG flag, and found that icx prepend "#define _DEBUG 1" to source code automatically if /MTd or /MDd flag is added. 

 

 

 

0 Kudos
1 Solution
Alex_Y_Intel
Moderator
510 Views

I've escalated your issue to our engineering team to investigate. 

View solution in original post

0 Kudos
2 Replies
Alex_Y_Intel
Moderator
511 Views

I've escalated your issue to our engineering team to investigate. 

0 Kudos
Kohn-Sham
New Contributor I
84 Views

I found that source code get bugged.

My apology for the confusion.

0 Kudos
Reply