From b65bbe017fb0ad75f26ab1930a1728ffe3a6401d Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Tue, 26 Jul 2016 17:07:58 -0500 Subject: [PATCH] pmix/cray: switch to using wildcards for some items so that at least srun native launch on cray works again. More issues to fix when using alps. Signed-off-by: Howard Pritchard --- opal/mca/pmix/cray/pmix_cray.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/opal/mca/pmix/cray/pmix_cray.c b/opal/mca/pmix/cray/pmix_cray.c index 169d835d549..076fdd3c9c6 100644 --- a/opal/mca/pmix/cray/pmix_cray.c +++ b/opal/mca/pmix/cray/pmix_cray.c @@ -171,6 +171,7 @@ static int cray_init(void) opal_process_name_t ldr; char nmtmp[64]; char *str, **localranks = NULL; + opal_process_name_t name; ++pmix_init_count; @@ -274,12 +275,16 @@ static int cray_init(void) // setup hash table opal_pmix_base_hash_init(); + /* setup a name for retrieving data associated with the job */ + name.jobid = pmix_jobid; + name.vpid = OPAL_VPID_WILDCARD; + /* save the job size */ OBJ_CONSTRUCT(&kv, opal_value_t); kv.key = strdup(OPAL_PMIX_JOB_SIZE); kv.type = OPAL_UINT32; kv.data.uint32 = pmix_size; - if (OPAL_SUCCESS != (rc = opal_pmix_base_store(&OPAL_PROC_MY_NAME, &kv))) { + if (OPAL_SUCCESS != (rc = opal_pmix_base_store(&name, &kv))) { OPAL_ERROR_LOG(rc); OBJ_DESTRUCT(&kv); goto err_exit; @@ -321,8 +326,8 @@ static int cray_init(void) OBJ_CONSTRUCT(&kv, opal_value_t); kv.key = strdup(OPAL_PMIX_MAX_PROCS); kv.type = OPAL_UINT32; - kv.data.uint32 = atoi(buf); - if (OPAL_SUCCESS != (ret = opal_pmix_base_store(&OPAL_PROC_MY_NAME, &kv))) { + kv.data.uint32 = pmix_usize; + if (OPAL_SUCCESS != (ret = opal_pmix_base_store(&name, &kv))) { OPAL_ERROR_LOG(ret); OBJ_DESTRUCT(&kv); goto err_exit; @@ -333,7 +338,7 @@ static int cray_init(void) kv.key = strdup(OPAL_PMIX_JOBID); kv.type = OPAL_UINT32; kv.data.uint32 = pmix_jobid; - if (OPAL_SUCCESS != (ret = opal_pmix_base_store(&OPAL_PROC_MY_NAME, &kv))) { + if (OPAL_SUCCESS != (ret = opal_pmix_base_store(&name, &kv))) { OPAL_ERROR_LOG(ret); OBJ_DESTRUCT(&kv); goto err_exit; @@ -345,7 +350,7 @@ static int cray_init(void) kv.key = strdup(OPAL_PMIX_LOCAL_SIZE); kv.type = OPAL_UINT32; kv.data.uint32 = pmix_nlranks; - if (OPAL_SUCCESS != (rc = opal_pmix_base_store(&OPAL_PROC_MY_NAME, &kv))) { + if (OPAL_SUCCESS != (rc = opal_pmix_base_store(&name, &kv))) { OPAL_ERROR_LOG(rc); OBJ_DESTRUCT(&kv); goto err_exit;