<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'><font face="times new roman, new york, times, serif" size="3">Hello,</font><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div><font face="times new roman, new york, times, serif" size="3">I'd like to know if MPI (an more particularly Mpich2) is thread safe. What I mean by that is: if I use MPI_Comm_dup to create a copy of MPI_COMM_WORLD, and from each MPI process, I start 2 threads, one communicating through the original communicator and the second communicating through the copy, will it work fine or will possibly a thread of the second group </font><font face="times new roman, new york, times, serif">accidentally</font><font face="times new roman, new york, times, serif" size="3"> receive messages from the first group?</font></div><div><font face="times new roman, new york, times, serif" size="3"><br></font></div><div><font face="times new roman, new york, times, serif" size="3">(So far my only experience of hybrid MPI/thread programming was in a case where communication was done after the threads join, not by multiple threads).</font></div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Thanks,<br><br><div><span name="x"></span><font size="2"><font size="3">Matthieu Dorier<br>
  </font>PhD student at ENS Cachan Brittany and IRISA<br><a href="http://people.irisa.fr/Matthieu.Dorier">http://people.irisa.fr/Matthieu.Dorier</a></font><span name="x"></span><br></div></div></div></body></html>