<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV><BR></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">D,</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">thanks for the info. I will check with the engineer implementinig this thread comm</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">feature. I will keep you posted.</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">A side note. We also try a different strategy by calling IRecv in the master process</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">right after it has recieved and applied all data from 'slave process', like this, in non-threaded</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">mode :</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> master : slave :</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">TOP : TOP : </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> MPI_Wait_all MPI_Send (to master)</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> for all slave MPI_Recv( from master )</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> MPI_Send</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> appy-data apply-data </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> for all slave</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> MPI_Irecv()</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> do works do works</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> repeat TOP repeat TOP<BR></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">compared to brute forced blocked Recv, this Irecv and wait-all can cause performance</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">loss of 5%. </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">tan</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"> </DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 13px"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Darius Buntinas <buntinas@mcs.anl.gov><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> mpich-discuss@mcs.anl.gov<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, July 24, 2009 8:37:39 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [mpich-discuss] thread MPI calls<BR></FONT><BR><BR>Hi Tan,<BR><BR>Did your program call MPI_Init_thread, or MPI_Init? If you called<BR>MPI_Init_thread, what thread level did you request?<BR><BR>Based on what thread level you selected, MPICH will enable internal<BR>thread safety. Without looking at the code, I believe that (at least<BR>for the unix implementation) the internal thread safety mechanism is<BR>only enabled with the thread multiple level, so the performance of<BR>using, say, thread funneled should be the same as using thread single<BR>(or just callin MPI_Init rather than MPI_Init_thread).<BR><BR>-d<BR><BR>On
07/23/2009 05:40 PM, chong tan wrote:<BR>> box X86 box running Linux. MPICH2 1.1 configured with<BR>> <BR>> --disable-f77 --disable-f90 --with-device=ch3:nemesis --enable-fast<BR>> <BR>> machine : 16 cores, load of mem. running with mpiexec -n 4<BR>> The master process (MPICH rank 0) has 2 thread, main and recv, the<BR>> locks are constructed using pthread. The master's<BR>> recv function wait for the recv thread to be done with all recieving,<BR>> then process the data, and reenable the recv thread,<BR>> like this:<BR>> <BR>> main recv thread<BR>> <BR>> recvFunc() {
wait for 'run' <BR>> wait for read-done for n processes<BR>> apply data <BR>> call MPI_IRecv<BR>> signal run MPI_waitall<BR>> }
<BR>> signal read-done<BR>> <BR>> recvFunc is repeatedly called during the life of my applications. (In a<BR>> few tests I have, it is called 100+ billion times)<BR>> <BR>> compared to the same application with no thread and using IRecv or Recv,<BR>> the threaded version can run 20+%<BR>> slower. From the process monitoring, it looks like the MPI Irecv calls<BR>> maybe thread. This performance degration<BR>> is inline with 2.0.6 configured using --enable-threads=funneled. The<BR>> application ran for many hours, so 20% is<BR>> significant.<BR>> <BR>> Questions :<BR>> - is MPICH2 1.1 self-sensing ? that is, does it know it can decide if<BR>> it has to do thread-multiple ?<BR>> - IRecv and MPI wait all, is that also threaded ?<BR>> - anyone experimented this before ?<BR>> <BR>>
thanks<BR>> tan<BR>> <BR>> ------------------------------------------------------------------------<BR>> *From:* Rajeev Thakur <<A href="mailto:thakur@mcs.anl.gov" ymailto="mailto:thakur@mcs.anl.gov">thakur@mcs.anl.gov</A>><BR>> *To:* <A href="mailto:mpich-discuss@mcs.anl.gov" ymailto="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</A><BR>> *Sent:* Friday, June 26, 2009 12:12:18 PM<BR>> *Subject:* Re: [mpich-discuss] does 1.1 support real threading of MPI call ?<BR>> <BR>> Yes, it supports MPI_THREAD_MULTIPLE as defined by the MPI standard.<BR>> <BR>> Rajeev<BR>> <BR>> ------------------------------------------------------------------------<BR>> *From:* <A href="mailto:mpich-discuss-bounces@mcs.anl.gov" ymailto="mailto:mpich-discuss-bounces@mcs.anl.gov">mpich-discuss-bounces@mcs.anl.gov</A><BR>> [mailto:<A
href="mailto:mpich-discuss-bounces@mcs.anl.gov" ymailto="mailto:mpich-discuss-bounces@mcs.anl.gov">mpich-discuss-bounces@mcs.anl.gov</A>] *On Behalf Of *chong tan<BR>> *Sent:* Friday, June 26, 2009 2:04 PM<BR>> *To:* <A href="mailto:mpich-discuss@mcs.anl.gov" ymailto="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</A><BR>> *Subject:* [mpich-discuss] does 1.1 support real threading of MPI call ?<BR>> <BR>> Does anyone know if the 1.1 release supports real threaded MPI<BR>> calls. That is,<BR>> a process, say 1, may contain n threads, and each calling<BR>> MPI_Send/Recv to<BR>> other processes, but still think they are all process 1 ?<BR>> <BR>> I am not looking at the funneled solution, that does not help me.<BR>> <BR>>
thanks<BR>> tan<BR>> <BR>> <BR>> <BR>> <BR>> <BR></DIV></div><br>
</body></html>