Skip to content

Commit 57114a0

Browse files
author
Ralph Castain
committed
Pickup the npernode and npersocket options and include them in the job object
1 parent 1e31911 commit 57114a0

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

orte/mca/schizo/ompi/schizo_ompi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,13 @@ static opal_cmd_line_init_t cmd_line_init[] = {
275275
* available - included for backwards compatibility
276276
*/
277277
{ "rmaps_ppr_pernode", '\0', "pernode", "pernode", 0,
278-
NULL, OPAL_CMD_LINE_TYPE_BOOL,
278+
&orte_cmd_options.pernode, OPAL_CMD_LINE_TYPE_BOOL,
279279
"Launch one process per available node" },
280280
{ "rmaps_ppr_n_pernode", '\0', "npernode", "npernode", 1,
281-
NULL, OPAL_CMD_LINE_TYPE_INT,
281+
&orte_cmd_options.npernode, OPAL_CMD_LINE_TYPE_INT,
282282
"Launch n processes per node on all allocated nodes" },
283283
{ "rmaps_ppr_n_pernode", '\0', "N", NULL, 1,
284-
NULL, OPAL_CMD_LINE_TYPE_INT,
284+
&orte_cmd_options.npernode, OPAL_CMD_LINE_TYPE_INT,
285285
"Launch n processes per node on all allocated nodes (synonym for npernode)" },
286286

287287
/* declare hardware threads as independent cpus */
@@ -291,7 +291,7 @@ static opal_cmd_line_init_t cmd_line_init[] = {
291291

292292
/* include npersocket for backwards compatibility */
293293
{ "rmaps_ppr_n_persocket", '\0', "npersocket", "npersocket", 1,
294-
NULL, OPAL_CMD_LINE_TYPE_INT,
294+
&orte_cmd_options.npersocket, OPAL_CMD_LINE_TYPE_INT,
295295
"Launch n processes per socket on all allocated nodes" },
296296

297297
/* Mapping options */

orte/orted/orted_submit.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,14 @@ int orte_submit_job(char *argv[], int *index,
803803
ORTE_SET_MAPPING_DIRECTIVE(jdata->map->mapping, ORTE_MAPPING_GIVEN);
804804
/* define the ppr */
805805
(void)asprintf(&jdata->map->ppr, "%d:node", orte_cmd_options.npernode);
806+
} else if (0 < orte_cmd_options.npersocket) {
807+
ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_PPR);
808+
ORTE_SET_MAPPING_DIRECTIVE(jdata->map->mapping, ORTE_MAPPING_GIVEN);
809+
/* define the ppr */
810+
(void)asprintf(&jdata->map->ppr, "%d:socket", orte_cmd_options.npersocket);
806811
}
807812

813+
808814
/* if the user specified cpus/rank, set it */
809815
if (0 < orte_cmd_options.cpus_per_proc) {
810816
jdata->map->cpus_per_rank = orte_cmd_options.cpus_per_proc;

0 commit comments

Comments
 (0)