Skip to content

Commit 043051f

Browse files
author
Piotr Lesnicki
committed
PMI2: no initialisation warning when no srun. Hack to have no message in singleton, but may quiet a warning in Cray pmi2.
1 parent bb65c3f commit 043051f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opal/mca/common/pmi/common_pmi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ bool mca_common_pmi_init (void) {
5858
}
5959
/* depending on slurm versions, we may get bad rank/size or bad jobid */
6060
if (size < 0 || rank < 0 || PMI2_SUCCESS != PMI2_Job_GetId(buf, PMI2_MAX_VALLEN)) {
61-
opal_show_help("help-common-pmi.txt", "pmi2-init-returned-bad-values", true);
61+
/* When no srun (singloton) fail quietly */
62+
if (NULL != getenv("SLURM_STEP_NUM_TASKS")) {
63+
opal_show_help("help-common-pmi.txt", "pmi2-init-returned-bad-values", true);
64+
}
6265
mca_common_pmi_init_count--;
6366
return false;
6467
}

0 commit comments

Comments
 (0)