diff --git a/.gitignore b/.gitignore index 225c2bc..e083381 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /libpsm2-11.2.23.tar.gz /libpsm2-11.2.78.tar.gz /libpsm2-11.2.86.tar.gz +/libpsm2-11.2.185.tar.gz diff --git a/0001-Fix-multiple-definition-issues.patch b/0001-Fix-multiple-definition-issues.patch deleted file mode 100644 index f3a1582..0000000 --- a/0001-Fix-multiple-definition-issues.patch +++ /dev/null @@ -1,112 +0,0 @@ -From d91fc0569da44e7b9ebb6883974703b8e982098b Mon Sep 17 00:00:00 2001 -From: Honggang Li -Date: Mon, 10 Feb 2020 04:59:36 -0500 -Subject: [PATCH] Fix multiple definition issues - -Signed-off-by: Honggang Li ---- - psm_error.h | 2 +- - psm_utils.c | 6 ++++++ - psm_utils.h | 7 ++----- - ptl_am/ptl_fwd.h | 2 +- - ptl_ips/ptl_fwd.h | 4 ++-- - ptl_self/ptl_fwd.h | 2 +- - 6 files changed, 13 insertions(+), 10 deletions(-) - -diff --git a/psm_error.h b/psm_error.h -index f335382..cb1b4ba 100644 ---- a/psm_error.h -+++ b/psm_error.h -@@ -65,7 +65,7 @@ - #define PSMI_EP_NORETURN ((psm2_ep_t) -2) - #define PSMI_EP_LOGEVENT ((psm2_ep_t) -3) - --psm2_ep_errhandler_t psmi_errhandler_global; -+extern psm2_ep_errhandler_t psmi_errhandler_global; - - psm2_error_t MOCKABLE(psmi_handle_error)(psm2_ep_t ep, psm2_error_t error, - const char *buf, ...) -diff --git a/psm_utils.c b/psm_utils.c -index 521467f..7787f53 100644 ---- a/psm_utils.c -+++ b/psm_utils.c -@@ -62,6 +62,12 @@ int psmi_ep_device_is_enabled(const psm2_ep_t ep, int devid); - - struct psmi_epid_table psmi_epid_table; - -+/* -+ * Global model so we can tune defaults better for specific cpu's -+ */ -+uint32_t psmi_cpu_model; -+ -+ - /* Iterator to access the epid table. - * 'ep' can be NULL if remote endpoints from all endpoint handles are requested - */ -diff --git a/psm_utils.h b/psm_utils.h -index fc38153..b94443d 100644 ---- a/psm_utils.h -+++ b/psm_utils.h -@@ -317,10 +317,7 @@ uint32_t psmi_crc(unsigned char *buf, int len); - #define CPUID_GENUINE_INTEL 0xf0000000 - #define CPUID_MODEL_UNDEFINED -1 - --/* -- * Global model so we can tune defaults better for specific cpu's -- */ --uint32_t psmi_cpu_model; -+extern uint32_t psmi_cpu_model; - - /* - * Diagnostics, all in psm_diags.c -@@ -337,7 +334,7 @@ void psmi_multi_ep_init(); - * Fault injection - */ - struct psmi_faultinj_spec; --int psmi_faultinj_enabled; /* use macro to test */ -+extern int psmi_faultinj_enabled; /* use macro to test */ - #if 1 /* possible to disable at compile time */ - #define PSMI_FAULTINJ_ENABLED() (!!psmi_faultinj_enabled) - #else -diff --git a/ptl_am/ptl_fwd.h b/ptl_am/ptl_fwd.h -index e1bd064..1d0fec4 100644 ---- a/ptl_am/ptl_fwd.h -+++ b/ptl_am/ptl_fwd.h -@@ -57,7 +57,7 @@ - #define _PTL_FWD_AMSH_H - - /* Symbol in am ptl */ --struct ptl_ctl_init psmi_ptl_amsh; -+extern struct ptl_ctl_init psmi_ptl_amsh; - - extern int psmi_shm_mq_rv_thresh; - -diff --git a/ptl_ips/ptl_fwd.h b/ptl_ips/ptl_fwd.h -index 3702fba..b774260 100644 ---- a/ptl_ips/ptl_fwd.h -+++ b/ptl_ips/ptl_fwd.h -@@ -61,7 +61,7 @@ typedef struct ips_epaddr ips_epaddr_t; - typedef struct ips_msgctl ips_msgctl_t; - - /* Symbol in ips ptl */ --struct ptl_ctl_init psmi_ptl_ips; -+extern struct ptl_ctl_init psmi_ptl_ips; - --struct ptl_ctl_rcvthread psmi_ptl_ips_rcvthread; -+extern struct ptl_ctl_rcvthread psmi_ptl_ips_rcvthread; - #endif /* _PTL_FWD_IPS_H */ -diff --git a/ptl_self/ptl_fwd.h b/ptl_self/ptl_fwd.h -index 77ee7f9..7ee6b73 100644 ---- a/ptl_self/ptl_fwd.h -+++ b/ptl_self/ptl_fwd.h -@@ -57,6 +57,6 @@ - #define _PTL_FWD_SELF_H - - /* Symbol in am ptl */ --struct ptl_ctl_init psmi_ptl_self; -+extern struct ptl_ctl_init psmi_ptl_self; - - #endif --- -2.25.0 - diff --git a/0001-README-add-section-about-OMPI-4.1.x-OFI-BTL-and-high.patch b/0001-README-add-section-about-OMPI-4.1.x-OFI-BTL-and-high.patch new file mode 100644 index 0000000..8f7e90b --- /dev/null +++ b/0001-README-add-section-about-OMPI-4.1.x-OFI-BTL-and-high.patch @@ -0,0 +1,51 @@ +From 6e0231074111ff1fda0b2de1765e1988fda2e9c9 Mon Sep 17 00:00:00 2001 +From: Brendan Cunningham +Date: Fri, 7 May 2021 16:33:35 -0400 +Subject: [PATCH] README: add section about OMPI 4.1.x, OFI BTL, and high-PPN + jobs. + +Signed-off-by: Brendan Cunningham +--- + README | 19 ++++++++++++++++++- + 1 file changed, 18 insertions(+), 1 deletion(-) + +diff --git a/README b/README +index 7990555..2961534 100644 +--- a/README ++++ b/README +@@ -67,7 +67,6 @@ Contains the following sections: + - INSTALLING + * INSTALLING USING MAKEFILE + * INSTALLING USING EITHER YUM OR DNF +-- TESTING + - RELATED SOFTWARE TO PSM2 + - SUPPORTING DOCUMENTATION + +@@ -251,6 +250,24 @@ libraries available on them. Open MPI provides a standard configure, make and + make install mechanism which will detect and build the relevant PSM2 network + modules for Open MPI once the header and runtime files are detected. + ++Open MPI 4.1.x, OFI BTL, and high PPN jobs ++---------------- ++Open MPI added the OFI BTL for one-sided communication. On an OPA fabric, the ++OFI BTL may use the PSM2 OFI provider underneath. If PSM2 is in-use as both ++the MTL (directly or via OFI) and the BTL (via OFI), then each rank in the ++Open MPI job will require two PSM2 endpoints and PSM2 context-sharing will ++be disabled. ++ ++In this case, total number of PSM2 ranks on a node can be no more than: ++ (num_hfi * num_user_contexts)/2 ++Where num_user_contexts is typically equal to the number of physical CPU ++cores on that node. ++ ++If your job does not require an inter-node BTL (e.g. OFI), then you can ++disable the OFI BTL in one of two ways: ++ 1. When building Open MPI, specify '--with-ofi=no' when you run 'configure'. ++ 2. When running your Open MPI job, add '-mca btl self,vader'. ++ + MVAPICH2 support + ---------------- + MVAPICH2 supports PSM2 transport for optimized communication on HFI hardware. +-- +2.32.0 + diff --git a/libpsm2.spec b/libpsm2.spec index 6727626..4fe5d6f 100644 --- a/libpsm2.spec +++ b/libpsm2.spec @@ -52,22 +52,22 @@ # Summary: Intel PSM Libraries Name: libpsm2 -Version: 11.2.86 -Release: 8%{?dist} +Version: 11.2.185 +Release: 1%{?dist} License: BSD or GPLv2 -URL: https://github.com/01org/opa-psm2/ +URL: https://github.com/cornelisnetworks/opa-psm2/ # The tarball can be created by: -# git clone https://github.com/01org/opa-psm2 +# git clone https://github.com/cornelisnetworks/opa-psm2.git # cd opa-psm2 -# git checkout 4f0ad8cf4d6b44fcce5f745e946a056659ba54c0 +# git checkout 7a33bedc4bb3dff4e57c00293a2d70890db4d983 # make dist Source0: %{name}-%{version}.tar.gz -Patch0: 0001-Fix-multiple-definition-issues.patch Patch1: makefile-distro-from-environment.patch Patch2: %{name}-gcc11.patch +Patch3: 0001-README-add-section-about-OMPI-4.1.x-OFI-BTL-and-high.patch -# The OPA product is supported on x86 64 only: +# The OPA product is supported on x86_64 only: ExclusiveArch: x86_64 BuildRequires: libuuid-devel BuildRequires: numactl-devel @@ -105,9 +105,9 @@ Support for MPIs linked with PSM versions < 2 %prep %setup -q -%patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build %{set_build_flags} @@ -127,7 +127,7 @@ rm -f %{buildroot}%{_libdir}/*.a %files %license COPYING -%{_libdir}/libpsm2.so.2.1 +%{_libdir}/libpsm2.so.2.* %{_libdir}/libpsm2.so.2 %if 0%{?rhel} >= 8 %{_udevrulesdir}/40-psm.rules @@ -153,6 +153,9 @@ rm -f %{buildroot}%{_libdir}/*.a %endif %changelog +* Thu Jun 17 2021 Honggang Li - 11.2.185-1 +- Rebase to latest upstream release PSM2_11.2.185 + * Tue Jan 26 2021 Fedora Release Engineering - 11.2.86-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/makefile-distro-from-environment.patch b/makefile-distro-from-environment.patch index 2ce7330..9d82280 100644 --- a/makefile-distro-from-environment.patch +++ b/makefile-distro-from-environment.patch @@ -1,13 +1,14 @@ -diff -ru ../libpsm2-11.2.86.orig/Makefile ./Makefile ---- ../libpsm2-11.2.86.orig/Makefile 2019-10-03 21:00:29.000000000 -0500 -+++ ./Makefile 2020-07-13 13:55:53.994452919 -0500 -@@ -164,7 +164,8 @@ +diff --git a/Makefile b/Makefile +index 5a31d64..d819899 100644 +--- a/Makefile ++++ b/Makefile +@@ -164,7 +164,8 @@ nthreads := $(shell echo $$(( `nproc` * 2 )) ) # The DISTRO variable is used subsequently for variable # behaviors of the 3 distros. --DISTRO := $(shell . /etc/os-release; echo $$ID) +-DISTRO := $(shell . /etc/os-release; if [[ "$$ID" == "sle_hpc" ]]; then ID="sles"; fi; echo $$ID) +# Use DISTRO from the environment -+# DISTRO := $(shell . /etc/os-release; echo $$ID) ++# DISTRO := $(shell . /etc/os-release; if [[ "$$ID" == "sle_hpc" ]]; then ID="sles"; fi; echo $$ID) # By default the following two variables have the following values: LIBPSM2_COMPAT_CONF_DIR := /etc diff --git a/sources b/sources index 747e923..f1e66fd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libpsm2-11.2.86.tar.gz) = d4e6c8b20e94c236dd773a54c61ddef1456774b3671c481c1af7c78328fc20747935a68cabbb379798605a13edccbeb0bcd55b216885ca0e4f8cba7cae99002a +SHA512 (libpsm2-11.2.185.tar.gz) = a418edac2366213e16be9cfcbf0483be65940a6db8cf3cb240bfbb16b58d0b8277f3b7a4fd888c1992201bf6918a79183de08e8f1fecb8c46324dd69daed836e