File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -194,12 +194,14 @@ int orte_util_add_dash_host_nodes(opal_list_t *nodes,
194
194
if (NULL != (cptr = strchr (mini_map [i ], ':' ))) {
195
195
* cptr = '\0' ;
196
196
++ cptr ;
197
- if ('*' == * cptr ) {
198
- slots = 0 ;
197
+ if ('*' == * cptr || 0 == strcmp (cptr , "auto" )) {
198
+ /* auto-detect #slots */
199
+ slots = -1 ;
200
+ slots_given = false;
199
201
} else {
200
202
slots = strtol (cptr , NULL , 10 );
203
+ slots_given = true;
201
204
}
202
- slots_given = true;
203
205
}
204
206
205
207
/* check for local name */
@@ -257,6 +259,9 @@ int orte_util_add_dash_host_nodes(opal_list_t *nodes,
257
259
if (0 < slots ) {
258
260
ORTE_FLAG_SET (node , ORTE_NODE_FLAG_SLOTS_GIVEN );
259
261
}
262
+ } else if (slots < 0 ) {
263
+ node -> slots = 0 ;
264
+ ORTE_FLAG_UNSET (node , ORTE_NODE_FLAG_SLOTS_GIVEN );
260
265
} else {
261
266
node -> slots = 1 ;
262
267
ORTE_FLAG_SET (node , ORTE_NODE_FLAG_SLOTS_GIVEN );
You can’t perform that action at this time.
0 commit comments