[petsc-users] Ask for help in tracking down bugs - setting #threads for pardiso block LU solver
Voinov, Boris
boris.voinov at intel.com
Fri Sep 27 06:24:01 CDT 2024
Hello,
Could you please help me to figure out what's wrong with the way I'm trying to make mkl pardiso use the number of threads more than one while setting it as a sub PC solver for ASM preconditioner.
Here is how I do this
Loop over block PCs {
PCSetType(subPc, PCLU); set subPC type
PCFactorSetMatSolverType(subPc, MATSOLVERMKL_PARDISO); set solver for LU
SetPardisoParams("pardiso"); set mkl related options including -mat_mkl_pardiso_65 equal to the desired #threads; return code after PetscOptionsSetValue is ok, so I presume the option is set correctly.
PCSetFromOptions(subPc);
}
Then what I see under the debugger
PCSetUp after a series of calls gets to MatLUFactorSymbolic_AIJMKL_PARDISO which in turn calls MatSetFromOptions_MKL_PARDISO(F, A) and there
in these lines it seems to ignore what I've set for -mat_mkl_pardiso_65 and sets #threads to the default 1
PetscCall(PetscOptionsInt("-mat_mkl_pardiso_65", "Suggested number of threads to use within PARDISO", "None", threads, &threads, &flg));
if (flg) PetscSetMKL_PARDISOThreads((int)threads);
This is about petsc-3.20.
PS when I do this in a standalone code which reads a matrix and solves the linear system and set -mat_mkl_pardiso_65 in the command line it's all right but I need the number of threads to be set in other way in my code.
Thank you and best regards,
Boris
-------------------------------------------------------------
Intel Ireland Limited (Branch)
Collinstown Industrial Park, Leixlip, County Kildare, Ireland
Registered Number: E902934
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240927/6cf3944c/attachment.html>
More information about the petsc-users
mailing list