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

MKL threads don't seem to exit properly.

Pramod_V_
Beginner
410 Views

Hi,

We have been chasing this problem forever and hope to get some direction for this problem. We use Intel MKL for one of our internal FORTRAN programs and recently started to use MKL-Parallel option (/Qmkl:parallel) and have been experiencing problems:

Sometimes, the program seems to crash / hangs executing the math functions and sometimes it doesn't come back as if it is silently crashing. 

- How can we gracefully capture the fatal errors from the calls to MKL Libraries?

- How do we handle the cases where the threads do not exit? 

Here's a case below where the MKL thread doesn't exit.

We limited the OMP threads to two and set the stack size to 200000000. For this specific input, it hangs in there as shown below ( from the process explorer).  

Private bytes committed : 1.2GB. Is the stack size too big??

 

0 Kudos
3 Replies
Ying_H_Intel
Employee
410 Views

Hi Pramod, 

Could you please tell some background formation:

1. what compiler is you using for compiling the r_frame.exe? 

2. are you worked on 32bit or 64bit application,  do you have other thread method in r_frame.exe?  if use and MKL-Sequential option (/Qmkl:sequential), do the application work?

3. What MKL functions are used?   and what function may cause the problem? 

Best Regards,

Ying 

0 Kudos
Pramod_V_
Beginner
410 Views

Hi Ying,

Compiler used is: Intel(R) Visual Fortran Compiler XE 14.0.4.237 [IA-32]...Win32

DGEMM for matrix multiplication has been extensively used and this seems to be the last function that got called before it hung. However, the program seems to be completely run since we got the reports okay, but it doesn;t exit. For some other jobs, the behavior is different, it hangs in the middle without reaching to the end. 

Sequential run is working just fine.

Thanks for looking into this.

0 Kudos
Ying_H_Intel
Employee
410 Views

Hi Pramod

So it looks unknown issue. 

1. Could you please  try the latest Intel Fortran   15.0.2   ?

https://software.intel.com/en-us/intel-parallel-studio-xe/try-buy

  • Choose Os, => download free.

Then you will get email with download link  and MKL should provide verbose in the new version. Please see  

https://software.intel.com/en-us/articles/verbose-mode-supported-in-intel-mkl-112. ;

So if you switch on  the option,  you will see MKL functions status. 

Moreever,have you tried some debug tool or threading tools to check the problem to see where is the exact problem. 

like Intel® Inspector XE  Memory & threading dynamic analysis for code quality?

Best Regards,

Ying

 

 

0 Kudos
Reply