SHA256
1
0
forked from pool/mvapich2

Accepting request 1007635 from science:HPC

OBS-URL: https://build.opensuse.org/request/show/1007635
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mvapich2?expand=0&rev=32
This commit is contained in:
Dominique Leuenberger 2022-10-03 11:46:54 +00:00 committed by Git OBS Bridge
commit 60a4aaa583
3 changed files with 96 additions and 1 deletions

View File

@ -0,0 +1,70 @@
commit 2a05bb1eba231f7b95ddb3fdeec21146b99e43f1
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Date: Wed Jul 6 15:21:38 2022 +0200
mvapich2: allow building with external hwloc
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
diff --git Makefile.am Makefile.am
index 17788bb3ba49..c8cfeb941de7 100644
--- Makefile.am
+++ Makefile.am
@@ -203,9 +203,11 @@ if BUILD_OSU_MVAPICH
if BUILD_HWLOC_v1
SUBDIRS += contrib/hwloc_v1
else
+if BUILD_HWLOC_v2
SUBDIRS += contrib/hwloc_v2
endif
endif
+endif
# build the current directory and then the examples directory after everything else
SUBDIRS += . examples
@@ -222,8 +224,12 @@ if BUILD_HWLOC_v1
AM_CPPFLAGS += -Icontrib/hwloc_v1/include/ -I$(top_srcdir)/contrib/hwloc_v1/include
lib_lib@MPILIBNAME@_la_LIBADD += contrib/hwloc_v1/src/libhwloc_embedded.la
else
+if BUILD_HWLOC_v2
AM_CPPFLAGS += -Icontrib/hwloc_v2/include/ -I$(top_srcdir)/contrib/hwloc_v2/include
-lib_lib@MPILIBNAME@_la_LIBADD += contrib/hwloc_v2/hwloc/libhwloc_embedded.la
+lib_lib@MPILIBNAME@_la_LIBADD += contrib/hwloc_v2/src/libhwloc_embedded.la
+else
+lib_lib@MPILIBNAME@_la_LDFLAGS += -lhwloc
+endif
endif
endif
diff --git configure.ac configure.ac
index d073cb1bef5e..b82de7a9a5fb 100644
--- configure.ac
+++ configure.ac
@@ -539,18 +539,24 @@ dnl based on the environment.
AC_ARG_WITH(hwloc,
AC_HELP_STRING([--with-hwloc=version],
[Specify the hwloc version to use with MVAPICH2
- (Options: v1, v2) (Default: v1)]),,
+ (Options: v1, v2, external) (Default: v1)]),,
with_hwloc=v1)
AM_CONDITIONAL([BUILD_HWLOC_v1], [test x$with_hwloc = xv1])
AM_CONDITIONAL([BUILD_HWLOC_v2], [test x$with_hwloc = xv2])
+AM_CONDITIONAL([BUILD_HWLOC_EXT], [test x$with_hwloc = xexternal])
if test "$with_hwloc" = "v1" ; then
AC_CONFIG_SUBDIRS([contrib/hwloc_v1])
AC_DEFINE([_USE_HWLOC_V1_], 1, [Define when using HWLOC V1])
else
- AC_CONFIG_SUBDIRS([contrib/hwloc_v2])
- AC_DEFINE([_USE_HWLOC_V2_], 1, [Define when using HWLOC V2])
+ if test "$with_hwloc" = "v2" ; then
+ AC_CONFIG_SUBDIRS([contrib/hwloc_v2])
+ AC_DEFINE([_USE_HWLOC_V2_], 1, [Define when using HWLOC V2])
+ else
+ AC_DEFINE([_USE_HWLOC_EXT_], 1, [Define when using HWLOC External])
+ AC_DEFINE([_USE_HWLOC_V2_], 1, [Define when using HWLOC V2])
+ fi
fi
AC_ARG_WITH(device,

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jul 6 15:08:09 UTC 2022 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Add mvapich2-allow-building-with-external-hwloc.patch
to allow building against an external hwloc library
- Build mvapich2 HPC flavors against pmix and hwloc system libraries
-------------------------------------------------------------------
Wed Jun 29 12:54:33 UTC 2022 - Klaus Kämpf <kkaempf@suse.com>

View File

@ -213,6 +213,8 @@ ExclusiveArch: do_not_build
%define p_libexecdir %{p_prefix}/%{_lib}
%define _moduledir /usr/share/modules/gnu-%{module_name}
%define package_name mvapich2%{?pack_suff}
%{bcond_with pmix}
%{bcond_with hwloc}
%else
%{hpc_init -M -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} -m mvapich2 %{?pack_suff:-e %{build_flavor}}}
%define p_prefix %{hpc_prefix}
@ -227,6 +229,8 @@ ExclusiveArch: do_not_build
%global hpc_mvapich2_dep_version %(VER=%{?m_f_ver}; echo -n ${VER})
%global hpc_mvapich2_dir mvapich2
%global hpc_mvapich2_pack_version %{hpc_mvapich2_dep_version}
%{bcond_without pmix}
%{bcond_without hwloc}
%endif
# Disable hpc builds for SLE12
@ -254,7 +258,7 @@ Patch2: mvapich2-arm-support.patch
Patch3: 0001-Drop-GCC-check.patch
Patch4: reproducible.patch
Patch5: pass-correct-size-to-snprintf.patch
Patch6: mvapich2-allow-building-with-external-hwloc.patch
## Armv7 specific patches
# PATCH-FIX-UPSTREAM 0001-Drop-real128.patch (https://github.com/pmodels/mpich/issues/4005)
Patch50: 0001-Drop-real128.patch
@ -273,6 +277,7 @@ BuildRequires: automake
BuildRequires: automake
BuildRequires: bison
BuildRequires: flex
BuildRequires: hwloc-devel >= 2.0
%ifnarch s390 s390x %{arm}
BuildRequires: libnuma-devel
%endif
@ -288,6 +293,12 @@ BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
BuildRequires: lua-lmod
BuildRequires: suse-hpc
%endif
%if %{with hwloc}
BuildRequires: hwloc-devel
%endif
%if %{with pmix}
BuildRequires: pmix-devel
%endif
%if "%{build_flavor}" == "psm" && %{with skip_hpc_build}
ExclusiveArch: %ix86 x86_64
BuildRequires: infinipath-psm-devel
@ -392,6 +403,7 @@ is based on MPICH2 and MVICH. This package contains the static libraries
%patch3
%patch4
%patch5 -p1
%patch6
# Only apply these patches on Armv7
%ifarch armv7hl
@ -426,6 +438,12 @@ PERL_USE_UNSAFE_INC=1 ./autogen.sh
--docdir=%{_datadir}/doc/%{name} \
--disable-wrapper-rpath \
--enable-yield=sched_yield \
%if %{with hwloc}
--with-hwloc=external \
%endif
%if %{with pmix}
--with-pmix=${_prefix} \
%endif
%if "%{build_flavor}" == "psm"
--with-device=ch3:psm \
--with-psm=/usr \