From 16e52c57843514a9016031a0d07768e60a68e30b Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 17 Oct 2006 00:43:12 +0000 Subject: [PATCH] Fix a non-compliance issue regarding hostfiles as reported by Sun. The man page states that an entry that specifies slots_max but does not specify "slots" will have the soft limit default to the hard limit. The hostfile implementation, however, defaulted the soft limit to 1. This fix changes that behavior to conform to the man page. This commit was SVN r12129. --- orte/mca/rds/hostfile/rds_hostfile.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/orte/mca/rds/hostfile/rds_hostfile.c b/orte/mca/rds/hostfile/rds_hostfile.c index c27154c2d2..673211cc8e 100644 --- a/orte/mca/rds/hostfile/rds_hostfile.c +++ b/orte/mca/rds/hostfile/rds_hostfile.c @@ -126,6 +126,7 @@ static int orte_rds_hostfile_parse_line(int token, opal_list_t* existing, opal_l orte_ras_node_t* node; bool update = false; bool got_count = false; + bool got_max = false; if (ORTE_RDS_HOSTFILE_STRING == token || ORTE_RDS_HOSTFILE_HOSTNAME == token || @@ -265,6 +266,7 @@ static int orte_rds_hostfile_parse_line(int token, opal_list_t* existing, opal_l if (node->node_slots_max != rc) { node->node_slots_max = rc; update = true; + got_max = true; } } else { opal_show_help("help-rds-hostfile.txt", "rds:max_slots_lt", @@ -286,7 +288,11 @@ static int orte_rds_hostfile_parse_line(int token, opal_list_t* existing, opal_l done: if (update) { if (!got_count) { - ++node->node_slots; + if (got_max) { + node->node_slots = node->node_slots_max; + } else { + ++node->node_slots; + } } opal_list_append(updates, &node->super); } else {