Community
cancel
Showing results for 
Search instead for 
Did you mean: 
su__jing-jung
Beginner
136 Views

FFT 3D does not work after upgrade to mkl 2019

Upgraded from mkl 11.0.4 to 2019, the  DftiComputeForward & DftiComputeBackward calls failed on 3d  (2d is OK), source code as below:

--- initialize

    m_inputImage = (mkl_float_complex*)MKL_malloc(sizeof(mkl_float_complex) * mnq, alignSize);
    memset(m_inputImage, 0, sizeof(mkl_float_complex)*mnq);

    long statusMKL;
    statusMKL = DftiCreateDescriptor( &LogGaborMKLDescriptor_Forward, DFTI_SINGLE,DFTI_COMPLEX, 3, len);
    if (! DftiErrorClass(statusMKL, DFTI_NO_ERROR))  return FALSE;

    long stride_in[4];
    stride_in[0] = 0; stride_in[1] = 1; stride_in[2] = m; stride_in[3] = m*n;
    statusMKL = DftiSetValue(LogGaborMKLDescriptor_Forward, DFTI_INPUT_STRIDES, stride_in);

    statusMKL = DftiCommitDescriptor(LogGaborMKLDescriptor_Forward);
    if (! DftiErrorClass(statusMKL, DFTI_NO_ERROR))  return FALSE;

--- call 

    long statusMKL = DftiComputeForward(LogGaborMKLDescriptor_Forward, m_inputImage);

--------------

Debug shows an error code 9 (DFTI_1D_LENGTH_EXCEEDS_INT32 )  from DftiCommitDescriptor.  

Our code is linking with these libraries: mkl_core_dll.lib;mkl_intel_lp64_dll.lib;mkl_intel_thread_dll.lib

Please let me know what I can do to resolve this issue.  THANKS.

0 Kudos
10 Replies
Gennady_F_Intel
Moderator
136 Views

this symptom (DFTI_1D_LENGTH_EXCEEDS_INT32 ) shows that the input problem sizes are big and you may try to relink with ILP64 API. 

su__jing-jung
Beginner
136 Views

Thanks for reply.  Replaced with mkl_intel_ilp64_dll.lib does not work, still gets the same error at memory init time.  What else I need to change to pass this error? 

Gennady_F_Intel
Moderator
136 Views

could you give us the simplest reproducer which we could build and run on our side?

su__jing-jung
Beginner
136 Views

Include a TestMKL.zip file that can be extract into a full C++ solution showing the initialization problem.  THANKS.

Gennady_F_Intel
Moderator
136 Views

I don't see if you use /MKL_ILP64 option when linked the case against ILP64 bits

/Yu"pch.h" /GS /W3 /Zc:wchar_t /I".\..\mkl\include" /I"C:\Program Files (x86)\Visual Leak Detector\include" /ZI /Gm /Od /sdl /Fd"x64\Debug\vc140.pdb" /Zc:inline /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\TestMKL.pch" 

su__jing-jung
Beginner
136 Views

I use VS 2017 to build the solution, the Command Line property is as below. 

/OUT:"C:\Dev\Test\TestMKL\x64\Debug\TestMKL.exe" /MANIFEST /NXCOMPAT /PDB:"C:\Dev\Test\TestMKL\x64\Debug\TestMKL.pdb" /DYNAMICBASE "mkl_core_dll.lib" "mkl_intel_ilp64_dll.lib" "mkl_intel_thread_dll.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" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"C:\Dev\Test\TestMKL\x64\Debug\TestMKL.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\TestMKL.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"../mkl/x64/lib" /LIBPATH:"C:\Program Files (x86)\Visual Leak Detector\lib\Win64" /TLBID:1 

The code worked in V11.0.4 and earlier version with linking to mkl_intel_lp64_dll.lib and  mkl_core_dll.lib, mkl_intel_thread_dll.lib .

 

Gennady_F_Intel
Moderator
136 Views

yes, I also checked the linking options. here everything is correct, but you need to add MKL_ILP64 to the compiler option. Please check MKL developer Guide for more details or look at the MKL Linker adviser tips

su__jing-jung
Beginner
136 Views

Added MKL_ILP64 to compiler option, still receive the same error.

/JMC /permissive- /Yu"pch.h" /GS /W3 /Zc:wchar_t /I".\..\mkl\include" /I"C:\Program Files (x86)\Visual Leak Detector\include" /ZI /Gm- /Od /sdl /Fd"x64\Debug\vc141.pdb" /Zc:inline /fp:precise /D "_DEBUG" /D "_CONSOLE" /D "MKL_ILP64" /D "_WINDOWS" /D "WIN64" /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:classic 

Ruqiu_C_Intel
Employee
136 Views

Hi Su, Jing-Jung,

It works well in my site with your package.

Here is my enviroment:(Windows 10; VS 2017(v141); MKL 2019 update 5)

Command Line in VS:

/JMC /permissive- /Yu"pch.h" /GS /W3 /Zc:wchar_t /I".\..\mkl\include" /I"C:\Program Files (x86)\Visual Leak Detector\include" /ZI /Gm- /Od /sdl /Fd"x64\Debug\vc141.pdb" /Zc:inline /fp:precise /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:classic 

 

 

su__jing-jung
Beginner
136 Views

Hi, Ruqiu,  Thank you. Your command line does not have /D "MKL_ILP64" and still working?  There must be a small different in your project that ours did not have.   What do you think that can be?  Our code has be in production for years, really need to resolve this problem.

We are also on Windows 10, VS 2017. The test solution package I gave to you includes all the MKL libraries we linked to has file version 1019.0.5.1.  When I run with debug, the output shows only mkl_def.dll is loaded.  

---

'TestMKL.exe' (Win32): Loaded 'C:\Dev\Test\TestMKL\x64\Debug\TestMKL.exe'. Symbols loaded.
'TestMKL.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Loaded 'C:\Dev\Test\TestMKL\x64\Debug\mkl_core.dll'. Module was built without symbols.
'TestMKL.exe' (Win32): Loaded 'C:\Dev\Test\TestMKL\x64\Debug\mkl_intel_thread.dll'. Module was built without symbols.
'TestMKL.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\compiler\libiomp5md.dll'. Symbols loaded.
The thread 0x34f08 has exited with code 0 (0x0).
'TestMKL.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\mpirt\libimalloc.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Unloaded 'C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\mpirt\libimalloc.dll'
'TestMKL.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\mpirt\libimalloc.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Unloaded 'C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\mpirt\libimalloc.dll'
'TestMKL.exe' (Win32): Loaded 'C:\Dev\Test\TestMKL\x64\Debug\mkl_def.dll'. Module was built without symbols.
'TestMKL.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'TestMKL.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
The thread 0x3564c has exited with code 0 (0x0).
The thread 0x3550c has exited with code 0 (0x0).
The program '[0x34630] TestMKL.exe' has exited with code 0 (0x0).
-

Result:

DftiCommitDescriptor error = DFTI_1D_LENGTH_EXCEEDS_INT32
Status = FAILED