diff --git a/.gitignore b/.gitignore index 7b5a5d63ec..3813d452db 100644 --- a/.gitignore +++ b/.gitignore @@ -249,6 +249,7 @@ ompi/mpiext/example/tests/progress_usempif08 ompi/mpiext/cuda/c/MPIX_Query_cuda_support.3 ompi/mpiext/cuda/c/mpiext_cuda_c.h +ompi/mpiext/cuda/c/cuda_c.h ompi/mpiext/pcollreq/c/MPIX_*.3 ompi/mpiext/pcollreq/c/profile/pallgather_init.c @@ -274,6 +275,7 @@ ompi/mpiext/pcollreq/c/profile/preduce_scatter_init.c ompi/mpiext/pcollreq/c/profile/pscan_init.c ompi/mpiext/pcollreq/c/profile/pscatter_init.c ompi/mpiext/pcollreq/c/profile/pscatterv_init.c +ompi/mpiext/pcollreq/c/profile/ppcollreq_c.h ompi/mpiext/pcollreq/mpif-h/profile/pallgather_init_f.c ompi/mpiext/pcollreq/mpif-h/profile/pallgatherv_init_f.c diff --git a/opal/mca/pmix/pmix_types.h b/opal/mca/pmix/pmix_types.h index ccf2171248..84deaf8e76 100644 --- a/opal/mca/pmix/pmix_types.h +++ b/opal/mca/pmix/pmix_types.h @@ -89,6 +89,8 @@ BEGIN_C_DECLS #define OPAL_PMIX_VERSION_INFO "pmix.version" // (char*) PMIx version of contactor #define OPAL_PMIX_REQUESTOR_IS_TOOL "pmix.req.tool" // (bool) requesting process is a tool #define OPAL_PMIX_REQUESTOR_IS_CLIENT "pmix.req.client" // (bool) requesting process is a client process +#define OPAL_PMIX_PSET_NAME "pmix.pset.nm" // (char*) user-assigned name for the process + // set containing the given process /* model attributes */ #define OPAL_PMIX_PROGRAMMING_MODEL "pmix.pgm.model" // (char*) programming model being initialized (e.g., "MPI" or "OpenMP") diff --git a/orte/orted/orted_submit.c b/orte/orted/orted_submit.c index 374775c90a..3e74eb7206 100644 --- a/orte/orted/orted_submit.c +++ b/orte/orted/orted_submit.c @@ -1620,6 +1620,12 @@ static int create_app(int argc, char* argv[], } } + /* if they specified a process set name, then pass it along */ + if (NULL != orte_cmd_options.pset) { + orte_set_attribute(&app->attributes, ORTE_APP_PSET_NAME, ORTE_ATTR_GLOBAL, + orte_cmd_options.pset, OPAL_STRING); + } + /* Did the user specify a hostfile. Need to check for both * hostfile and machine file. * We can only deal with one hostfile per app context, otherwise give an error. diff --git a/orte/orted/orted_submit.h b/orte/orted/orted_submit.h index e325a0a04f..873747697a 100644 --- a/orte/orted/orted_submit.h +++ b/orte/orted/orted_submit.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2017 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2018 Intel, Inc. All rights reserved. * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -98,6 +98,7 @@ struct orte_cmd_options_t { int timeout; bool report_state_on_timeout; bool get_stack_traces; + char *pset; }; typedef struct orte_cmd_options_t orte_cmd_options_t; ORTE_DECLSPEC extern orte_cmd_options_t orte_cmd_options; diff --git a/orte/orted/pmix/pmix_server_dyn.c b/orte/orted/pmix/pmix_server_dyn.c index a2f18c4532..259d719132 100644 --- a/orte/orted/pmix/pmix_server_dyn.c +++ b/orte/orted/pmix/pmix_server_dyn.c @@ -264,6 +264,9 @@ int pmix_server_spawn_fn(opal_process_name_t *requestor, } else if (0 == strcmp(info->key, OPAL_PMIX_APPEND_ENVAR)) { orte_add_attribute(&app->attributes, ORTE_APP_APPEND_ENVAR, ORTE_ATTR_GLOBAL, &info->data.envar, OPAL_ENVAR); + } else if (0 == strcmp(info->key, OPAL_PMIX_PSET_NAME)) { + orte_set_attribute(&app->attributes, ORTE_APP_PSET_NAME, + ORTE_ATTR_GLOBAL, info->data.string, OPAL_STRING); } else { /* unrecognized key */ diff --git a/orte/orted/pmix/pmix_server_register_fns.c b/orte/orted/pmix/pmix_server_register_fns.c index 395d89e07f..a5670539db 100644 --- a/orte/orted/pmix/pmix_server_register_fns.c +++ b/orte/orted/pmix/pmix_server_register_fns.c @@ -430,6 +430,28 @@ int orte_pmix_server_register_nspace(orte_job_t *jdata, bool force) kv->type = OPAL_UINT32; kv->data.uint32 = app->num_procs; opal_list_append(info, &kv->super); + + app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, pptr->app_idx); + tmp = NULL; + if (orte_get_attribute(&app->attributes, ORTE_APP_PSET_NAME, (void**)&tmp, OPAL_STRING) && + NULL != tmp) { + kv = OBJ_NEW(opal_value_t); + kv->key = strdup(OPAL_PMIX_PSET_NAME); + kv->type = OPAL_STRING; + kv->data.string = tmp; + opal_list_append(pmap, &kv->super); + } + } else { + app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, 0); + tmp = NULL; + if (orte_get_attribute(&app->attributes, ORTE_APP_PSET_NAME, (void**)&tmp, OPAL_STRING) && + NULL != tmp) { + kv = OBJ_NEW(opal_value_t); + kv->key = strdup(OPAL_PMIX_PSET_NAME); + kv->type = OPAL_STRING; + kv->data.string = tmp; + opal_list_append(pmap, &kv->super); + } } /* local rank */ diff --git a/orte/util/attr.c b/orte/util/attr.c index 483018e922..0e42a90f8c 100644 --- a/orte/util/attr.c +++ b/orte/util/attr.c @@ -252,6 +252,8 @@ const char *orte_attr_key_to_str(orte_attribute_key_t key) return "ORTE_APP_APPEND_ENVAR"; case ORTE_APP_ADD_ENVAR: return "ORTE_APP_ADD_ENVAR"; + case ORTE_APP_PSET_NAME: + return "ORTE_APP_PSET_NAME"; case ORTE_NODE_USERNAME: return "NODE-USERNAME"; diff --git a/orte/util/attr.h b/orte/util/attr.h index 621b577f04..c8d2219993 100644 --- a/orte/util/attr.h +++ b/orte/util/attr.h @@ -52,6 +52,8 @@ typedef uint8_t orte_app_context_flags_t; #define ORTE_APP_PREPEND_ENVAR 19 // opal_envar_t - prepend the specified value to the given envar #define ORTE_APP_APPEND_ENVAR 20 // opal_envar_t - append the specified value to the given envar #define ORTE_APP_ADD_ENVAR 21 // opal_envar_t - add envar, do not override pre-existing one +#define ORTE_APP_PSET_NAME 23 // string - user-assigned name for the process + // set containing the given process #define ORTE_APP_MAX_KEY 100