[petsc-dev] MPI_Init_thread
Jed Brown
jedbrown at mcs.anl.gov
Sun May 6 12:19:11 CDT 2012
On Sun, May 6, 2012 at 11:07 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> Is your specific questions is: should we replace all MPI_Init() calls in
> PETSc with MPI_Init_thread(...,MPI_THREAD_FUNNELED,...)?
>
Can't do this because of MPI-1 compatibility, but yeah, I'm thinking of
always using MPI_THREAD_FUNNELED if configure picks it up.
>
> Will there be a performance hit, when one is not using threads? Should we
> #if defined() do the replacement if the user has turned on OpenMP or
> Pthread or TBB only and not by default?
>
Sounds like there is not likely to be a performance hit because the
standard system routines are thread safe.
http://lists.mcs.anl.gov/pipermail/mpich-discuss/2012-May/012380.html
MPICH2 does not use POSIX functions like getchar_unlocked() or non-POSIX
stuff like fwrite_unlocked(), so it seems like the library will be doing
exactly the same thing in both cases.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120506/2deac2a9/attachment.html>
More information about the petsc-dev
mailing list