[mpich2-commits] r6757 - mpich2/trunk/src/mpid/ch3/src
buntinas at mcs.anl.gov
buntinas at mcs.anl.gov
Fri May 28 15:10:43 CDT 2010
Author: buntinas
Date: 2010-05-28 15:10:43 -0500 (Fri, 28 May 2010)
New Revision: 6757
Modified:
mpich2/trunk/src/mpid/ch3/src/mpidi_pg.c
Log:
added code, based on a suggestion from Howard, to stagger the starting points of the close protocol, so that everyone doesn't send close messages to the same process at the same time
Modified: mpich2/trunk/src/mpid/ch3/src/mpidi_pg.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/src/mpidi_pg.c 2010-05-28 15:35:31 UTC (rev 6756)
+++ mpich2/trunk/src/mpid/ch3/src/mpidi_pg.c 2010-05-28 20:10:43 UTC (rev 6757)
@@ -1167,15 +1167,21 @@
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_PG_CLOSE_VCS);
while (pg) {
- int i, inuse;
+ int i, inuse, n, i_start;
MPIU_DBG_MSG_S(CH3_DISCONNECT,VERBOSE,"Closing vcs for pg %s",
(char *)pg->id );
-
- for (i = 0; i < pg->size; i++)
+ /* We want to reduce the chance of having all processes send
+ close requests to the same process at once. We do this by
+ having processes start at different indices, namely
+ (my_pg_rank+1) mod pg->size. */
+ i_start = (MPIDI_Process.my_pg_rank+1) % pg->size;
+ for (n = 0; n < pg->size; n++)
{
- MPIDI_VC_t * vc = &pg->vct[i];
+ MPIDI_VC_t * vc;
+ i = (n + i_start) % pg->size;
+ vc = &pg->vct[i];
/* If the VC is myself then skip the close message */
if (pg == MPIDI_Process.my_pg && i == MPIDI_Process.my_pg_rank) {
/* XXX DJG FIXME-MT should we be checking this? */
More information about the mpich2-commits
mailing list