<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">I am running 1 master process and 3 slave process, master has</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">a recv thread, that make it 5 processes total.</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">THe box I have has 16 cores.</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"><BR> </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> Pavan Balaji <balaji@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 31, 2009 12:10:21 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [mpich-discuss] thread MPI calls<BR></FONT><BR><BR>How many processes+threads do you have? It looks like you are running 1 master process (with two threads) + 3 slaves (= 5 processes/threads) on a 4-core system. Is this correct? If yes, all of these will contend for the 4 cores.<BR><BR>-- Pavan<BR><BR>On 07/30/2009 08:21 PM, chong tan wrote:<BR>> D,<BR>> the simplest test we have is 1 master and 3 slaves, 3 workers in total. Data szie<BR>> start at 5K byte (1 time), then dwindles down to less than 128 byte in a hurry. THe MPI_Send/IRecv/Recv were the only ones in our application (besides from<BR>> MPI_Init() and 1
partiticular MPI_Barrier() when the application is initialized, and 1<BR>> Finish() ).<BR>> do_work() has do to some amount of work, more in master proc than slave. do_litle_work()<BR>> does what it means, in our application, it is 3 function return with int value, and 1 check for<BR>> trace/monitor flag. (code is like "if( trace ) print_trace(..)" )<BR>> The test was ran on a 4XQuad box, each process on its own physcial CPU. THe<BR>> master proc (proc 0) is run on the same physical CPU as its thread. THe box<BR>> is AMD based, so no HT (our application filters cores created by hyperthreading<BR>> by default). on the 3 workers test, we see 20% to 50% sys activity constantly. WHich in term slow<BR>> down each proc to the point that master (proc 0)'s main thread becomes idle 40% of the time.<BR>> In the extreme case, we saw the threaded code being 70% slower than un-threaded
one.<BR>> We have the tests ready to show the issues, it would be nice if you are around SF Bay area.<BR>> thanks<BR>> tan<BR>> <BR>> ------------------------------------------------------------------------<BR>> *From:* Darius Buntinas <<A href="mailto:buntinas@mcs.anl.gov" ymailto="mailto:buntinas@mcs.anl.gov">buntinas@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:* Thursday, July 30, 2009 1:49:10 PM<BR>> *Subject:* Re: [mpich-discuss] thread MPI calls<BR>> <BR>> OK. Yes, unless do_work and do_very_little_work make any blocking calls<BR>> (like I/O), process 1 should have 100% cpu utilization. This should be<BR>> fine (from a performance standpoint), as long as you aren't<BR>> oversubscribing your processors.<BR>> <BR>> I'm going to try to reproduce your tests on
our machines. How many<BR>> worker processes do you have? Is this all on one node? If not how many<BR>> nodes? How many cores do you have per node?<BR>> <BR>> In the mean time can you check to which processor each process is bound?<BR>> Make sure that each process is bound to its own core, and not to a<BR>> hyperthread.<BR>> <BR>> Thanks,<BR>> -d<BR>> <BR>> <BR>> <BR>> On 07/30/2009 02:02 PM, chong tan wrote:<BR>> > D,<BR>> > sorry for the confusion. In our application, the setting is different<BR>> > from the code<BR>> > Pavan posted. I will try to have them lined up here, (<--- is between<BR>> > thread,<BR>> > <==== is between proc)<BR>> > > proc 0
proc 1<BR>> > > main thread recv thread<BR>> > > do_work() MPI_Irecv do_work()<BR>> > MPI_Wait*() <======= MPI_Send()<BR>> > blocked <--- unblock > do_very_litle_work()<BR>> > MPI_Send ==========> MPI_Recv()<BR>> > > > I don't know if the MPI_Recv call in Proc 1 is interferring with
the<BR>> > MPI_Wait*() in Proc 1. We<BR>> > see heavy system activity in Proc 1.<BR>> > > > tan<BR>> > ><BR>> > ><BR>> > ------------------------------------------------------------------------<BR>> > *From:* Darius Buntinas <<A href="mailto:buntinas@mcs.anl.gov" ymailto="mailto:buntinas@mcs.anl.gov">buntinas@mcs.anl.gov</A> <mailto:<A href="mailto:buntinas@mcs.anl.gov" ymailto="mailto:buntinas@mcs.anl.gov">buntinas@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> <mailto:<A href="mailto:mpich-discuss@mcs.anl.gov" ymailto="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</A>><BR>> > *Sent:* Thursday, July 30, 2009
11:17:52 AM<BR>> > *Subject:* Re: [mpich-discuss] thread MPI calls<BR>> ><BR>> > That sounds fishy. If process 1 is doing a sleep(), you shouldn't see<BR>> > any activity from that process! Can you double check that?<BR>> ><BR>> > -d<BR>> ><BR>> > On 07/30/2009 01:05 PM, chong tan wrote:<BR>> >> pavan,<BR>> >> the behavior you described is the expected behavior. However, using<BR>> >> your example, we are also seeing<BR>> >> a lot of system activity in process 1 in all of our experiments. That<BR>> >> contributes significantly<BR>> >> to the negative gain.<BR>> >><BR>> ><BR>> <BR><BR>-- Pavan Balaji<BR>http://www.mcs.anl.gov/~balaji<BR></DIV></div><br>
</body></html>