gridap / GridapPardiso.jl

Provides Pardiso solvers to the Gridap project
Other
10 stars 6 forks source link

pardiso iparm Parameter cannot be customized at the driver level #36

Closed ericneiva closed 2 years ago

ericneiva commented 2 years ago

Hello there,

I am using the latest Intel® oneAPI MKL version 2022.

I have found that the call to pardisoinit! at the symbolic setup here overwrites the iparm provided by the user with the default values for the matrix at hand.

According to pardisoinit! documentation:

The recommended way is to avoid using pardisoinit and to initialize pt and set the values of the iparm array manually as the default parameters might not be the best for a particular use case. An alternative method to set default iparm values is to call pardiso in the analysis phase with iparm(1)=0. In this case, the solver handle pt must be initialized with zero values.

But we cannot easily remove the call to pardisoinit! and let the analysis phase fill the default iparm, because our iparm is, actually, non-default, in general. The reason is we use it to dispatch on the indexing type before the analysis phase, see here.

Any ideas on how to tackle this?

Maybe @fverdugo we can address this when we (video)meet again and agree then on a fix.

fverdugo commented 2 years ago

Good point @ericneiva !

another option is not calling pardisoinit internally at all if the user provides the iparm. I.e., assume that if the user provides iparm he/she is expert enough to provide it in a valid fully initialized state. This can be done by the user e.g., by calling pardisoinit! explicitly before setting extra custom parameters.