mpir/pmi: protect 3rd-party pmi from job attributes

Define macro PMI_FROM_3RD_PARTY if linked with a 3rd party pmi
library such as cray, Slurm, and openpmix. They often run into issues
when quieried with nonexistent job attribute keys such as
PMI_process_mapping, PMI_hwloc_pmi, etc.

We have a few patches recently to workaround openpmix with non-existent
job attributes.

Cray PMI used to work, but we encountered a hang with PALS v1.3.4.

This commit skips querying these keys as job attributes to bypass these
potential issues. They are often not supported by 3rd party pmi anyway.
Esse commit está contido em:
Hui Zhou
2024-10-06 21:36:40 -05:00
commit de Ken Raffenetti
commit 7a5f0f9d39
2 arquivos alterados com 8 adições e 0 exclusões
+1
Ver Arquivo
@@ -1661,6 +1661,7 @@ elif test "$with_pmilib" = "default" -o "$with_pmilib" = "mpich" -o "$with_pmili
fi
if test "$pac_3rd_party_pmi" = "yes" ; then
AC_DEFINE([PMI_FROM_3RD_PARTY], 1, [define if PMI is supplied from 3rd party (thus we should limit usage of MPICH extensions)])
# detect
PAC_PUSH_FLAG([LIBS])
LIBS=$WRAPPER_LIBS
+7
Ver Arquivo
@@ -315,6 +315,13 @@ int MPIR_pmi_kvs_parent_get(const char *key, char *val, int val_size)
char *MPIR_pmi_get_jobattr(const char *key)
{
char *valbuf = NULL;
#ifdef PMI_FROM_3RD_PARTY
/* assume 3rd party pmi (e.g. Cray, Slurm, OpenPMIx) does not support special keys */
/* FIXME: add exceptions such as PMI_process_mapping */
goto fn_exit;
#endif
valbuf = MPL_malloc(pmi_max_val_size, MPL_MEM_OTHER);
if (!valbuf) {
goto fn_exit;