Skip to content

Commit b65bbe0

Browse files
committed
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 <[email protected]>
1 parent 292563f commit b65bbe0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

opal/mca/pmix/cray/pmix_cray.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ static int cray_init(void)
171171
opal_process_name_t ldr;
172172
char nmtmp[64];
173173
char *str, **localranks = NULL;
174+
opal_process_name_t name;
174175

175176
++pmix_init_count;
176177

@@ -274,12 +275,16 @@ static int cray_init(void)
274275
// setup hash table
275276
opal_pmix_base_hash_init();
276277

278+
/* setup a name for retrieving data associated with the job */
279+
name.jobid = pmix_jobid;
280+
name.vpid = OPAL_VPID_WILDCARD;
281+
277282
/* save the job size */
278283
OBJ_CONSTRUCT(&kv, opal_value_t);
279284
kv.key = strdup(OPAL_PMIX_JOB_SIZE);
280285
kv.type = OPAL_UINT32;
281286
kv.data.uint32 = pmix_size;
282-
if (OPAL_SUCCESS != (rc = opal_pmix_base_store(&OPAL_PROC_MY_NAME, &kv))) {
287+
if (OPAL_SUCCESS != (rc = opal_pmix_base_store(&name, &kv))) {
283288
OPAL_ERROR_LOG(rc);
284289
OBJ_DESTRUCT(&kv);
285290
goto err_exit;
@@ -321,8 +326,8 @@ static int cray_init(void)
321326
OBJ_CONSTRUCT(&kv, opal_value_t);
322327
kv.key = strdup(OPAL_PMIX_MAX_PROCS);
323328
kv.type = OPAL_UINT32;
324-
kv.data.uint32 = atoi(buf);
325-
if (OPAL_SUCCESS != (ret = opal_pmix_base_store(&OPAL_PROC_MY_NAME, &kv))) {
329+
kv.data.uint32 = pmix_usize;
330+
if (OPAL_SUCCESS != (ret = opal_pmix_base_store(&name, &kv))) {
326331
OPAL_ERROR_LOG(ret);
327332
OBJ_DESTRUCT(&kv);
328333
goto err_exit;
@@ -333,7 +338,7 @@ static int cray_init(void)
333338
kv.key = strdup(OPAL_PMIX_JOBID);
334339
kv.type = OPAL_UINT32;
335340
kv.data.uint32 = pmix_jobid;
336-
if (OPAL_SUCCESS != (ret = opal_pmix_base_store(&OPAL_PROC_MY_NAME, &kv))) {
341+
if (OPAL_SUCCESS != (ret = opal_pmix_base_store(&name, &kv))) {
337342
OPAL_ERROR_LOG(ret);
338343
OBJ_DESTRUCT(&kv);
339344
goto err_exit;
@@ -345,7 +350,7 @@ static int cray_init(void)
345350
kv.key = strdup(OPAL_PMIX_LOCAL_SIZE);
346351
kv.type = OPAL_UINT32;
347352
kv.data.uint32 = pmix_nlranks;
348-
if (OPAL_SUCCESS != (rc = opal_pmix_base_store(&OPAL_PROC_MY_NAME, &kv))) {
353+
if (OPAL_SUCCESS != (rc = opal_pmix_base_store(&name, &kv))) {
349354
OPAL_ERROR_LOG(rc);
350355
OBJ_DESTRUCT(&kv);
351356
goto err_exit;

0 commit comments

Comments
 (0)