From edccb258cbe6d004e7a04ebe5f1d856606667aad Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 9 Aug 2017 11:34:43 -0700 Subject: [PATCH] Provide the mapping, ranking, binding patterns Apps might want to make use of the relative patterns used to place/assign their procs Signed-off-by: Ralph Castain --- orte/orted/pmix/pmix_server_register_fns.c | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/orte/orted/pmix/pmix_server_register_fns.c b/orte/orted/pmix/pmix_server_register_fns.c index 35761aa3c8..ca86573f19 100644 --- a/orte/orted/pmix/pmix_server_register_fns.c +++ b/orte/orted/pmix/pmix_server_register_fns.c @@ -45,7 +45,7 @@ #include "orte/runtime/orte_globals.h" #include "orte/runtime/orte_wait.h" #include "orte/mca/errmgr/errmgr.h" -#include "orte/mca/rmaps/rmaps_types.h" +#include "orte/mca/rmaps/base/base.h" #include "pmix_server_internal.h" #include "pmix_server.h" @@ -264,6 +264,29 @@ int orte_pmix_server_register_nspace(orte_job_t *jdata, bool force) opal_list_append(info, &kv->super); } + /* pass the mapping policy used for this job */ + kv = OBJ_NEW(opal_value_t); + kv->key = strdup(OPAL_PMIX_MAPBY); + kv->type = OPAL_STRING; + kv->data.string = strdup(orte_rmaps_base_print_mapping(jdata->map->mapping)); + opal_list_append(info, &kv->super); + + /* pass the ranking policy used for this job */ + kv = OBJ_NEW(opal_value_t); + kv->key = strdup(OPAL_PMIX_RANKBY); + kv->type = OPAL_STRING; + kv->data.string = strdup(orte_rmaps_base_print_ranking(jdata->map->ranking)); + opal_list_append(info, &kv->super); + + /* pass the binding policy used for this job */ + kv = OBJ_NEW(opal_value_t); + kv->key = strdup(OPAL_PMIX_BINDTO); + kv->type = OPAL_STRING; + kv->data.string = strdup(opal_hwloc_base_print_binding(jdata->map->binding)); + opal_list_append(info, &kv->super); + + + /* register any local clients */ vpid = ORTE_VPID_MAX; micro = NULL;