diff --git a/config/prte_setup_pmix.m4 b/config/prte_setup_pmix.m4 index 321c5ff8ce..9e0acdcd46 100644 --- a/config/prte_setup_pmix.m4 +++ b/config/prte_setup_pmix.m4 @@ -120,6 +120,10 @@ AC_DEFUN([PRTE_CHECK_PMIX],[ PRTE_FLAGS_APPEND_UNIQ(PRTE_FINAL_LDFLAGS, $prte_pmix_LDFLAGS) PRTE_FLAGS_APPEND_UNIQ(PRTE_FINAL_LIBS, $prte_pmix_LIBS) + AC_DEFINE_UNQUOTED([PRTE_PMIX_MINIMUM_VERSION], + [$prte_pmix_min_num_version], + [Minimum supported PMIx version]) + found_pmixcc=0 PMIXCC_PATH="pmixcc" AS_IF([test -n "${with_pmix}"], diff --git a/src/docs/show-help-files/help-prted.rst b/src/docs/show-help-files/help-prted.rst index 4012549155..2bb7407e15 100644 --- a/src/docs/show-help-files/help-prted.rst +++ b/src/docs/show-help-files/help-prted.rst @@ -275,15 +275,15 @@ is alive: [mpir-debugger-detected] -PRTE has detected that you have attached a debugger to this MPI +PRRTE has detected that you have attached a debugger to this MPI job, and that debugger is using the legacy "MPIR" method of attachment. -Please note that PRTE has deprecated the "MPIR" debugger +Please note that PRRTE has deprecated the "MPIR" debugger attachment method in favor of the new "PMIx" debugger attchment mechanisms. -.. warning:: This means that future versions of PRTE may not support +.. warning:: This means that future versions of PRRTE may not support the "MPIR" debugger attachment method at all. Specifically: the debugger you just attached may not work with future versions of PRTE. @@ -305,3 +305,14 @@ set: Only one of these can be set |mdash| please fix the options and try again. + +[min-pmix-violation] + +PRRTE has detected that the PMIx library being used to run this +executable does not meet the minimum supported version: + + Min PMIx version: %0x + Detected version: %0x + +Please check your LD_LIBRARY_PATH and ensure we are pointed to +a version that meets the minimum requirement. diff --git a/src/prted/pmix/pmix_server.c b/src/prted/pmix/pmix_server.c index 54c9ceee89..9f2db9ce9d 100644 --- a/src/prted/pmix/pmix_server.c +++ b/src/prted/pmix/pmix_server.c @@ -568,6 +568,7 @@ int pmix_server_init(void) pmix_data_array_t darray; pmix_info_t *info, myinf; size_t n, ninfo; + pmix_value_t *val; char *tmp; pmix_status_t prc; prte_pmix_lock_t lock; @@ -829,6 +830,24 @@ int pmix_server_init(void) PMIX_INFO_FREE(info, ninfo); rc = PRTE_SUCCESS; +#ifdef PMIX_VERSION_NUMERIC + /* find out what version of PMIx is being used - note that + * it is NOT an error to not be able to retrieve this + * value as it just means the PMIx library pre-dates + * introduction of the ability to retrieve the version */ + prc = PMIx_Get(NULL, PMIX_VERSION_NUMERIC, NULL, 0, &val); + if (PMIX_SUCCESS == prc) { + // check the version + if (val->data.uint32 < PRTE_PMIX_MINIMUM_VERSION) { + pmix_show_help("help-prted.txt", "min-pmix-violation", true, + PRTE_PMIX_MINIMUM_VERSION, val->data.uint32); + PMIX_VALUE_RELEASE(val); + return PRTE_ERR_SILENT; + } + PMIX_VALUE_RELEASE(val); + } +#endif + /* register our support */ for (n = 0; 0 != strlen(prte_attributes[n].function); n++) { prc = PMIx_Register_attributes(prte_attributes[n].function, prte_attributes[n].attrs);