Changeset 3865
- Timestamp:
- 02/16/09 17:47:16 (16 hours ago)
- Files:
-
- mpich2/trunk/src/mpi/comm/commutil.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
mpich2/trunk/src/mpi/comm/commutil.c
r3837 r3865 284 284 if (num_external == comm->remote_size) { 285 285 MPIU_Assert(num_local == 1); 286 goto fn_ fail;286 goto fn_exit; 287 287 } 288 288 … … 388 388 } 389 389 390 /* Returns true if the processes in all the nodes are consecutive. For example,391 if node 0 contains "0, 1, 2, 3", node 1 contains "4, 5, 6", and node 2392 contains " 7", we shall return true. */390 /* Returns true if the communicator is node-aware and processes in all the nodes 391 are consecutive. For example, if node 0 contains "0, 1, 2, 3", node 1 392 contains "4, 5, 6", and node 2 contains "7", we shall return true. */ 393 393 int MPIR_Comm_is_node_consecutive(MPID_Comm * comm) 394 394 { 395 if (comm->is_node_aware) 395 int i = 0, curr_nodeidx = 0; 396 int *internode_table = comm->internode_table; 397 398 if (!comm->is_node_aware) 399 return 0; 400 401 for (; i < comm->local_size; i++) 396 402 { 397 int i = 0, curr_nodeidx = 0; 398 int *internode_table = comm->internode_table; 399 for (; i < comm->local_size; i++) 400 { 401 if (internode_table[i] == curr_nodeidx + 1) 402 curr_nodeidx++; 403 else if (internode_table[i] != curr_nodeidx) 404 return 0; 405 } 406 } 403 if (internode_table[i] == curr_nodeidx + 1) 404 curr_nodeidx++; 405 else if (internode_table[i] != curr_nodeidx) 406 return 0; 407 } 408 407 409 return 1; 408 410 }