Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
87 Views

MKL pardiso segfault with iomp5 when run in multithreaded application

OS: CentOS 7.8.2003

Compiler: gcc 8.2.1 (devtoolset-8)

MKL version: 2020.0.166

Hi,

In the attahced zip file you can find an example that causes segmentation fault.

Please note:

  • The same example does not segfault when GNU openmp instead of iomp5 is used.
  • The same example does not segfault if a call to mkl_get_num_threads(), mkl_get_dynamic(), etc. or pardiso is called from the main thread before the calls from inside the child threads.

Also for your convenience:

gdb backtrace:

#0  0x000000000517b7fd in __kmpc_critical_with_hint ()
#1  0x0000000000adc631 in mkl_pds_blkl_ll_real ()
#2  0x00000000051e83f3 in __kmp_invoke_microtask ()
#3  0x00000000051a9dcc in __kmp_fork_call ()
#4  0x000000000517a677 in __kmpc_fork_call ()
#5  0x0000000000ad9ce1 in mkl_pds_blkl_ll_real ()
#6  0x00000000004f508f in mkl_pds_sssfct_pardiso ()
#7  0x00000000004ba0f6 in mkl_pds_factorize_pardiso ()
#8  0x000000000046e2a3 in mkl_pds_do_all_pardiso_fc ()
#9  0x0000000000416c3f in mkl_pds_pardiso_c ()
#10 0x00000000004054d1 in mkl_pds_pardiso ()
#11 0x0000000000404925 in pardiso__ ()
#12 0x000000000040468b in pardiso_run() ()

valgrind memcheck error:

Invalid read of size 8

at 0x517B7FD: __kmpc_critical_with_hint (in ...main)
by 0xADC630: mkl_pds_blkl_ll_real (in ...main)
by 0x51E83F2: __kmp_invoke_microtask (in ...main)
by 0x51A9DCB: __kmp_fork_call (in ...main)
by 0x517A676: __kmpc_fork_call (in ...main)
by 0xAD9CE0: mkl_pds_blkl_ll_real (in ...main)
by 0x4F508E: mkl_pds_sssfct_pardiso (in ...main)
by 0x4BA0F5: mkl_pds_factorize_pardiso (in ...main)
by 0x46E2A2: mkl_pds_do_all_pardiso_fc (in ...main)
by 0x416C3E: mkl_pds_pardiso_c (in ...main)
by 0x4054D0: mkl_pds_pardiso (in ...main)

Thanks,

Marios Visvardis

0 Kudos
9 Replies
Highlighted
Moderator
87 Views

You could try to link with -liomp5 instead of liniomp5.a and check the problem once again. 

0 Kudos
Highlighted
Moderator
87 Views

and one more comment about mkl's recommendation if the application uses the own threading - mkl always recommends using the sequential version instead of threaded.  You may refer to the developer quite to see more details...

0 Kudos
Highlighted
87 Views

Hi Gennady, thanks for your answers.

Unfortunately I need both static linking and the multi-threaded version of MKL because other parts of our application need it.

Do I have to post it somewhere else in order to file it as a bug?

Thanks

0 Kudos
Highlighted
87 Views

Hi,

I am trying to use Pardiso example using INTEL MKL libraries. The example code works fine without any issues. However, if I try to input my matrix whose size is 10600,it fails with the error "Unhandled exception at mkl_core.dll"

Subbu

0 Kudos
Highlighted
Moderator
87 Views

Subbu, how does your issue correlate with the problem which Marios Visvardis reported? It seems like a separate case, isn't it? if yes, could you create the separate forum thread? It would be better to search the forum for other users.

0 Kudos
Highlighted
Moderator
87 Views

Visvardis, Marios wrote:

Hi Gennady, thanks for your answers.

Unfortunately, I need both static linking and the multi-threaded version of MKL because other parts of our application need it.

Do I have to post it somewhere else in order to file it as a bug?

Thanks

Marios, that's interesting to use static and dynamic versions in one application. Are you sure then if the application will use the same version of mkl? How will you control that?

Nevertheless, If you like to escalate the issue, you may try to open the ticket against Intel MKL into Intel Online Service Center.

 

0 Kudos
Highlighted
Moderator
87 Views

forget to add - Here is the link to the intel OSC https://supporttickets.intel.com/?lang=en-US 

This is the official support changed for those who have the valid licenses 

0 Kudos
Highlighted
87 Views

Gennady, thanks for the link.

I don't need static and dynamic versions at the same application. I want the multi-threaded (openmp) version of the MKL library, but some parts of the application also use own threading. This is related to your comment about using the sequential mkl version.

0 Kudos
Highlighted
Moderator
87 Views

I see the segfault happens when the case links with libiomp5.a but when the case is linked with dynamic runtime of OpenMP (-liomp5), everything works fine.

0 Kudos