Skip to content

Commit 0f05893

Browse files
author
Ralph Castain
committed
Ensure consistency between max_procs and univ_size values - since orte wants max_procs, have the proc get that value instead of univ_size
Make the singleton module consistent as well
1 parent ec66a6a commit 0f05893

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

orte/mca/ess/pmi/ess_pmi_module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ static int rte_init(void)
154154
}
155155
orte_process_info.my_node_rank = u16;
156156

157-
/* get universe size */
158-
OPAL_MODEX_RECV_VALUE(ret, OPAL_PMIX_UNIV_SIZE,
157+
/* get max procs */
158+
OPAL_MODEX_RECV_VALUE(ret, OPAL_PMIX_MAX_PROCS,
159159
ORTE_PROC_MY_NAME, &u32ptr, OPAL_UINT32);
160160
if (OPAL_SUCCESS != ret) {
161-
error = "getting univ size";
161+
error = "getting max procs";
162162
goto error;
163163
}
164164
orte_process_info.max_procs = u32;

orte/mca/ess/singleton/ess_singleton_module.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,17 @@ static int rte_init(void)
217217
}
218218
orte_process_info.my_node_rank = u16;
219219

220-
/* get universe size */
221-
OPAL_MODEX_RECV_VALUE(ret, OPAL_PMIX_UNIV_SIZE,
220+
/* get max procs */
221+
OPAL_MODEX_RECV_VALUE(ret, OPAL_PMIX_MAX_PROCS,
222222
ORTE_PROC_MY_NAME, &u32ptr, OPAL_UINT32);
223223
if (OPAL_SUCCESS != ret) {
224-
error = "getting univ size";
224+
error = "getting max procs";
225225
goto error;
226226
}
227-
orte_process_info.num_procs = u32;
227+
orte_process_info.max_procs = u32;
228+
229+
/* we are a singleton, so there is only one proc in the job */
230+
orte_process_info.num_procs = 1;
228231
/* push into the environ for pickup in MPI layer for
229232
* MPI-3 required info key
230233
*/

orte/orted/pmix/pmix_server_register_fns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ int orte_pmix_server_register_nspace(orte_job_t *jdata)
296296
kv = OBJ_NEW(opal_value_t);
297297
kv->key = strdup(OPAL_PMIX_UNIV_SIZE);
298298
kv->type = OPAL_UINT32;
299-
kv->data.uint32 = jdata->num_procs;
299+
kv->data.uint32 = jdata->total_slots_alloc;
300300
opal_list_append(info, &kv->super);
301301

302302
/* job size */

0 commit comments

Comments
 (0)