Community
cancel
Showing results for
Did you mean:
Beginner
103 Views

hello,

We meet a problem in using Pardiso with multiple threads.This is the first time I used the MKL library. I want to set the number of parallel threads in pardiso. How to modify the following example program to get four threads in parallel?

I'm trying to use

Call mkl_set_dynamic(1)
To set the number of threads, but the output is

=== PARDISO: solving a symmetric indefinite system ===
1-based array indexing is turned ON
PARDISO double precision computation is turned ON
METIS algorithm at reorder step is turned ON
Scaling is turned ON

Summary: ( reordering phase )
================

Times:
======
Time spent in calculations of symmetric matrix portrait (fulladj): 0.000010 s
Time spent in reordering of the initial matrix (reorder) : 0.000102 s
Time spent in symbolic factorization (symbfct) : 0.000015 s
Time spent in data preparations for factorization (parlist) : 0.000005 s
Time spent in allocation of internal data structures (malloc) : 0.001037 s
Time spent in additional calculations : 0.000012 s
Total time spent : 0.001181 s

Statistics:
===========
Parallel Direct Factorization is running on 1 OpenMP

< Linear system Ax = b >
number of equations: 8
number of non-zeros in A: 18
number of non-zeros in A (%): 28.125000

number of right-hand sides: 1

< Factors L and U >
number of columns for each panel: 128
number of independent subgraphs: 0
< Preprocessing with state of the art partitioning metis>
number of supernodes: 4
size of largest supernode: 4
number of non-zeros in L: 31
number of non-zeros in U: 1
number of non-zeros in L+U: 32
Reordering completed ...
Number of nonzeros in factors = 32
Number of factorization MFLOPS = 0
=== PARDISO is running in In-Core mode, because iparam(60)=0 ===

Percentage of computed non-zeros for LL^T factorization
25 % 38 % 48 % 100 %

=== PARDISO: solving a symmetric indefinite system ===
Single-level factorization algorithm is turned ON

Summary: ( factorization phase )
================

Times:
======
Time spent in copying matrix to internal data structure (A to LU): 0.000000 s
Time spent in factorization step (numfct) : 0.000109 s
Time spent in allocation of internal data structures (malloc) : 0.000014 s
Time spent in additional calculations : 0.000001 s
Total time spent : 0.000124 s

Statistics:
===========
Parallel Direct Factorization is running on 1 OpenMP

< Linear system Ax = b >
number of equations: 8
number of non-zeros in A: 18
number of non-zeros in A (%): 28.125000

number of right-hand sides: 1

< Factors L and U >
number of columns for each panel: 128
number of independent subgraphs: 0
< Preprocessing with state of the art partitioning metis>
number of supernodes: 4
size of largest supernode: 4
number of non-zeros in L: 31
number of non-zeros in U: 1
number of non-zeros in L+U: 32
gflop for the numerical factorization: 0.000000

gflop/s for the numerical factorization: 0.000679

Factorization completed ...

=== PARDISO: solving a symmetric indefinite system ===

Summary: ( solution phase )
================

Times:
======
Time spent in direct solver at solve step (solve) : 0.000025 s
Time spent in additional calculations : 0.000041 s
Total time spent : 0.000066 s

Statistics:
===========
Parallel Direct Factorization is running on 1 OpenMP

< Linear system Ax = b >
number of equations: 8
number of non-zeros in A: 18
number of non-zeros in A (%): 28.125000

number of right-hand sides: 1

< Factors L and U >
number of columns for each panel: 128
number of independent subgraphs: 0
< Preprocessing with state of the art partitioning metis>
number of supernodes: 4
size of largest supernode: 4
number of non-zeros in L: 31
number of non-zeros in U: 1
number of non-zeros in L+U: 32
gflop for the numerical factorization: 0.000000

gflop/s for the numerical factorization: 0.000679

Solve completed ...
The solution of the system is
x( 1 ) = -4.186020128680938E-002
x( 2 ) = -3.413124159279142E-003
x( 3 ) = 0.117250376805018
x( 4 ) = -0.112639579923180
x( 5 ) = 2.417224446137142E-002
x( 6 ) = -0.107633340356223
x( 7 ) = 0.198719673273585
x( 8 ) = 0.190382963551205

I'd appreciate any input and ideas!

1 Solution
Moderator
61 Views

Hi,

You can set the no. of threads in two ways:

2) Call

mkl_set_dynamic(0)

Could you print the omp_get_thread_num() in the parallel region to get confirmation about the no. of threads that are getting launched?

Regards

Rajesh.

3 Replies
Moderator
62 Views

Hi,

You can set the no. of threads in two ways:

2) Call

mkl_set_dynamic(0)

Could you print the omp_get_thread_num() in the parallel region to get confirmation about the no. of threads that are getting launched?

Regards

Rajesh.

Beginner
46 Views

Hi Rajesh,

Moderator
20 Views

Hi,

Thanks for the confirmation!

As this issue has been resolved, we will no longer respond to this thread.