From ebac40d56210d2b1e59675054de763d26349824f Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 2 Nov 2021 08:45:43 -0700 Subject: [PATCH] Protect against PMIx v4.1.1-only definitions We want to continue to support back to PMIx v4.1.0 Signed-off-by: Ralph Castain --- NEWS | 1 + config/prte_setup_pmix.m4 | 4 ++-- src/pmix/pmix-internal.h | 11 +++++++++++ src/prted/pmix/pmix_server.c | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 5907b345aa..ad1ced8d80 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,7 @@ version 1.0. +**** NOTE: As of v2.0.1, PRRTE no longer has a dependency on "pandoc" +**** for building and installing man pages. +PR #1137: Protect against PMIx v4.1.1-only definitions PR #1135: Final update v2.0.1 for rc3 - Show MCA base params in prte_info - Silence variety of warnings diff --git a/config/prte_setup_pmix.m4 b/config/prte_setup_pmix.m4 index 1b45073a45..4bfae428e4 100644 --- a/config/prte_setup_pmix.m4 +++ b/config/prte_setup_pmix.m4 @@ -117,7 +117,7 @@ AC_DEFUN([PRTE_CHECK_PMIX],[ AS_IF([test "x`ls $pmix_ext_install_dir/include/pmix_version.h 2> /dev/null`" = "x"], [AC_MSG_RESULT([not found - assuming pre-v2.0]) AC_MSG_WARN([PRTE does not support PMIx versions]) - AC_MSG_WARN([less than v4.01 as only PMIx-based tools can]) + AC_MSG_WARN([less than v4.1.0 as only PMIx-based tools can]) AC_MSG_WARN([can connect to the server.]) AC_MSG_ERROR([Please select a newer version and configure again])], [AC_MSG_RESULT([found]) @@ -156,7 +156,7 @@ AC_DEFUN([PRTE_CHECK_PMIX],[ AS_IF([test "$prte_external_pmix_version_found" = "0"], [AC_MSG_WARN([PRTE does not support PMIx versions]) - AC_MSG_WARN([less than v4.1 as only PMIx-based tools can]) + AC_MSG_WARN([less than v4.1.0 as only PMIx-based tools can]) AC_MSG_WARN([can connect to the server.]) AC_MSG_ERROR([Please select a newer version and configure again])]) diff --git a/src/pmix/pmix-internal.h b/src/pmix/pmix-internal.h index d38dec3d41..c56defd002 100644 --- a/src/pmix/pmix-internal.h +++ b/src/pmix/pmix-internal.h @@ -468,6 +468,17 @@ PRTE_EXPORT int prte_pmix_register_cleanup(char *path, bool directory, bool igno #define PMIX_ERROR_LOG(r) \ prte_output(0, "[%s:%d] PMIx Error: %s", __FILE__, __LINE__, PMIx_Error_string((r))) +#ifndef PMIX_DATA_BUFFER_STATIC_INIT + #define PMIX_DATA_BUFFER_STATIC_INIT \ + { \ + .base_ptr = NULL, \ + .pack_ptr = NULL, \ + .unpack_ptr = NULL, \ + .bytes_allocated = 0, \ + .bytes_used = 0 \ + } +#endif + END_C_DECLS #endif diff --git a/src/prted/pmix/pmix_server.c b/src/prted/pmix/pmix_server.c index b815bc94bc..6c2964250a 100644 --- a/src/prted/pmix/pmix_server.c +++ b/src/prted/pmix/pmix_server.c @@ -676,6 +676,7 @@ int pmix_server_init(void) } } +#ifdef PMIX_SINGLETON /* if we were started to support a singleton, then let the server library know */ if (NULL != prte_pmix_server_globals.singleton) { PMIX_INFO_LIST_ADD(prc, ilist, PMIX_SINGLETON, @@ -685,6 +686,7 @@ int pmix_server_init(void) return rc; } } +#endif /* if we are the MASTER, then we are the scheduler * as well as a gateway */