<div class="gmail_quote">On Sun, May 6, 2012 at 11:07 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":451"> Is your specific questions is: should we replace all MPI_Init() calls in PETSc with MPI_Init_thread(...,MPI_THREAD_FUNNELED,...)?<br></div></blockquote><div><br></div><div>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.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":451">
<br>
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?</div></blockquote></div><div><br></div>
<div>Sounds like there is not likely to be a performance hit because the standard system routines are thread safe.</div><br><div><a href="http://lists.mcs.anl.gov/pipermail/mpich-discuss/2012-May/012380.html">http://lists.mcs.anl.gov/pipermail/mpich-discuss/2012-May/012380.html</a></div>
<div><br></div><div>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.</div>