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

DftiCommitDescriptor hangs my application

Edwin_V_
Beginner
317 Views

Hi,

I've been struggling with this for a while, hope you can help.

I'm creating a shared library on Linux (Centos 6.7) using FFT's implemented with the MKL. My library works fine when used together with my own test program, but fails when used from a 3rd party application.

The problem has been pinned down to the FFT's. Print-output arrives on screen after calling DftiCreateDescriptor and DftiSetValue, and the status is 0. But when I subsequently call DftiCommitDescriptor the 3rd party application keeps running at 100% cpu and doesn't show any print-output anymore.

The 3rd party application is compiled with Intel Fortran compiler 15.0 (?) and dynamically linked with MKL 11.1.3. The corresponding shared object files are provided in its run path. I'm using Intel Fortran 14.0.0 myself (composer_xe_2013_sp1.0.080). I installed MKL 11.1.3 and changed include paths accordingly but this didn't resolve the problem. I tried dynamic and static linking without any success:

Static, with OpenMP:

 -Wl,--start-group $(MKLDIR)/libmkl_intel_lp64.a $(MKLDIR)/libmkl_core.a $(MKLDIR)/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm

Dynamic, with OpenMP:

 -L$(MKLDIR) -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm

Any ideas how this hang may come about, or how it can be circumvented?

Thanks, Edwin

0 Kudos
3 Replies
Ying_H_Intel
Employee
317 Views

Hi Edwin, 

It is unknown issue.  What is the third-party library?  Have you tried the piece of FFT code in standalone test case, does it work?  

MKL provide FFT sample both (c or fotran code) in MKL install directory. [MKL Install directory]/examples, I may suggest you to try the sample with your input data/ parameter and see if the standalone test case work. 

Additionally, in order to avoid the possible issues caused by the multi-threads  could you please try sequential library.

for example  -L$(MKLDIR) -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm and see if the whole program work?

Best Regards,

Ying H.

Intel MKL Support 

0 Kudos
Edwin_V_
Beginner
317 Views

Thanks Ying,

> It is unknown issue.  What is the third-party library?  Have you tried the piece of FFT code in standalone test case, does it work?  

I cannot tell about the names of the programs involved. They are both robust and commercial packages.

The FFT has been used in my code for several years and didn't fail until now. It works fine when I use my library in combination with a test program that I wrote and compiled myself.

> Additionally, in order to avoid the possible issues caused by the multi-threads  could you please try sequential library.

> for example  -L$(MKLDIR) -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm and see if the whole program work?

I tried four combinations: with/without OpenMP and using static/dynamic linking of MKL to my shared library. None works.

I suspect that the 3rd party code is based on a different version of the MKL and that loading two versions into one application creates some sort of conflict. But I don't understand why static linking of one version of the MKL into my library doesn't resolve the issue.

Best Regards,

EdwinV

0 Kudos
Ying_H_Intel
Employee
317 Views

Hi EdwinV, 

Could you please submit the issue to premier.intel.com or write me a private email so we can further investigate. 

Otherwise, you may just debug and try randomly. 

According to your test,  the issue seems in different MKL and fortran version.  

What i can suggest may be debug  your program.

or if considering mkl version, you may try to make sure one version of MKL.  (mkl 11.1.3)

and when your link dynamic linking of MKL and the thirdparty application.  -L$(MKLDIR) -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm. 

1) what is the whole command line?     You may add -# at the end of your command link line. Then you will see all linked message in details. 

2) You mentioned: 

The 3rd party application is compiled with Intel Fortran compiler 15.0 (?) and dynamically linked with MKL 11.1.3. The corresponding shared object files are provided in its run path.

the 3rd party application is compiled with Intel Fortran compiler 15.0 (?) and dynamically linked with MKL 11.1.3,  is it static library or dynamic library or a exe?   what is the relationship between your shared library with the 3rd party application?  do you load your library by dlopen(?) , what is parameter or call directly? 

Best Regards,
Ying 

0 Kudos
Reply