Skip to content

Commit 52c455f

Browse files
author
Ralph Castain
authored
Merge pull request #6125 from rhc54/topic/pset
Support process set names and update ignores
2 parents 5ebcbe4 + 791bf3c commit 52c455f

File tree

8 files changed

+41
-1
lines changed

8 files changed

+41
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ ompi/mpiext/example/tests/progress_usempif08
249249

250250
ompi/mpiext/cuda/c/MPIX_Query_cuda_support.3
251251
ompi/mpiext/cuda/c/mpiext_cuda_c.h
252+
ompi/mpiext/cuda/c/cuda_c.h
252253

253254
ompi/mpiext/pcollreq/c/MPIX_*.3
254255
ompi/mpiext/pcollreq/c/profile/pallgather_init.c
@@ -274,6 +275,7 @@ ompi/mpiext/pcollreq/c/profile/preduce_scatter_init.c
274275
ompi/mpiext/pcollreq/c/profile/pscan_init.c
275276
ompi/mpiext/pcollreq/c/profile/pscatter_init.c
276277
ompi/mpiext/pcollreq/c/profile/pscatterv_init.c
278+
ompi/mpiext/pcollreq/c/profile/ppcollreq_c.h
277279

278280
ompi/mpiext/pcollreq/mpif-h/profile/pallgather_init_f.c
279281
ompi/mpiext/pcollreq/mpif-h/profile/pallgatherv_init_f.c

opal/mca/pmix/pmix_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ BEGIN_C_DECLS
8989
#define OPAL_PMIX_VERSION_INFO "pmix.version" // (char*) PMIx version of contactor
9090
#define OPAL_PMIX_REQUESTOR_IS_TOOL "pmix.req.tool" // (bool) requesting process is a tool
9191
#define OPAL_PMIX_REQUESTOR_IS_CLIENT "pmix.req.client" // (bool) requesting process is a client process
92+
#define OPAL_PMIX_PSET_NAME "pmix.pset.nm" // (char*) user-assigned name for the process
93+
// set containing the given process
9294

9395
/* model attributes */
9496
#define OPAL_PMIX_PROGRAMMING_MODEL "pmix.pgm.model" // (char*) programming model being initialized (e.g., "MPI" or "OpenMP")

orte/orted/orted_submit.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,12 @@ static int create_app(int argc, char* argv[],
16201620
}
16211621
}
16221622

1623+
/* if they specified a process set name, then pass it along */
1624+
if (NULL != orte_cmd_options.pset) {
1625+
orte_set_attribute(&app->attributes, ORTE_APP_PSET_NAME, ORTE_ATTR_GLOBAL,
1626+
orte_cmd_options.pset, OPAL_STRING);
1627+
}
1628+
16231629
/* Did the user specify a hostfile. Need to check for both
16241630
* hostfile and machine file.
16251631
* We can only deal with one hostfile per app context, otherwise give an error.

orte/orted/orted_submit.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
2+
* Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
33
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
44
* Copyright (c) 2017 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
@@ -98,6 +98,7 @@ struct orte_cmd_options_t {
9898
int timeout;
9999
bool report_state_on_timeout;
100100
bool get_stack_traces;
101+
char *pset;
101102
};
102103
typedef struct orte_cmd_options_t orte_cmd_options_t;
103104
ORTE_DECLSPEC extern orte_cmd_options_t orte_cmd_options;

orte/orted/pmix/pmix_server_dyn.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ int pmix_server_spawn_fn(opal_process_name_t *requestor,
264264
} else if (0 == strcmp(info->key, OPAL_PMIX_APPEND_ENVAR)) {
265265
orte_add_attribute(&app->attributes, ORTE_APP_APPEND_ENVAR,
266266
ORTE_ATTR_GLOBAL, &info->data.envar, OPAL_ENVAR);
267+
} else if (0 == strcmp(info->key, OPAL_PMIX_PSET_NAME)) {
268+
orte_set_attribute(&app->attributes, ORTE_APP_PSET_NAME,
269+
ORTE_ATTR_GLOBAL, info->data.string, OPAL_STRING);
267270

268271
} else {
269272
/* unrecognized key */

orte/orted/pmix/pmix_server_register_fns.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,28 @@ int orte_pmix_server_register_nspace(orte_job_t *jdata, bool force)
430430
kv->type = OPAL_UINT32;
431431
kv->data.uint32 = app->num_procs;
432432
opal_list_append(info, &kv->super);
433+
434+
app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, pptr->app_idx);
435+
tmp = NULL;
436+
if (orte_get_attribute(&app->attributes, ORTE_APP_PSET_NAME, (void**)&tmp, OPAL_STRING) &&
437+
NULL != tmp) {
438+
kv = OBJ_NEW(opal_value_t);
439+
kv->key = strdup(OPAL_PMIX_PSET_NAME);
440+
kv->type = OPAL_STRING;
441+
kv->data.string = tmp;
442+
opal_list_append(pmap, &kv->super);
443+
}
444+
} else {
445+
app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, 0);
446+
tmp = NULL;
447+
if (orte_get_attribute(&app->attributes, ORTE_APP_PSET_NAME, (void**)&tmp, OPAL_STRING) &&
448+
NULL != tmp) {
449+
kv = OBJ_NEW(opal_value_t);
450+
kv->key = strdup(OPAL_PMIX_PSET_NAME);
451+
kv->type = OPAL_STRING;
452+
kv->data.string = tmp;
453+
opal_list_append(pmap, &kv->super);
454+
}
433455
}
434456

435457
/* local rank */

orte/util/attr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ const char *orte_attr_key_to_str(orte_attribute_key_t key)
252252
return "ORTE_APP_APPEND_ENVAR";
253253
case ORTE_APP_ADD_ENVAR:
254254
return "ORTE_APP_ADD_ENVAR";
255+
case ORTE_APP_PSET_NAME:
256+
return "ORTE_APP_PSET_NAME";
255257

256258
case ORTE_NODE_USERNAME:
257259
return "NODE-USERNAME";

orte/util/attr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ typedef uint8_t orte_app_context_flags_t;
5252
#define ORTE_APP_PREPEND_ENVAR 19 // opal_envar_t - prepend the specified value to the given envar
5353
#define ORTE_APP_APPEND_ENVAR 20 // opal_envar_t - append the specified value to the given envar
5454
#define ORTE_APP_ADD_ENVAR 21 // opal_envar_t - add envar, do not override pre-existing one
55+
#define ORTE_APP_PSET_NAME 23 // string - user-assigned name for the process
56+
// set containing the given process
5557

5658
#define ORTE_APP_MAX_KEY 100
5759

0 commit comments

Comments
 (0)