From f8fa8f49358dd037b84bcb23a10235b0bd1563bc Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 8 Aug 2005 18:56:17 +0000 Subject: [PATCH] Fix a problem found by Tim Prins (patch also supplied by Tim P). From his e-mail: I ran into a small bug in rmaps_rr.c: map_app_by_slot which was triggered by using multiple app contexts. Basically, if not all the slots we allocated on a node were used by an app, we would automatically move onto the next node. This caused a problem with multiple app contexts when the first app takes a partial allocation of a node, the second app would not be able to access these slots because we had already move past the node, and the byslot routine does not wrap back around the list. This commit was SVN r6766. --- orte/mca/rmaps/round_robin/rmaps_rr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/orte/mca/rmaps/round_robin/rmaps_rr.c b/orte/mca/rmaps/round_robin/rmaps_rr.c index 90c835cd1f..43c26bf6e2 100644 --- a/orte/mca/rmaps/round_robin/rmaps_rr.c +++ b/orte/mca/rmaps/round_robin/rmaps_rr.c @@ -261,11 +261,12 @@ static int map_app_by_slot( if (node->node_slots_alloc == 0) { opal_list_remove_item(nodes, (opal_list_item_t*)node); OBJ_RELEASE(node); + + /* Move on to the next node since we have allocated all of + this node's slots */ + + cur_node_item = next; } - - /* Move on to the next node */ - - cur_node_item = next; } /* Did we allocate everything? */