Skip to content

Commit

Permalink
Check the PMIx version for min required
Browse files Browse the repository at this point in the history
Need to check the PMIx version at runtime to ensure it
meets the minimum requirements. Can only do this where
supported (i.e., PMIx v4.2.7 and above).

Signed-off-by: Ralph Castain <rhc@pmix.org>
  • Loading branch information
rhc54 committed Dec 6, 2023
1 parent 951af44 commit eefd2b4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
4 changes: 4 additions & 0 deletions config/prte_setup_pmix.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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}"],
Expand Down
17 changes: 14 additions & 3 deletions src/docs/show-help-files/help-prted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
19 changes: 19 additions & 0 deletions src/prted/pmix/pmix_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit eefd2b4

Please sign in to comment.