From 573a574a3cf116fea728c79a744fdbd940425724 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Mon, 15 Dec 2014 12:11:13 -0800 Subject: [PATCH] Remove an unused dstore type that was redundant with another one. Define a corresponding PMIX_NODE_ID type (contains the vpid of the daemon hosting the proc) and ensure that the PMIx server includes that info in its process map --- opal/mca/dstore/dstore_types.h | 3 +-- opal/mca/pmix/pmix.h | 2 ++ orte/orted/pmix/pmix_server_sendrecv.c | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/opal/mca/dstore/dstore_types.h b/opal/mca/dstore/dstore_types.h index eada0a47ff..3a957c394a 100644 --- a/opal/mca/dstore/dstore_types.h +++ b/opal/mca/dstore/dstore_types.h @@ -51,6 +51,7 @@ BEGIN_C_DECLS #define OPAL_DSTORE_MAX_PROCS PMIX_MAX_PROCS #define OPAL_DSTORE_NPROC_OFFSET PMIX_NPROC_OFFSET #define OPAL_DSTORE_HOSTNAME PMIX_HOSTNAME +#define OPAL_DSTORE_NODEID PMIX_NODE_ID /* some OPAL-appropriate key definitions */ #define OPAL_DSTORE_LOCALITY "opal.locality" // (uint16_t) relative locality of a peer @@ -59,8 +60,6 @@ BEGIN_C_DECLS #define OPAL_DSTORE_MY_SDIR "opal.my.session.dir" // (char*) session dir for this proc #define OPAL_DSTORE_URI "opal.uri" // (char*) uri of specified proc #define OPAL_DSTORE_ARCH "opal.arch" // (uint32_t) arch for specified proc -#define OPAL_DSTORE_HOSTID "opal.hostid" // (uint32_t) hostid of specified proc -#define OPAL_DSTORE_NODEID "opal.nodeid" // (uint32_t) nodeid of specified proc END_C_DECLS diff --git a/opal/mca/pmix/pmix.h b/opal/mca/pmix/pmix.h index 7f971d1840..6765b6b45d 100644 --- a/opal/mca/pmix/pmix.h +++ b/opal/mca/pmix/pmix.h @@ -93,6 +93,8 @@ typedef void (*opal_pmix_cbfunc_t)(int status, opal_value_t *kv, void *cbdata); #define PMIX_NODE_RANK "pmix.nrank" // (uint16_t) rank on this node spanning all jobs #define PMIX_LOCALLDR "pmix.lldr" // (uint64_t) opal_identifier of lowest rank on this node within this job #define PMIX_APPLDR "pmix.aldr" // (uint32_t) lowest rank in this app within this job +#define PMIX_NODE_ID "pmix.nodeid" // (uint32_t) vpid of daemon hosting specified proc + /* proc location-related info */ #define PMIX_PROC_MAP "pmix.map" // (byte_object) packed map of proc locations within this job #define PMIX_LOCAL_PEERS "pmix.lpeers" // (char*) comma-delimited string of ranks on this node within this job diff --git a/orte/orted/pmix/pmix_server_sendrecv.c b/orte/orted/pmix/pmix_server_sendrecv.c index 7887430a3a..32c8951c4a 100644 --- a/orte/orted/pmix/pmix_server_sendrecv.c +++ b/orte/orted/pmix/pmix_server_sendrecv.c @@ -494,6 +494,17 @@ static int stuff_proc_values(opal_buffer_t *reply, orte_job_t *jdata, orte_proc_ return rc; } OBJ_DESTRUCT(&kv); + /* node id */ + OBJ_CONSTRUCT(&kv, opal_value_t); + kv.key = strdup(PMIX_NODE_ID); + kv.type = OPAL_UINT32; + kv.data.uint32 = pptr->node->daemon->name.vpid; + if (OPAL_SUCCESS != (rc = opal_dss.pack(&buf2, &kp, 1, OPAL_VALUE))) { + ORTE_ERROR_LOG(rc); + OBJ_DESTRUCT(&kv); + return rc; + } + OBJ_DESTRUCT(&kv); /* add the rank's blob */ OBJ_CONSTRUCT(&kv, opal_value_t); kv.key = strdup(PMIX_PROC_MAP);