Accepting request 1148143 from home:NMorey:branches:science:HPC
- Update to v3.0 GA - Cleanup spec file - standard flavour has been removed and has been replaced by the ucx flavour - Drop 32b arch support - Disable static libraries for non-HPC build - No need to pull ucx nor libfabric-devel for mvapich3-devel - Replace 0001-fix-control-reaches-end-of-non-void-function.patch with upstream: - mpi-coll-missing-return.patch - mpl-warnings-missing-return.patch - Add: - mvapich3-s390_get_cycles.patch for s390 support - pass-correct-size-to-snprintf.patch to fix potential overflows - autoconf-pull-dynamic-and-not-static-libs-from-pkg-config.patch to fix libfabric sub dependencies being unnecessary pulled - config-replace-AC_TRY_-COMPILE-LINK-RUN.patch to replace osolete autoconf macros OBS-URL: https://build.opensuse.org/request/show/1148143 OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich3?expand=0&rev=4
This commit is contained in:
parent
e9981a42b9
commit
b3c4954942
@ -1,28 +0,0 @@
|
||||
From 3b99a0cda07e6836f5316e9b1ea2ed4e1d625e0e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@gmail.com>
|
||||
Date: Sun, 23 Jul 2023 11:24:13 +0200
|
||||
Subject: [PATCH] fix: control reaches end of non-void function
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
|
||||
---
|
||||
src/mpl/src/sock/mpl_sockaddr.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/mpl/src/sock/mpl_sockaddr.c b/src/mpl/src/sock/mpl_sockaddr.c
|
||||
index c0e991c..dac43fe 100644
|
||||
--- a/src/mpl/src/sock/mpl_sockaddr.c
|
||||
+++ b/src/mpl/src/sock/mpl_sockaddr.c
|
||||
@@ -141,6 +141,7 @@ int MPL_get_sockaddr_direct(int type, MPL_sockaddr_t * p_addr)
|
||||
} else {
|
||||
assert(0);
|
||||
}
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int MPL_get_sockaddr_iface(const char *s_iface, MPL_sockaddr_t * p_addr)
|
||||
--
|
||||
2.41.0
|
||||
|
@ -1,9 +1,8 @@
|
||||
<multibuild>
|
||||
<package>standard</package>
|
||||
<package>testsuite</package>
|
||||
<package>ofi</package>
|
||||
<package>ofi-testsuite</package>
|
||||
<package>gnu-hpc</package>
|
||||
<package>gnu-hpc-testsuite</package>
|
||||
<package>gnu-hpc-ofi-testsuite</package>
|
||||
<package>ucx</package>
|
||||
<package>ucx-testsuite</package>
|
||||
<package>gnu-hpc-ofi</package>
|
||||
<package>gnu-hpc-ucx</package>
|
||||
</multibuild>
|
||||
|
@ -0,0 +1,27 @@
|
||||
commit ec98a7804ec492d8af7f84472baedb23ec49fb3b
|
||||
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
||||
Date: Thu Apr 1 10:11:45 2021 +0200
|
||||
|
||||
autoconf: pull dynamic and not static libs from pkg-config
|
||||
|
||||
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
||||
|
||||
diff --git confdb/aclocal_libs.m4 confdb/aclocal_libs.m4
|
||||
index 77f0ed0ce9c7..8d41939a2458 100644
|
||||
--- confdb/aclocal_libs.m4
|
||||
+++ confdb/aclocal_libs.m4
|
||||
@@ -199,12 +199,12 @@ dnl PAC_LIB_DEPS(library_name, library_pc_path)
|
||||
dnl library_pc_path is the path to the library pkg-config directory
|
||||
AC_DEFUN([PAC_LIB_DEPS],[
|
||||
if test "x$2" != "x"; then
|
||||
- ac_lib$1_deps=`pkg-config --static --libs $2/lib$1.pc 2>/dev/null`
|
||||
+ ac_lib$1_deps=`pkg-config --libs $2/lib$1.pc 2>/dev/null`
|
||||
# remove the library itself in case it is embedded
|
||||
ac_lib$1_deps=`echo $ac_lib$1_deps | sed 's/-l$1//'`
|
||||
else
|
||||
# use system default
|
||||
- ac_lib$1_deps=`pkg-config --static --libs lib$1 2>/dev/null`
|
||||
+ ac_lib$1_deps=`pkg-config --libs lib$1 2>/dev/null`
|
||||
fi
|
||||
])
|
||||
|
2968
config-replace-AC_TRY_-COMPILE-LINK-RUN.patch
Normal file
2968
config-replace-AC_TRY_-COMPILE-LINK-RUN.patch
Normal file
File diff suppressed because it is too large
Load Diff
24
mpi-coll-missing-return.patch
Normal file
24
mpi-coll-missing-return.patch
Normal file
@ -0,0 +1,24 @@
|
||||
commit 1e07f003ee3733b81f2de405a525214b12b597fc
|
||||
Author: Nicolas Morey <nmorey@suse.com>
|
||||
Date: Tue Nov 21 13:20:55 2023 +0100
|
||||
|
||||
mpi: coll: missing return
|
||||
|
||||
Change to void to avoid:
|
||||
src/mpi/coll/shmem/mvp_shmem_coll.c:1802:1: error: no return statement in function returning non-void [-Werror=return-type]
|
||||
|
||||
Signed-off-by: Nicolas Morey <nmorey@suse.com>
|
||||
|
||||
diff --git src/mpi/coll/shmem/mvp_shmem_coll.c src/mpi/coll/shmem/mvp_shmem_coll.c
|
||||
index 48ab6d3b1e52..5c5d071081eb 100644
|
||||
--- src/mpi/coll/shmem/mvp_shmem_coll.c
|
||||
+++ src/mpi/coll/shmem/mvp_shmem_coll.c
|
||||
@@ -1765,7 +1765,7 @@ fn_fail:
|
||||
}
|
||||
|
||||
/* Change the values set inside the array by the one define by the user */
|
||||
-static inline int tuning_runtime_init()
|
||||
+static inline void tuning_runtime_init()
|
||||
{
|
||||
int i;
|
||||
|
20
mpl-warnings-missing-return.patch
Normal file
20
mpl-warnings-missing-return.patch
Normal file
@ -0,0 +1,20 @@
|
||||
commit 39096ab6d56d4c84eb5195ed59e5575b50212d99
|
||||
Author: Hui Zhou <hzhou321@anl.gov>
|
||||
Date: Thu Aug 13 14:28:10 2020 -0500
|
||||
|
||||
mpl/warnings: missing return
|
||||
|
||||
warning by pgi compiler
|
||||
|
||||
diff --git src/mpl/src/sock/mpl_sockaddr.c src/mpl/src/sock/mpl_sockaddr.c
|
||||
index c0e991c68d85..d459684e4c6a 100644
|
||||
--- src/mpl/src/sock/mpl_sockaddr.c
|
||||
+++ src/mpl/src/sock/mpl_sockaddr.c
|
||||
@@ -140,6 +140,7 @@ int MPL_get_sockaddr_direct(int type, MPL_sockaddr_t * p_addr)
|
||||
return 0;
|
||||
} else {
|
||||
assert(0);
|
||||
+ return -1;
|
||||
}
|
||||
}
|
||||
|
3
mvapich-3.0.tar.gz
Normal file
3
mvapich-3.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ee076c4e672d18d6bf8dd2250e4a91fa96aac1db2c788e4572b5513d86936efb
|
||||
size 38303499
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:52d8a742e16eef69e944754fea7ebf8ba4ac572dac67dbda528443d9f32547cc
|
||||
size 38232677
|
27
mvapich3-s390_get_cycles.patch
Normal file
27
mvapich3-s390_get_cycles.patch
Normal file
@ -0,0 +1,27 @@
|
||||
commit e83d26fa6213f1ec9c506c43029ed243f89cd63e
|
||||
Author: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
|
||||
Date: Thu Jun 8 15:11:12 2017 +0200
|
||||
|
||||
mvapich3-s390_get_cycles
|
||||
|
||||
Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
|
||||
|
||||
diff --git src/mpid/ch3/channels/common/include/mvp_clock.h src/mpid/ch3/channels/common/include/mvp_clock.h
|
||||
index 2f7e08ede22f..38bc906d3e67 100644
|
||||
--- src/mpid/ch3/channels/common/include/mvp_clock.h
|
||||
+++ src/mpid/ch3/channels/common/include/mvp_clock.h
|
||||
@@ -93,6 +93,14 @@ static inline cycles_t get_cycles()
|
||||
return ret;
|
||||
}
|
||||
|
||||
+#elif defined(__s390__) || defined(__s390x__)
|
||||
+typedef unsigned long cycles_t;
|
||||
+static inline cycles_t get_cycles()
|
||||
+{
|
||||
+ unsigned long clk;
|
||||
+ asm volatile("stck %0" : "=Q" (clk) : : "cc");
|
||||
+ return clk >> 2;
|
||||
+}
|
||||
#else
|
||||
#warning get_cycles not implemented for this architecture: attempt asm/timex.h
|
||||
#include <asm/timex.h>
|
@ -1,3 +1,23 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 13:54:55 UTC 2024 - Nicolas Morey <nicolas.morey@suse.com>
|
||||
|
||||
- Update to v3.0 GA
|
||||
- Cleanup spec file
|
||||
- standard flavour has been removed and has been replaced by the ucx flavour
|
||||
- Drop 32b arch support
|
||||
- Disable static libraries for non-HPC build
|
||||
- No need to pull ucx nor libfabric-devel for mvapich3-devel
|
||||
- Replace 0001-fix-control-reaches-end-of-non-void-function.patch with upstream:
|
||||
- mpi-coll-missing-return.patch
|
||||
- mpl-warnings-missing-return.patch
|
||||
- Add:
|
||||
- mvapich3-s390_get_cycles.patch for s390 support
|
||||
- pass-correct-size-to-snprintf.patch to fix potential overflows
|
||||
- autoconf-pull-dynamic-and-not-static-libs-from-pkg-config.patch to fix
|
||||
libfabric sub dependencies being unnecessary pulled
|
||||
- config-replace-AC_TRY_-COMPILE-LINK-RUN.patch to replace osolete
|
||||
autoconf macros
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 7 16:59:30 UTC 2023 - Nicolas Morey <nicolas.morey@suse.com>
|
||||
|
||||
|
201
mvapich3.spec
201
mvapich3.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# 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
|
||||
@ -18,21 +18,26 @@
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
|
||||
# Static libraries are disabled by default
|
||||
# for non HPC builds
|
||||
# To enable them, simply uncomment:
|
||||
# % define build_static_devel 1
|
||||
|
||||
%define pname mvapich3
|
||||
%define vers 3.0b
|
||||
%define _vers 3_0_b
|
||||
%define rc_ver -1
|
||||
%define vers 3.0
|
||||
%define _vers 3_0
|
||||
%define rc_ver %nil
|
||||
|
||||
%if "%{flavor}" == ""
|
||||
ExclusiveArch: do_not_build
|
||||
%{bcond_with hpc}
|
||||
%endif
|
||||
|
||||
%if "%{flavor}" == "standard"
|
||||
%if "%{flavor}" == "ucx"
|
||||
%define build_flavor ucx
|
||||
%{bcond_with hpc}
|
||||
%endif
|
||||
%if "%{flavor}" == "testsuite"
|
||||
%if "%{flavor}" == "ucx-testsuite"
|
||||
%define build_flavor ucx
|
||||
%define testsuite 1
|
||||
%{bcond_with hpc}
|
||||
@ -48,17 +53,11 @@ ExclusiveArch: do_not_build
|
||||
%{bcond_with hpc}
|
||||
%endif
|
||||
|
||||
%if "%flavor" == "gnu-hpc"
|
||||
%if "%flavor" == "gnu-hpc-ucx"
|
||||
%define compiler_family gnu
|
||||
%undefine c_f_ver
|
||||
%define build_flavor ucx
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
%if "%flavor" == "gnu-hpc-testsuite"
|
||||
%define compiler_family gnu
|
||||
%undefine c_f_ver
|
||||
%define testsuite 1
|
||||
%define build_flavor ucx
|
||||
%define build_static_devel 1
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
@ -69,25 +68,12 @@ ExclusiveArch: do_not_build
|
||||
%define build_static_devel 1
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
%if "%flavor" == "gnu-hpc-ofi-testsuite"
|
||||
%define compiler_family gnu
|
||||
%undefine c_f_ver
|
||||
%define testsuite 1
|
||||
%define build_flavor ofi
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
%if "%flavor" == "gnu7-hpc"
|
||||
%if "%flavor" == "gnu7-hpc-ucx"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 7
|
||||
%define build_flavor ucx
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
%if "%flavor" == "gnu7-hpc-testsuite"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 7
|
||||
%define testsuite 1
|
||||
%define build_flavor ucx
|
||||
%define build_static_devel 1
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
@ -98,25 +84,12 @@ ExclusiveArch: do_not_build
|
||||
%define build_static_devel 1
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
%if "%flavor" == "gnu7-hpc-ofi-testsuite"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 7
|
||||
%define testsuite 1
|
||||
%define build_flavor ofi
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
%if "%flavor" == "gnu8-hpc"
|
||||
%if "%flavor" == "gnu8-hpc-ucx"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 8
|
||||
%define build_flavor ucx
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
%if "%flavor" == "gnu8-hpc-testsuite"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 8
|
||||
%define testsuite 1
|
||||
%define build_flavor ucx
|
||||
%define build_static_devel 1
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
@ -128,25 +101,11 @@ ExclusiveArch: do_not_build
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
%if "%flavor" == "gnu8-hpc-ofi-testsuite"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 8
|
||||
%define testsuite 1
|
||||
%define build_flavor ofi
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
%if "%flavor" == "gnu9-hpc"
|
||||
%if "%flavor" == "gnu9-hpc-ucx"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 9
|
||||
%define build_flavor ucx
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
%if "%flavor" == "gnu9-hpc-testsuite"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 9
|
||||
%define testsuite 1
|
||||
%define build_flavor ucx
|
||||
%define build_static_devel 1
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
@ -157,46 +116,24 @@ ExclusiveArch: do_not_build
|
||||
%define build_static_devel 1
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
%if "%flavor" == "gnu9-hpc-ofi-testsuite"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 9
|
||||
%define testsuite 1
|
||||
%define build_flavor ofi
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
%if "%flavor" == "gnu10-hpc"
|
||||
%if "%flavor" == "gnu10-hpc-ucx"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 10
|
||||
%define build_flavor ucx
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
%if "%flavor" == "gnu10-hpc-testsuite"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 10
|
||||
%define testsuite 1
|
||||
%define build_flavor ucx
|
||||
%define build_static_devel 1
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
%if "%flavor" == "gnu10-hpc-ofi"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 10
|
||||
%define build_flavor ofi
|
||||
%define build_flavor psm2
|
||||
%define build_static_devel 1
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
%if "%flavor" == "gnu10-hpc-ofi-testsuite"
|
||||
%define compiler_family gnu
|
||||
%define c_f_ver 10
|
||||
%define testsuite 1
|
||||
%define build_flavor ofi
|
||||
%{bcond_without hpc}
|
||||
%endif
|
||||
|
||||
%if "%{build_flavor}" != "ucx"
|
||||
%define pack_suff %{?build_flavor:-%{build_flavor}}
|
||||
%endif
|
||||
|
||||
%if %{without hpc}
|
||||
%define module_name mvapich3%{?pack_suff}
|
||||
@ -242,20 +179,31 @@ License: BSD-3-Clause
|
||||
Group: Development/Libraries/Parallel
|
||||
Version: %{vers}
|
||||
Release: 0
|
||||
Source0: http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich-%{version}.tar.gz
|
||||
Source0: http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich-%{version}%{?rc_ver}.tar.gz
|
||||
Source1: mpivars.sh
|
||||
Source2: mpivars.csh
|
||||
Source3: macros.hpc-mvapich3
|
||||
Source100: _multibuild
|
||||
Patch1: 0001-fix-control-reaches-end-of-non-void-function.patch
|
||||
Patch0: mvapich3-s390_get_cycles.patch
|
||||
Patch1: pass-correct-size-to-snprintf.patch
|
||||
# Backport from mpich
|
||||
Patch2: mpl-warnings-missing-return.patch
|
||||
Patch3: mpi-coll-missing-return.patch
|
||||
Patch4: autoconf-pull-dynamic-and-not-static-libs-from-pkg-config.patch
|
||||
Patch5: config-replace-AC_TRY_-COMPILE-LINK-RUN.patch
|
||||
|
||||
URL: http://mvapich.cse.ohio-state.edu
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
# Exclude 32b archs
|
||||
ExcludeArch: %{arm} %ix86
|
||||
%if %{without skip_hpc_build}
|
||||
ExclusiveArch: do_not_build
|
||||
%endif
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: automake
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
@ -263,10 +211,10 @@ BuildRequires: hwloc-devel >= 2.0
|
||||
%ifnarch s390 s390x %{arm}
|
||||
BuildRequires: libnuma-devel
|
||||
%endif
|
||||
BuildRequires: libnl3-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: sysfsutils
|
||||
BuildRequires: python3
|
||||
%if %{without hpc}
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gcc-fortran
|
||||
@ -282,29 +230,18 @@ BuildRequires: hwloc-devel
|
||||
%if %{with pmix}
|
||||
BuildRequires: pmix-devel
|
||||
%endif
|
||||
%if "%{build_flavor}" == "ofi"
|
||||
%if "%{build_flavor}" == "ofi" && %{with skip_hpc_build}
|
||||
BuildRequires: libfabric-devel
|
||||
%ifarch x86_64
|
||||
BuildRequires: libpsm2-devel
|
||||
%endif
|
||||
BuildRequires: libibverbs-devel
|
||||
BuildRequires: librdmacm-devel
|
||||
%endif
|
||||
|
||||
%if "%{build_flavor}" == "ucx"
|
||||
BuildRequires: libucm-devel >= 1.7.0
|
||||
BuildRequires: libucp-devel >= 1.7.0
|
||||
BuildRequires: libucs-devel >= 1.7.0
|
||||
BuildRequires: libuct-devel >= 1.7.0
|
||||
BuildRequires: libucm-devel
|
||||
BuildRequires: libucp-devel
|
||||
BuildRequires: libucs-devel
|
||||
BuildRequires: libuct-devel
|
||||
# UCX is only available for 64b archs
|
||||
ExcludeArch: %ix86 %arm
|
||||
%endif
|
||||
|
||||
# Temporary: armv7 is broken due to Fortran Float issues
|
||||
ExcludeArch: %arm
|
||||
|
||||
BuildRequires: python3
|
||||
|
||||
%if %{without hpc}
|
||||
Requires: mpi-selector
|
||||
%else
|
||||
@ -312,8 +249,8 @@ Requires: mpi-selector
|
||||
%endif
|
||||
|
||||
%description
|
||||
This is an MPI-3 implementation which includes all MPI-1 features. It
|
||||
is based on MPICH2 and MVICH.
|
||||
This is an MPI-3 implementation which includes all MPI-1 and MPI-2 features. It
|
||||
is based on MPICH3 and MVICH.
|
||||
|
||||
%{!?testsuite:%{?with_hpc:%{hpc_master_package -a -L}}}
|
||||
|
||||
@ -323,15 +260,6 @@ is based on MPICH2 and MVICH.
|
||||
Summary: OSU MVAPICH3 MPI package
|
||||
Group: Development/Libraries/Parallel
|
||||
Requires: %{name} = %{version}
|
||||
%if "%{build_flavor}" == "ofi"
|
||||
Requires: libfabric-devel
|
||||
%endif
|
||||
%if "%{build_flavor}" == "ucx"
|
||||
Requires: libucm-devel >= 1.7.0
|
||||
Requires: libucp-devel >= 1.7.0
|
||||
Requires: libucs-devel >= 1.7.0
|
||||
Requires: libuct-devel >= 1.7.0
|
||||
%endif
|
||||
%if %{without hpc}
|
||||
Requires: gcc-c++
|
||||
Requires: gcc-fortran
|
||||
@ -340,11 +268,12 @@ Requires: gcc-fortran
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
This is an MPI-2 implementation which includes all MPI-1 features. It
|
||||
is based on MPICH2 and MVICH.
|
||||
This is an MPI-3 implementation which includes all MPI-1 and MPI-2 features. It
|
||||
is based on MPICH3 and MVICH.
|
||||
|
||||
%{?with_hpc:%{hpc_master_package -a devel}}
|
||||
|
||||
%if 0%{?build_static_devel}
|
||||
%package devel-static
|
||||
Summary: OSU MVAPICH3 MPI package - static libraries
|
||||
Group: Development/Libraries/Parallel
|
||||
@ -352,7 +281,8 @@ Requires: %{name}-devel = %{version}
|
||||
|
||||
%description devel-static
|
||||
This is an MPI-3 implementation which includes all MPI-1 and MPI-2 features. It
|
||||
is based on MPICH2 and MVICH. This package contains the static libraries
|
||||
is based on MPICH3. This package contains the static libraries
|
||||
%endif
|
||||
|
||||
%package doc
|
||||
Summary: OSU MVAPICH3 MPI package - Documentation
|
||||
@ -361,7 +291,7 @@ Requires: %{name} = %{version}
|
||||
|
||||
%description doc
|
||||
This is an MPI-3 implementation which includes all MPI-1 and MPI-2 features. It
|
||||
is based on MPICH2 and MVICH. This package contains the static libraries
|
||||
is based on MPICH3 and MVICH. This package contains the static libraries
|
||||
|
||||
%{?with_hpc:%{hpc_master_package doc}}
|
||||
|
||||
@ -383,12 +313,11 @@ is based on MPICH2 and MVICH. This package contains the static libraries
|
||||
%prep
|
||||
|
||||
%{?with_hpc:%hpc_debug}
|
||||
%setup -q -n mvapich-%{version}
|
||||
%patch1 -p1
|
||||
# usually done by autogen.sh
|
||||
cp src/mpl/src/sock/mpl_sockaddr.c src/mpi/romio/mpl/src/sock/mpl_sockaddr.c
|
||||
cp src/mpl/src/sock/mpl_sockaddr.c src/pm/hydra/mpl/src/sock/mpl_sockaddr.c
|
||||
cp src/mpl/src/sock/mpl_sockaddr.c src/pm/hydra2/mpl/src/sock/mpl_sockaddr.c
|
||||
%setup -q -n mvapich-%{version}%{?rc_ver}
|
||||
%autopatch -p0
|
||||
|
||||
cp /usr/share/automake*/config.* .
|
||||
|
||||
|
||||
%build
|
||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||
@ -398,7 +327,7 @@ cp src/mpl/src/sock/mpl_sockaddr.c src/pm/hydra2/mpl/src/sock/mpl_sockaddr.c
|
||||
export FFLAGS="-fallow-argument-mismatch $FFLAGS"
|
||||
%endif
|
||||
|
||||
# disabled - creates broken configure script - ./autogen.sh
|
||||
./autogen.sh --without-ucx --without-ofi
|
||||
%if %{with hpc}
|
||||
%{hpc_setup}
|
||||
%{hpc_configure} \
|
||||
@ -412,11 +341,10 @@ export FFLAGS="-fallow-argument-mismatch $FFLAGS"
|
||||
--libdir=%{p_libdir} \
|
||||
--libexecdir=%{p_libexecdir} \
|
||||
--mandir=%{p_mandir} \
|
||||
--with-device=ch4:ofi \
|
||||
%endif
|
||||
--docdir=%{_datadir}/doc/%{name} \
|
||||
--disable-rpath \
|
||||
--disable-wrapper-rpath \
|
||||
--enable-yield=sched_yield \
|
||||
%if %{with hwloc}
|
||||
--with-hwloc-prefix=%{_prefix} \
|
||||
%endif
|
||||
@ -458,6 +386,11 @@ rm -f %{buildroot}%{p_libdir}/libfmpich.la \
|
||||
%{buildroot}%{p_libdir}/libmpi.la \
|
||||
%{buildroot}%{p_libdir}/libmpicxx.la \
|
||||
%{buildroot}%{p_libdir}/libmpifort.la
|
||||
|
||||
%if !0%{?build_static_devel}
|
||||
find %{buildroot} -name "*.a" -delete
|
||||
%endif
|
||||
|
||||
install -m 0755 -d %{buildroot}%{_datadir}/doc/%{name}
|
||||
install -m 0644 COPYRIGHT* %{buildroot}%{_datadir}/doc/%{name}
|
||||
install -m 0644 CHANGE* %{buildroot}%{_datadir}/doc/%{name}
|
||||
@ -563,6 +496,7 @@ fi
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc CHANGES CHANGELOG COPYRIGHT README README.envvar README-MVAPICH README_MVP.envvar
|
||||
%if %{without hpc}
|
||||
%dir /usr/%_lib/mpi
|
||||
%dir /usr/%_lib/mpi/gcc
|
||||
@ -573,8 +507,6 @@ fi
|
||||
%hpc_mpi_dirs
|
||||
%hpc_modules_files
|
||||
%endif
|
||||
%doc %{_datadir}/doc/%{name}/COPYRIGHT*
|
||||
%doc %{_datadir}/doc/%{name}/CHANGE*
|
||||
%dir %{p_prefix}
|
||||
%dir %{p_bindir}
|
||||
%dir %{p_datadir}
|
||||
@ -594,17 +526,22 @@ fi
|
||||
%doc %{_datadir}/doc/%{name}
|
||||
%exclude /%{_datadir}/doc/%{name}/COPYRIGHT*
|
||||
%exclude /%{_datadir}/doc/%{name}/CHANGE*
|
||||
%exclude /%{_datadir}/doc/%{name}/README*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{p_libdir}/pkgconfig
|
||||
%dir %{p_libdir}/pkgconfig
|
||||
%{p_mandir}/man3/*
|
||||
%{p_includedir}
|
||||
%{p_libdir}/*.so
|
||||
%{p_libdir}/pkgconfig/mvapich.pc
|
||||
%{p_libdir}/pkgconfig/yaksa.pc
|
||||
|
||||
%if 0%{?build_static_devel}
|
||||
%files devel-static
|
||||
%defattr(-,root,root)
|
||||
%{p_libdir}/*.a
|
||||
%endif
|
||||
|
||||
%if %{with hpc}
|
||||
%files macros-devel
|
||||
|
261
pass-correct-size-to-snprintf.patch
Normal file
261
pass-correct-size-to-snprintf.patch
Normal file
@ -0,0 +1,261 @@
|
||||
commit 8a3405cf8d4e5a95bc46a7c518c1fd2809cf5417
|
||||
Author: Nicolas Morey <nmorey@suse.com>
|
||||
Date: Fri Nov 10 10:59:04 2023 +0100
|
||||
|
||||
pass correct size to snprintf
|
||||
|
||||
Fix potential buffer overflows (required to make 'sundials' testsuite pass)
|
||||
|
||||
Signed-off-by: Nicolas Morey <nmorey@suse.com>
|
||||
|
||||
diff --git src/mpid/ch3/channels/common/src/affinity/hwloc_bind.c src/mpid/ch3/channels/common/src/affinity/hwloc_bind.c
|
||||
index 45a31c7ab228..fd4e1d92f1bf 100644
|
||||
--- src/mpid/ch3/channels/common/src/affinity/hwloc_bind.c
|
||||
+++ src/mpid/ch3/channels/common/src/affinity/hwloc_bind.c
|
||||
@@ -2245,7 +2245,7 @@ int smpi_identify_free_cores(hwloc_cpuset_t *sock_cpuset,
|
||||
for (i = 0; i < g_smpi.num_local_nodes; ++i) {
|
||||
hwloc_bitmap_clr(*free_sock_cpuset, local_core_ids[i]);
|
||||
}
|
||||
- hwloc_bitmap_snprintf(cpu_str, 128, *free_sock_cpuset);
|
||||
+ hwloc_bitmap_snprintf(cpu_str, sizeof(cpu_str), *free_sock_cpuset);
|
||||
PRINT_DEBUG(DEBUG_INIT_verbose, "Free sock_cpuset = %s\n", cpu_str);
|
||||
}
|
||||
|
||||
@@ -3386,12 +3386,12 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
curr = count;
|
||||
for (k = 0; k < num_app_threads; k++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[curr]);
|
||||
curr = (curr + 1) % num_pu;
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
count = (count + hw_threads_per_core) % num_pu;
|
||||
}
|
||||
} else if (mvp_hybrid_binding_policy == HYBRID_LINEAR) {
|
||||
@@ -3400,7 +3400,7 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
* physical resources */
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
for (k = 0; k < num_app_threads; k++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[curr]);
|
||||
|
||||
curr = ((curr + hw_threads_per_core) >= num_pu) ?
|
||||
@@ -3408,7 +3408,7 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
(curr + hw_threads_per_core) % num_pu;
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
}
|
||||
} else if (mvp_hybrid_binding_policy == HYBRID_SPREAD) {
|
||||
#if defined(CHANNEL_MRAIL)
|
||||
@@ -3432,12 +3432,12 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
for (k = curr; k < curr + chunk; k++) {
|
||||
for (l = 0; l < hw_threads_per_core; l++) {
|
||||
j +=
|
||||
- snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[k * hw_threads_per_core + l]);
|
||||
}
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
curr = (curr + chunk) % size;
|
||||
}
|
||||
} else {
|
||||
@@ -3454,11 +3454,11 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
for (k = curr; k < curr + ranks_per_sock; k++) {
|
||||
for (l = 0; l < hw_threads_per_core; l++) {
|
||||
j +=
|
||||
- snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[k * hw_threads_per_core + l]);
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
}
|
||||
curr = (curr +
|
||||
((num_pu_per_socket / hw_threads_per_core) * chunk)) %
|
||||
@@ -3470,12 +3470,12 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
* socket followed by second secket */
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
for (l = 0; l < num_app_threads; l++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[k]);
|
||||
k = (k + hw_threads_per_core) % size;
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
}
|
||||
} else if (mvp_hybrid_binding_policy == HYBRID_SCATTER) {
|
||||
#if defined(CHANNEL_MRAIL)
|
||||
@@ -3495,11 +3495,11 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
}
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
for (l = 0; l < num_app_threads; l++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[node_base_pu + node_offset + l]);
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
node_base_pu = (node_base_pu + num_pu_per_socket) % size;
|
||||
/*
|
||||
* when wrapping around to the first socket, advance the offset
|
||||
@@ -3541,11 +3541,11 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
for (l = 0; l < num_app_threads; l++) {
|
||||
j += snprintf(
|
||||
- mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map_per_numa[node_base_pu + node_offset + l]);
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
node_base_pu = (node_base_pu + num_pu_per_numanode) % size;
|
||||
/*
|
||||
* when wrapping around to the first numa, advance the offset
|
||||
diff --git src/mpid/ch4/netmod/mvp/hwloc_bind.c src/mpid/ch4/netmod/mvp/hwloc_bind.c
|
||||
index 44e867b6b19f..4440d4739dc0 100644
|
||||
--- src/mpid/ch4/netmod/mvp/hwloc_bind.c
|
||||
+++ src/mpid/ch4/netmod/mvp/hwloc_bind.c
|
||||
@@ -2145,7 +2145,7 @@ int smpi_identify_free_cores(hwloc_cpuset_t *sock_cpuset,
|
||||
for (i = 0; i < mvp_smp_info.num_local_nodes; ++i) {
|
||||
hwloc_bitmap_clr(*free_sock_cpuset, local_core_ids[i]);
|
||||
}
|
||||
- hwloc_bitmap_snprintf(cpu_str, 128, *free_sock_cpuset);
|
||||
+ hwloc_bitmap_snprintf(cpu_str, sizeof(cpu_str), *free_sock_cpuset);
|
||||
PRINT_DEBUG(DEBUG_INIT_verbose, "Free sock_cpuset = %s\n", cpu_str);
|
||||
}
|
||||
|
||||
@@ -3273,7 +3273,7 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
/* one app thread or enough phsyical cores for all threads */
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
for (k = 0; k < num_app_threads; k++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[curr]);
|
||||
|
||||
curr =
|
||||
@@ -3282,7 +3282,7 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
(curr + hw_threads_per_core) % num_pu;
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
@@ -3292,12 +3292,12 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
curr = count;
|
||||
for (k = 0; k < num_app_threads; k++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[curr]);
|
||||
curr = (curr + 1) % num_pu;
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
count = (count + hw_threads_per_core) % num_pu;
|
||||
}
|
||||
}
|
||||
@@ -3326,12 +3326,12 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
curr = count;
|
||||
for (k = 0; k < num_app_threads; k++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[curr]);
|
||||
curr = (curr + 1) % num_pu;
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
count = (count + hw_threads_per_core) % num_pu;
|
||||
}
|
||||
break;
|
||||
@@ -3359,12 +3359,12 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
for (k = curr; k < curr + chunk; k++) {
|
||||
for (l = 0; l < hw_threads_per_core; l++) {
|
||||
j += snprintf(
|
||||
- mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[k * hw_threads_per_core + l]);
|
||||
}
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
curr = (curr + chunk) % size;
|
||||
}
|
||||
} else {
|
||||
@@ -3381,11 +3381,11 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
for (k = curr; k < curr + ranks_per_sock; k++) {
|
||||
for (l = 0; l < hw_threads_per_core; l++) {
|
||||
j += snprintf(
|
||||
- mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[k * hw_threads_per_core + l]);
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
}
|
||||
curr = (curr + ((num_pu_per_socket / hw_threads_per_core) *
|
||||
chunk)) %
|
||||
@@ -3398,12 +3398,12 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
* first socket followed by second secket. */
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
for (l = 0; l < num_app_threads; l++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[k]);
|
||||
k = (k + hw_threads_per_core) % size;
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
}
|
||||
break;
|
||||
case MVP_HYBRID_BINDING_POLICY_SCATTER:
|
||||
@@ -3425,11 +3425,11 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
}
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
for (l = 0; l < num_app_threads; l++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[node_base_pu + node_offset + l]);
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
node_base_pu = (node_base_pu + num_pu_per_socket) % size;
|
||||
/*
|
||||
* when wrapping around to the first socket, advance the offset
|
||||
@@ -3468,11 +3468,11 @@ static int mvp_generate_implicit_cpu_mapping(int local_procs,
|
||||
* domains in round-robin fashion. */
|
||||
for (i = 0; i < local_procs; i++) {
|
||||
for (l = 0; l < num_app_threads; l++) {
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, "%d,",
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, "%d,",
|
||||
mvp_core_map[node_base_pu + node_offset + l]);
|
||||
}
|
||||
mapping[--j] = '\0';
|
||||
- j += snprintf(mapping + j, _POSIX2_LINE_MAX, ":");
|
||||
+ j += snprintf(mapping + j, sizeof(mapping)-j, ":");
|
||||
node_base_pu = (node_base_pu + num_pu_per_numanode) % size;
|
||||
/*
|
||||
* when wrapping around to the first numa, advance the offset
|
Loading…
Reference in New Issue
Block a user