[petsc-users] What about user-functions containing OpenMP ?

Thibault Bridel-Bertomeu thibault.bridelbertomeu at gmail.com
Wed Mar 3 01:02:51 CST 2021


Dear all,

I am aware that the strategy chosen by PETSc is to rely exclusively on a
MPI paradigm with therefore functions, methods and routines that are not
necessarily thread-safe in order not to impede the performance too much.
I had however one interrogation : what happens if, say, the user passes
functions containing OpenMP pragma to wrappers like TSSetRHSFunction, or
even writes a new TSAdapt containing OpenMP pragma ?
If the threads are started before the TSSolve, would we benefit from some
performance increase from the pragmas in the user functions, or would it
lead to instability because the PETSc functions calling the user functions
are anyways not built for OpenMP and it would fail ?

Thank you for your insight,

Thibault
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210303/4e74c20f/attachment.html>


More information about the petsc-users mailing list