<html><body>
<p><font size="2" face="sans-serif">The problem is that none of these INFO options represent the mode I was discussing in our last meeting. These are different interpretations of how helper threads will be used and implemented.</font><br>
<br>
<font size="2" face="sans-serif">I am not at all comfortable with this concept of adding synchronization to all MPI calls. In fact, I'm not at all sure what it means to set balanced to true and then go into computation. How do computation threads get synchronized in those cases?  It sounds the same as balanced=false.</font><br>
<br>
<br>
<font size="2" face="sans-serif">_______________________________________________<br>
Douglas Miller                  BlueGene Messaging Development<br>
IBM Corp., Rochester, MN USA                     Bldg 030-2 A410<br>
dougmill@us.ibm.com               Douglas Miller/Rochester/IBM</font><br>
<br>
<img width="16" height="16" src="cid:1__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for Pavan Balaji ---02/08/2011 05:38:42 PM---Hi Doug,"><font size="2" color="#424282" face="sans-serif">Pavan Balaji ---02/08/2011 05:38:42 PM---Hi Doug,</font><br>
<br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td style="background-image:url(cid:2__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " width="40%">
<ul style="padding-left: 72pt"><font size="1" face="sans-serif"><b>Pavan Balaji <balaji@mcs.anl.gov></b></font><font size="1" face="sans-serif"> </font>
<p><font size="1" face="sans-serif">02/08/2011 05:38 PM</font></ul>
</td><td width="60%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<div align="right"><font size="1" face="sans-serif">To</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 7pt"><font size="1" face="sans-serif">mpi3-hybridpm@lists.mpi-forum.org</font></ul>
</td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<div align="right"><font size="1" face="sans-serif">cc</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 7pt"><font size="1" face="sans-serif">Douglas Miller/Rochester/IBM@IBMUS</font></ul>
</td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<div align="right"><font size="1" face="sans-serif">Subject</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com" border="0" alt=""><br>

<ul style="padding-left: 7pt"><font size="1" face="sans-serif">Re: [Mpi3-hybridpm] New draft of the EI chapter uploaded</font></ul>
</td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="58"><img width="1" height="1" src="cid:3__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com" border="0" alt=""></td><td width="336"><img width="1" height="1" src="cid:3__=09BBF2A1DFC37FC38f9e8a93df938@us.ibm.com" border="0" alt=""></td></tr>
</table>
</td></tr>
</table>
<br>
<tt><font size="2">Hi Doug,<br>
<br>
On 02/07/2011 07:31 AM, Douglas Miller wrote:<br>
> *balanced *- if set to true, the MPI implementation may assume that all<br>
> threads in the team will actively participate by making MPI calls (or<br>
> calling MPI_HELPER_TEAM_LEAVE). If false, the implementation must allow<br>
> for some threads spending the bulk of their time performing computation<br>
> or other non-MPI activities.<br>
<br>
With respect to the first point, threads don't need to "actively <br>
participate" from the user's perspective. The user just needs to be <br>
aware that all MPI calls might synchronize all or some of the threads.<br>
<br>
For the second point, I think this is incorrect. The threads spending <br>
the bulk of their time in computation is fine even in "balanced" mode. <br>
If the user's code is willing to accept the "synchronization overhead" <br>
during the MPI call, that's fine. For example, we already discussed that <br>
the following is valid:<br>
<br>
MPI_Helper_team_join()<br>
compute(random_time)<br>
pthread_barrier();<br>
if (thread == 0) {<br>
   MPI_SOMETHING();<br>
}<br>
else {<br>
   MPI_SOMETHING_ELSE();<br>
}<br>
MPI_Helper_team_leave()<br>
<br>
But the following might be valid too (pthread_barrier is gone):<br>
<br>
MPI_Helper_team_join()<br>
compute(random_time)<br>
if (thread == 0) {<br>
   MPI_SOMETHING();<br>
}<br>
else {<br>
   MPI_SOMETHING_ELSE();<br>
}<br>
MPI_Helper_team_leave()<br>
<br>
In the second example, if the MPI implementation internally decides to <br>
synchronize the threads, that's fine, since the application would have <br>
done that anyway. This should be left to the user. The only thing that <br>
will be invalid is:<br>
<br>
MPI_Helper_team_join()<br>
compute(random_time)<br>
if (thread == 0) {<br>
   MPI_SOMETHING();<br>
}<br>
pthread_barrier();<br>
MPI_Helper_team_leave()<br>
<br>
This is invalid because the MPI implementation is expecting to <br>
synchronize with other threads during the MPI_SOMETHING call, but it <br>
can't as all other threads are blocked in pthread_barrier().<br>
<br>
> ...also, wouldn't setting 'singular' to true also imply/force 'balanced'<br>
> to true? It almost seems like we have a three-state value rather than<br>
> two booleans. From strict to weak: (singular), (!singular,balanced),<br>
> (!singular,!balanced). I'm not clear just how much difference there is<br>
> between singular (true) and balanced (true). Maybe we need only 'balanced'?<br>
<br>
Yes, 'singular' is a superset of 'balanced'. I'll point that out. But as <br>
we discussed in the telecon, 'singular' can give more benefit for <br>
implementations as they know that other MPI calls will not be scheduled, <br>
so it's easier to optimize.<br>
<br>
  -- Pavan<br>
<br>
-- <br>
Pavan Balaji<br>
</font></tt><tt><font size="2"><a href="http://www.mcs.anl.gov/~balaji">http://www.mcs.anl.gov/~balaji</a></font></tt><tt><font size="2"><br>
</font></tt><br>
</body></html>