# # spec file for package libpsm2 # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %global modprobe_d_files libpsm2-compat.conf %global psm_so 2 %global git_ver %{nil} %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150300 %global _modprobedir /lib/modprobe.d %endif Name: libpsm2 Version: 12.0.1 Release: 2.4 Summary: Intel PSM Messaging API libraries License: BSD-2-Clause OR GPL-2.0-only Group: Development/Libraries/C and C++ URL: https://github.com/cornelisnetworks/opa-psm2/ Source0: %{name}-%{version}%{git_ver}.tar.bz2 Source1: libpsm2.changelog Source2: libpsm2-rpmlintrc Patch2: libpsm2-use_RPM_OPT_FLAGS.patch Patch3: libpsm2-use-exported-variable-for-version-and-release.patch BuildRequires: libnuma-devel BuildRequires: libuuid-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(udev) Conflicts: opa-libs Obsoletes: hfi-psm Obsoletes: hfi-psm-debuginfo #Currently *only* builds on x86_64 ExclusiveArch: x86_64 %description The PSM Messaging API, or PSM API, is Intel's low-level user-level communications interface for the Truescale family of products. PSM users are enabled with mechanisms necessary to implement higher level communications interfaces in parallel environments. %package -n %{name}-%{psm_so} Summary: Intel PSM Messaging API library Group: System/Libraries Provides: %{name} = %{version} %description -n %{name}-%{psm_so} libpsm2 provides PSM Messaging API, or PSM API, is Intel's low-level user-level communications interface for the Truescale family of products. This package contains the runtime library. %package devel Summary: Development files for the Intel PSM Messaging API Group: Development/Libraries/C and C++ Requires: %{name}-%{psm_so} = %{version} Requires: libuuid-devel Conflicts: opa-devel %package compat Summary: Compatibility library providing the old PSM API/ABI Group: Development/Libraries/C and C++ Requires: %{name}-%{psm_so} = %{version} Conflicts: libpsm_infinipath1 %description devel Development files for the libpsm2 library. %description compat Support for MPIs linked with PSM versions < 2. %prep %autosetup -p0 -n %{name}-%{version}%{git_ver} cp %{SOURCE1} ChangeLog %build %global optflags %{optflags} -fcommon export RPM_OPT_FLAGS export VERSION=${Version} RELEASE=${Release} %make_build %install export DESTDIR=%{buildroot} modprobe_dir=%{_modprobedir} make %{?_smp_mflags} DESTDIR=%{buildroot} LIBPSM2_COMPAT_CONF_DIR="${modprobe_dir%/*}" install install -m0755 %{buildroot}%{_libdir}/psm2-compat/libpsm_infinipath.so.1 %{buildroot}%{_libdir}/libpsm_infinipath.so.1 # removing file to get rid of rpm errors rm %{buildroot}%{_libdir}/psm2-compat/libpsm_infinipath.so.1 rm %{buildroot}%{_prefix}/lib/%{name}/libpsm2-compat.cmds # remove static library rm %{buildroot}%{_libdir}/libpsm2.a %pre compat # Avoid restoring outdated stuff in posttrans for _f in %{?modprobe_d_files}; do [ ! -f "%{_sysconfdir}/modprobe.d/${_f}.rpmsave" ] || \ mv -f "%{_sysconfdir}/modprobe.d/${_f}.rpmsave" "%{_sysconfdir}/modprobe.d/${_f}.rpmsave.old" || : done %post -n %{name}-%{psm_so} -p /sbin/ldconfig %postun -n %{name}-%{psm_so} -p /sbin/ldconfig %post compat -p /sbin/ldconfig %postun compat -p /sbin/ldconfig %posttrans compat # Migration of modprobe.conf files to _modprobedir for _f in %{?modprobe_d_files}; do [ ! -f "%{_sysconfdir}/modprobe.d/${_f}.rpmsave" ] || \ mv -fv "%{_sysconfdir}/modprobe.d/${_f}.rpmsave" "%{_sysconfdir}/modprobe.d/${_f}" || : done %files -n %{name}-%{psm_so} %{_libdir}/libpsm2.so.* %{_udevrulesdir}/40-psm.rules %doc README ChangeLog %license COPYING %files devel %{_libdir}/libpsm2.so %{_includedir}/psm2.h %{_includedir}/psm2_mq.h %{_includedir}/psm2_am.h # The following files were part of the devel-noship and moved to devel: %dir %{_includedir}/hfi1diag/ %dir %{_includedir}/hfi1diag/linux-x86_64/ %{_includedir}/hfi1diag/linux-x86_64/bit_ops.h %{_includedir}/hfi1diag/linux-x86_64/sysdep.h %{_includedir}/hfi1diag/hfi1_deprecated.h %{_includedir}/hfi1diag/opa_udebug.h %{_includedir}/hfi1diag/opa_debug.h %{_includedir}/hfi1diag/opa_intf.h %{_includedir}/hfi1diag/opa_user.h %{_includedir}/hfi1diag/opa_service.h %{_includedir}/hfi1diag/opa_common.h %{_includedir}/hfi1diag/opa_byteorder.h %{_includedir}/hfi1diag/opa_revision.h %{_includedir}/hfi1diag/psm2_mock_testing.h %{_includedir}/hfi1diag/psmi_wrappers.h %files compat %dir %{_modprobedir} %{_libdir}/libpsm_infinipath.so.* %{_udevrulesdir}/40-psm-compat.rules %{_modprobedir}/libpsm2-compat.conf %changelog * Fri Mar 1 2024 pgajdos@suse.com - Use %%autosetup macro. Allows to eliminate the usage of deprecated %%patchN * Tue Jul 25 2023 Nicolas Morey - Update to 12.0.1 - Fix memory leak in psmi_shm_create * Thu Sep 15 2022 Nicolas Morey-Chaisemartin - Update to 11.2.230 - Fix silent data error on FECN-marked TID packet for unaligned receive * Mon Jun 13 2022 Nicolas Morey-Chaisemartin - Update to 11.2.229 - Fix GCC compilation issues - Allow PSM2 to work with "self,shm" devices without omnipath hardware - Various fixes - Spec file cleanups submitted by Dirk Müller * Mon Apr 11 2022 Martin Wilck - Run modprobe.conf handling scriptlets in -compat subpackage (bsc#1198322) * Fri Mar 4 2022 Martin Wilck - move modprobe.conf files to %%_modprobedir (bsc#1196275, jsc#SLE-20639) * Tue Aug 24 2021 Nicolas Morey-Chaisemartin - Update to 11.2.203 (jsc#SLE-20580) - No release notes available * Wed Jul 22 2020 Nicolas Morey-Chaisemartin - Update to 11.2.185 - No release notes available - Refresh libpsm2-use_RPM_OPT_FLAGS.patch against latest sources * Fri Jul 3 2020 Nicolas Morey-Chaisemartin - Update to 11.2.166 - No release notes available - Drop Add-missing-extern-keywords.patch as it was merged upstream * Fri Jun 5 2020 Callum Farmer - Fixes for %%_libexecdir changing to /usr/libexec * Mon Apr 27 2020 Martin Liška - Add -fcommon in order to fix boo#1160279. * Fri Apr 3 2020 Nicolas Morey-Chaisemartin - Add Add-missing-extern-keywords.patch to fix compilation with GCC10 (bsc#1160279) * Fri Oct 4 2019 Nicolas Morey-Chaisemartin - Update to 11.2.86 - No release notes - Refresh libpsm2-use_RPM_OPT_FLAGS.patch against latest version - Use %%license for COPYING * Mon Feb 18 2019 nmoreychaisemartin@suse.com - Update to 11.2.78 (bsc#1125605, bsc#1125717) - Revert of commit to check free BAR space and release TIDs - Remove unnecessary long waiting timeout for HFI driver - Drop libpsm2-include-ioctl_h.patch which was fixed upstream * Mon Oct 15 2018 nmoreychaisemartin@suse.com - Update to 11.2.23 (fate#325853) - compiler flag optimizations for KNL - optimizations for OFI - Bug fixes for CUDA runtime - Add psm2_info_query API - Modify PSM send side protocol selection logic to select correct flow at start of send function - Update LMC disable thresholds - Fix for Issue #30: Compilation error due to snprintf truncation warning - Convert CUDA runtime API calls to CUDA Driver API calls - Prevent SHM and IPS from closing other protocol connections - Change CUDA_THRESH_RNDV and move CUDA init to separate function - Fix selection logic for multi-HFI within NUMA node - Refresh JKey to support SELinux - Fix Issue #24: Uninitialized AM message - Fix data data corruption on GPU buffers when when using am ptl - Force EPID remap in shm if remote PID changed - PSM2 GDR Copy feature and tuning of thresholds to fully utilize the feature - Fix uniformity of process mapping to HFIs - PSM2 specific perf benchmarks - Fix for issue 27: Null termination of string - Drop libpsm2-fix-gcc8-compilation-error.patch which was fixed upstream * Thu Mar 15 2018 nmoreychaisemartin@suse.com - Update to version 10.3.46 - Enabled IPS_PROTO_FLAG_RCVTHREAD flag - Fix GPU Direct Recv threshold default - Resolve PSM2_CUDA runtime issues - Fix bug in code to remove octal base for env vars - Change direct use of HFI_CLASS_PATH and guard possible buffer overruns - Add libpsm2-fix-gcc8-compilation-error.patch to fix compilation with gcc8 (bsc#1084634) * Fri Dec 8 2017 nmoreychaisemartin@suse.com - Update to version 10.3.37 (bsc#1068108): - Allow PSM_PERF to work with multiple threads - AM Handler with Caller Context for OFI PSM2 - Add new API functions psm2_mq_ipeek_dequeue and psm2_mq_req_free (for OFI usage) - Reserve additional space in "psm2_mq_req" for user use (for OFI usage) - Bug Fixes - Fix SLES 12.3 libpsm2-2 Provides line - Add additional libpsm2-2 noarch Provides line - Clean up CUDA symbol loading - Avoid typecasting unknown addresses to aligned data types - Handle EFAULT and ENOTSUPP returned from driver - Release hfi1 memory mappings when closing a context * Mon Nov 20 2017 nmoreychaisemartin@suse.com - Updated to version 10.3.17: - Small bug fixes and some enhanced debugging. - Assigned context is not freed on close() which could lead to context starvation. Therefore release hfi1 mappings when closing a context. - Close receive thread only while closing last endpoint - Rebase libpsm2-include-ioctl_h.patch, libpsm2-use_RPM_OPT_FLAGS.patch and libpsm2-use-exported-variable-for-version-and-release.patch to the latest sources. * Wed Sep 6 2017 nmoreychaisemartin@suse.com - Update to version 10.2.260: - Fixed support for SLE12-SP2 - V2 EPID - Initialize CUDA support only if env variable is switched on - Add PSM_PERF functionality (for measuring number of instructions retired between two points in code) - Bug Fixes - Include commits from GitHub PR's #13, #14, #16 - Fix SLES build issue - Allow psm2_ep_connect to be called multiple times with 'self' epid - Fix issue with psm2_mq_ipeek2 and psm2_mq_test2 when used with multi-threaded OMPI - Fix performance related bugs for PSM2_CUDA builds - Remove libpsm2-fix-compilation-for-hfi1-v5.patch and libpsm2-compat-dependency-to-libpsm2.patch as they were merged upstream. - Update _service to allow auto updates from github * Sat Aug 12 2017 jengelh@inai.de - Remove unnecessary ldconfig from -devel subpackage. * Wed Aug 9 2017 nmoreychaisemartin@suse.com - Update to version 10.2-235 - Set TidFlow starting sequence number to 0 - Add support for KNM detection - Generalize affinity logic to extend to non-CUDA workloads as well - Cleanup build artifacts. "make" output will now be in $PWD/build_release by default - Bug Fixes - Mask non-DW msg size assert - Fix hang associated with re-transmit of last fragment of non-DW aligned SDMA eager message - Keep track of only last unsent ACK message - Retry context operns to fix interrupted syscall - Fix segfault in disconnect code path - Add psm2_ep_disconnect API - Add GPU-Direct and support for CUDA buffers in PSM2 - Implement new HFI Selection algorithm for CUDA version of PSM2 - Related to this, Add new PSM2_MULTIRAIL option to allow multirail only within a socket. - Bug Fixes and Driver interface changes - Sync with driver interface changes for GPU-Direct feature support - Fix hang in PSM2 during context open - Fix bug in psmi_memalign() - Fix data corruption due to unaligned bytes in msg - Drop libpsm2-gcc7.patch as it was fixed upstream - Add set_version service - Add libpsm2-fix-compilation-for-hfi1-v5.patch to fix compilation for older kernels * Mon Jul 10 2017 nmoreychaisemartin@suse.com - Add libpsm2-compat-dependency-to-libpsm2.patch so libpsm_infinipath.so provided by libpsm2-compat is linked to libpsm2 which provides its missing symbols * Mon Jul 10 2017 nmoreychaisemartin@suse.com - Remove obsolete psm2 library directory * Fri Jul 7 2017 dimstar@opensuse.org - BuildRequire pkgconfig(udev) instead of udev: allow OBS to choose udev-mini over udev, which in turn allows to break build cycles. * Fri Jun 30 2017 nmoreychaisemartin@suse.com - Install psm2-compat library in the standard path - Have libpsm2-compat conflict with libpsm_infinipath1 * Fri May 19 2017 dimstar@opensuse.org - Add libpsm2-gcc7.patch: Fix build with gcc 7.x. Patch taken from upstream git, https://github.com/01org/opa-psm2/commit/52aa214e8. * Fri May 19 2017 nmoreychaisemartin@suse.com - libpsm2-2 provides libpsm2 (bsc#1039855) * Mon May 15 2017 nmoreychaisemartin@suse.com - Fix package version numbering (bsc#1037661). * Fri Apr 7 2017 pth@suse.de - Remove leftover conflict marker * Wed Mar 29 2017 pth@suse.de - Fix summary for libpsm2-compat. * Mon Mar 13 2017 jengelh@inai.de - Rectify RPM groups and refine description * Thu Mar 9 2017 josef.moellers@suse.com - Update to latest Intel version: Sync with PSM2 master upto fixes for CMA get/put In addition to Dynamic CMA failover support, this code surface includes- * Improved output array_of_errors in psm_ep_connect, * Improved signal handling for SIGSEGV/SIGBUS events * New abstraction layer for driver commands * Ubuntu packaging support ... and some bug fixes. JM: This obsoletes my libpsm2-calc-checksum.patch. - Include sys/ioctl.h in psmi_wrappers.c - Add hfi1diag/psmi_wrappers.h to installed files. (FATE#321472, bnc#990171, libpsm2-include-ioctl_h.patch) * Fri Mar 3 2017 josef.moellers@suse.com - Update to new version 10.3.1, mainly bug fixes Intel has not made available any changelog. As Intel's source did not compile, replaced calculation of the hash - Deleted file libpsm2-avoid-executable-flag-on-installed-header-files.patch (bnc#1024057, libpsm2-calc-checksum.patch, FATE#321472) * Tue Dec 6 2016 pth@suse.de - Update to 10.2.2. As 0.7 isn't mentioned in the log, see ChangeLog for any changes to the package. - Remove libpsm2-avoid-executable-flag-on-installed-header-files.patch as the fix is upstream. - Adapt the remaining patches to the changed sources. - Generate ChangeLog from git log and package it. * Thu Jun 9 2016 ndas@suse.de - Removed git from buildrequires and specify version and revision using environment variables (bsc#983235). [+libpsm2-use-exported-variable-for-version-and-release.patch] - Added a _service file(bsc#983235). * Fri May 27 2016 ndas@suse.de - Removed hfi1_user.h from the source as the required changes are available in kernel-devel's hfi1_user.h(bsc#980733). [-hfi1_user.h] * Wed Mar 23 2016 ndas@suse.de - Fix build error (bsc#972292). * Fri Mar 11 2016 pth@suse.de - Fix dependency of libpsm2-devel and -compat(bsc#970895). * Wed Mar 9 2016 pth@suse.de - Add libpsm2-use_RPM_OPT_FLAGS.patch to include RPM_OPT_FLAGS in CFLAGS. - Do not recreate RPM_BUILD_ROOT. - Remove unneeded %%clean section * Wed Mar 2 2016 nirmoy.das@suse.com - Initial Package, Version 0.7(fate#319243).