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

Threaded version of Pardiso

farukhsharipov
Beginner
222 Views

We are using Intel Visual Fortran Composer XE 2011 with MKL library, and we trying to solve large matrices using pardiso using multithread enabled but it's not working. When runing mkl_get_max_threads() it shows only 2 instead of 4 even if we use call mkl_set_num_threads(4) it still shows 2 and we can see from Task Manager that not all the threads are working 100% just 20% and only sometime...

We set

iparm(2) = 3 ! fill-in reordering from METIS

iparm(3) = 4 ! numbers of processors

This is runing on Intel Core i7 with 2 Cores and 4 Threads 

Can anyone please advise why this is not working?

Thanks in advance.

0 Kudos
1 Reply
Zhang_Z_Intel
Employee
222 Views

Currently, iparm(3) is not supported in Intel MKL PARDISO. Do not use it to set the number of threads. Instead, you should use either the support function mkl_set_num_threads, or the environment variable MKL_NUM_THREADS.

Please try this before you call pardiso:

mkl_set_dynamic(0);
mkl_set_num_threads(4);

Let us know if it works.You can also check the output statistics from PARDISO to see how many threads are actually used. You'd look for a line in the output that starts with "< Parallel Direct Factorization with number of processors: >".

0 Kudos
Reply