openmpi: update build-script and config

This commit is contained in:
2024-09-10 16:27:35 +02:00
6 changed files with 174 additions and 104 deletions

View File

@@ -1,15 +1,25 @@
#!/usr/bin/env modbuild
pbuild::install_docfiles 'AUTHORS' 'LICENSE' 'NEWS' 'README'
pbuild::pre_configure() {
pbuild::add_configure_args "--prefix=${PREFIX}"
pbuild::add_configure_args "--enable-mpi-cxx"
pbuild::add_configure_args "--enable-mpi-cxx-seek"
pbuild::add_configure_args "--enable-orterun-prefix-by-default"
pbuild::add_configure_args "--enable-shared"
pbuild::add_configure_args "--enable-static"
pbuild::add_configure_args "--with-slurm=yes"
if (( V_MAJOR < 5 )); then
pbuild::add_configure_args "--enable-mpi-cxx"
pbuild::add_configure_args "--enable-mpi-cxx-seek"
pbuild::add_configure_args "--with-pmi=/usr"
pbuild::add_configure_args "--with-pmi-libdir=/usr/lib64/slurmpmi"
pbuild::add_configure_args "--enable-orterun-prefix-by-default"
fi
if (( V_MAJOR >= 5 )); then
pbuild::add_configure_args "--enable-prte-prefix-by-default"
fi
if (( V_MAJOR < 4 )); then
pbuild::add_configure_args "--enable-mpi-f90"
pbuild::add_configure_args "--enable-mpi-profile"
pbuild::add_configure_args "--enable-smp-locks"
fi
if (( V_MAJOR >= 4 )); then
pbuild::add_configure_args "--enable-mpi-fortran"
pbuild::add_configure_args "--without-verbs"
fi
if [[ -v CUDA_VERSION ]]; then
pbuild::add_configure_args "--with-cuda=${CUDA_HOME}"
@@ -27,15 +37,27 @@ pbuild::pre_configure() {
fi
if [[ -v PMIX_VERSION ]]; then
std::info "Enabling PMIX ${PMIX_VERSION}"
unset PMIX_VERSION
pbuild::add_configure_args "--with-pmix=${PMIX_PREFIX}"
fi
if [[ ! -v LIBFABRIC_VERSION ]]; then
if pkg-config --exists libfabric; then
std::info "Get LIBFABRIC_VERSION via pkg-config"
LIBFABRIC_PREFIX=$(pkg-config --variable=prefix libfabric)
LIBFABRIC_VERSION="$(LIBFABRIC_PREFIX##*/)"
fi
fi
std::info "LIBFABRIC_PREFIX: ${LIBFABRIC_PREFIX}"
std::info "LIBFABRIC_VERSION=: ${LIBFABRIC_VERSION}"
if [[ -v LIBFABRIC_VERSION ]]; then
std::info "Enabling libfabric ${LIBFABRIC_VERSION}"
pbuild::add_configure_args "--with-ofi=${LIBFABRIC_PREFIX}"
fi
if [[ -v UCX_VERSION ]]; then
std::info "Enabling UCX ${UCX_VERSION}"
pbuild::add_configure_args "--with-ucx=${UCX_PREFIX}"
fi
@@ -48,31 +70,23 @@ pbuild::pre_configure() {
pbuild::add_configure_args "LDFLAGS=-Wc,-static-intel,-O0"
fi
# if pbuild::use_flag slurm || pbuild::use_flag dgx || pbuild::use_flag merlin6; then
# pbuild::add_configure_args "--with-gpfs=/usr/lpp/mmfs"
# pbuild::add_configure_args "--with-pmi"
# # pbuild::add_configure_args "--with-pmi-libdir=/usr/lib64/"
#
# if pbuild::use_flag "libpmix"; then
# pbuild::add_configure_args "--enable-install-libpmix"
# fi
# fi
local version
(( version = (${V_MAJOR} * 100 + ${V_MINOR}) * 100 + V_PATCHLVL ))
if (( V_MAJOR < 4 )); then
pbuild::add_configure_args "--enable-mpi-f90"
pbuild::add_configure_args "--enable-mpi-profile"
pbuild::add_configure_args "--enable-smp-locks"
elif (( V_MAJOR >= 4 )); then
pbuild::add_configure_args "--enable-mpi-fortran"
pbuild::add_configure_args "--without-verbs"
if pbuild::use_flag slurm || pbuild::use_flag dgx || pbuild::use_flag merlin6 || pbuild::use_flag merlin7; then
std::info "Enabling SLURM."
pbuild::add_configure_args "--with-slurm=yes"
fi
if pbuild::use_flag slurm || pbuild::use_flag dgx || pbuild::use_flag merlin6; then
std::info "Enabling GPFS."
pbuild::add_configure_args "--with-gpfs=/usr/lpp/mmfs"
fi
if pbuild::use_flag "libpmix"; then
std::info "Enabling install of libpmix."
pbuild::add_configure_args "--enable-install-libpmix"
fi
}
pbuild::post_install() {
if ! pbuild::use_flag slurm && ! pbuild::use_flag dgx && ! pbuild::use_flag merlin6; then
pbuild::post_install_no_slurm() {
if ! pbuild::use_flag slurm && ! pbuild::use_flag dgx && ! pbuild::use_flag merlin6 && ! pbuild::use_flag merlin7; then
mkdir -p "${PREFIX}/lib/fallback"
local -r binary=$(ls "${PREFIX}"/lib/libmpi.so.*.*.*)
pbuild::install_shared_libs "${binary}" "${PREFIX}/lib/fallback" '/libuc[mpst].so'
@@ -84,17 +98,20 @@ pbuild::post_install() {
pbuild::install_shared_libs "${binary}" "${PREFIX}/lib/fallback" '/libpmi2.so'
pbuild::install_shared_libs "${binary}" "${PREFIX}/lib/fallback" '/libpmi2.so'
fi
}
pbuild::post_install() {
if [[ -v CUDA_VERSION ]]; then
echo "opal_warn_on_missing_libcuda = 0" >> ${PREFIX}/etc/openmpi-mca-params.conf
echo "opal_warn_on_missing_libcuda = 0" >> ${PREFIX}/etc/openmpi-mca-params.conf
fi
for FILE in $(find $PREFIX -type f \( ! -name "*.a" -and ! -name "*.mod" \) -exec grep -IL . "{}" \;)
do
OLD_RPATH=$(objdump -a -x $FILE | grep RPATH | awk '{print $2}')
NEW_RPATH=$(echo $OLD_RPATH | sed 's/:\/usr\/lib64:/:/g')
if [[ "${OLD_RPATH}" != "${NEW_RPATH}" ]]; then
patchelf --force-rpath --set-rpath "${NEW_RPATH}" "${FILE}"
fi
done
}
# for FILE in $(find $PREFIX -type f \( ! -name "*.a" -and ! -name "*.mod" \) -exec grep -IL .
"{}" \;)
# do
# OLD_RPATH=$(objdump -a -x $FILE | grep RPATH | awk '{print $2}')
# NEW_RPATH=$(echo $OLD_RPATH | sed 's/:\/usr\/lib64:/:/g')
# if [[ "${OLD_RPATH}" != "${NEW_RPATH}" ]]; then
# patchelf --force-rpath --set-rpath "${NEW_RPATH}" "${FILE}"
# fi
# done

View File

@@ -6,7 +6,11 @@ openmpi:
group: Compiler
overlay: base
relstage: stable
systems: [rhel7, rhel8, rhel9]
configure_args:
- --enable-shared
- --enable-static
docfiles: [AUTHORS, LICENSE, NEWS, README]
urls:
- url: https://download.open-mpi.org/release/open-mpi/v${V_MAJOR}.${V_MINOR}/openmpi-${V_PKG}.tar.bz2
@@ -53,8 +57,27 @@ openmpi:
openmpi-4.1.4.tar.bz2: 92912e175fd1234368c8730c03f4996fe5942e7479bb1d10059405e7f2b3930d
openmpi-4.1.5.tar.bz2: a640986bc257389dd379886fdae6264c8cfa56bc98b71ce3ae3dfbd8ce61dbe3
openmpi-4.1.6.tar.bz2: f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415
openmpi-5.0.5.tar.bz2: 6588d57c0a4bd299a24103f4e196051b29e8b55fbda49e11d5b3d32030a32776
versions:
5.0.5:
variants:
- systems: [.*.merlin7.psi.ch]
relstage: unstable
overlay: Alps
use_overlays: [PSI]
group_deps:
compiler: {gcc: [12.3.0]}
build_requires: [pmix/5.0.3, hwloc/2.11.1, patchelf/0.14.5]
# build_requires: [pmix/5.0.3, ucx/1.15.0_slurm, hwloc/2.9.1, patchelf/0.14.5]
runtime_deps: [cuda/12.2.0]
configure_args+:
- --with-ofi=/opt/cray/libfabric/1.15.2.0
- --enable-mpi1-compatibility
- --with-cxi
- --with-lustre
- --with-slingshot
4.1.6:
variants:
- systems: [merlin-.*]
@@ -71,19 +94,27 @@ openmpi:
- LDFLAGS=-g
- --with-gpfs=/usr/lpp/mmfs
- --with-pmi=/usr
- systems: [ra-.*]
suffix: _ra
group_deps:
compiler: {gcc: [9.5.0, 10.4.0, 11.4.0, 12.3.0, 13.1.0]}
build_requires: [pmix/4.2.4, ucx/1.14.1_slurm, hwloc/2.9.1, patchelf/0.14.5]
runtime_deps: [cuda/12.1.1]
- systems: [.*.merlin7.psi.ch]
relstage: unstable
overlay: Alps
used_overlays: [PSI, Alps]
group_deps:
compiler: {gcc: [12.3.0]}
build_requires: [pmix/5.0.3, ucx/1.14.1_slurm, hwloc/2.9.1, patchelf/0.14.5]
runtime_deps: [cuda/12.1.1]
build_requires: [pmix/4.2.9, hwloc/2.11.1, patchelf/0.14.5]
runtime_deps: [cuda/12.2.0]
configure_args+:
- --with-ofi=/opt/cray/libfabric/1.15.2.0
- --enable-mpi1-compatibility
- --with-lustre
use_overlays: [PSI, Alps]
use_flags: [merlin7]
4.1.4:
variants:

View File

@@ -0,0 +1,50 @@
openmpi/3.1.4_merlin6 deprecated gcc/{7.4.0,8.3.0}
openmpi/3.1.5_merlin6 deprecated gcc/{7.3.0,7.4.0,8.3.0,9.2.0}
openmpi/3.1.5_merlin6 deprecated intel/{15.2,17.4,18.4}
openmpi/3.1.5-1_merlin6 deprecated gcc/{7.3.0,7.4.0,8.3.0,9.2.0}
openmpi/3.1.5-1_merlin6 deprecated intel/{15.2,17.4,18.4}
openmpi/2.1.6_slurm deprecated gcc/{4.9.4,5.5.0,6.5.0,7.4.0,8.3.0,9.2.0}
openmpi/2.1.6_slurm deprecated intel/{15.2,17.4,18.4}
openmpi/3.0.5_slurm deprecated gcc/{4.9.4,5.5.0,6.5.0,7.4.0,8.3.0,9.2.0}
openmpi/3.0.5_slurm deprecated intel/{15.2,17.4,18.4}
openmpi/3.1.6_slurm deprecated gcc/{4.9.4,5.5.0,6.5.0}
openmpi/3.1.6_slurm stable gcc/{7.5.0,8.4.0,9.3.0}
openmpi/3.1.6_slurm deprecated intel/{15.2,17.4,18.4,20.1}
openmpi/3.1.6_slurm deprecated intel/20.4 cuda/11.1.0
openmpi/4.0.3_slurm deprecated gcc/{4.9.4,5.5.0,6.5.0,7.5.0,8.4.0,9.3.0}
openmpi/4.0.3_slurm deprecated intel/{15.2,17.4,18.4,20.1}
openmpi/4.0.4_slurm deprecated gcc/{4.9.4,5.5.0,6.5.0,7.5.0,8.4.0,9.3.0}
openmpi/4.0.4_slurm deprecated intel/{15.2,17.4}
openmpi/4.0.4_slurm deprecated intel/{18.4,20.1}
openmpi/4.0.5_slurm stable gcc/9.2.0 cuda/11.0.3
openmpi/4.0.5_slurm stable gcc/{8.4.0,9.3.0} cuda/11.1.0
openmpi/4.0.5_slurm stable intel/20.4 cuda/11.1.0
openmpi/4.0.5-1_slurm stable gcc/{8.4.0,9.3.0,10.2.0,10.3.0} cuda/11.2.2 b:ucx/1.10.0-1_slurm
openmpi/4.0.5-2_slurm stable gcc/10.2.0 cuda/11.3.0 b:ucx/1.11.0_slurm
openmpi/4.0.7_slurm stable gcc/10.2.0 cuda/11.5.1 b:ucx/1.11.2-2_slurm
openmpi/4.0.7-1_slurm stable gcc/10.2.0 cuda/11.4.3 b:ucx/1.11.2-1_slurm
openmpi/4.1.1_slurm unstable gcc/10.2.0 cuda/11.3.0 b:ucx/1.11.2_slurm
openmpi/4.1.1-1_slurm unstable gcc/10.2.0 cuda/11.3.0 b:ucx/1.10.0_slurm
openmpi/4.1.3_slurm stable gcc/{9.3.0,10.3.0,11.2.0} cuda/11.5.1 b:ucx/1.12.1_slurm
openmpi/4.1.4_slurm stable gcc/10.4.0 cuda/11.5.1 b:ucx/1.12.1_slurm
openmpi/4.1.5_slurm stable gcc/{9.5.0,10.4.0,11.4.0,12.3.0,13.1.0} b:cuda/12.1.1 b:pmix/4.2.4 b:ucx/1.14.1_slurm b:libfabric/1.18.0 b:hwloc/2.9.1 b:patchelf/0.14.5
openmpi/4.1.5_slurm unstable intelcc/22.2 b:cuda/12.1.1 b:pmix/4.2.4 b:ucx/1.14.1_slurm b:libfabric/1.18.0 b:hwloc/2.9.1 b:patchelf/0.14.5
openmpi/4.0.5-1_dgx deprecated gcc/{8.4.0,9.3.0,10.2.0} cuda/11.2.2 b:ucx/1.10.0-1_dgx
openmpi/4.1.0-1_dgx deprecated gcc/10.2.0 cuda/11.2.2 b:ucx/1.10.0-1_dgx
openmpi/4.0.4_slurm_libpmix deprecated gcc/9.3.0

View File

@@ -1,38 +1,20 @@
#!/usr/bin/env modbuild
echo "https://github.com/openpmix/openpmix/releases/download/v${V_PKG}/$P-${V_PKG}.tar.gz"
pbuild::set_download_url "https://github.com/openpmix/openpmix/releases/download/v${V_PKG}/$P-${V_PKG}.tar.gz"
pbuild::add_to_group 'Libraries'
(( version = (${V_MAJOR} * 100 + ${V_MINOR}) * 100 + V_PATCHLVL ))
if (( V_MAJOR > 1 )); then
pbuild::install_docfiles AUTHORS README.md LICENSE NEWS VERSION
else
pbuild::install_docfiles README LICENSE NEWS VERSION
fi
pbuild::compile_in_sourcetree
pbuild::pre_configure() {
if [[ -n "${HWLOC_PREFIX}" ]]; then
pbuild::add_configure_args "--with-hwloc=${HWLOC_PREFIX}"
fi
if [[ -v HWLOC_PREFIX ]]; then
pbuild::add_configure_args "--with-hwloc=${HWLOC_PREFIX}"
fi
if [[ -n "${LIBEVENT_PREFIX}" ]]; then
pbuild::add_configure_args "--with-libevent=${LIBEVENT_PREFIX}"
fi
if [[ -v LIBEVENT_PREFIX ]]; then
pbuild::add_configure_args "--with-libevent=${LIBEVENT_PREFIX}"
fi
if [[ -n "${INTEL_VERSION}" ]]; then
pbuild::add_configure_args "CC=icc"
pbuild::add_configure_args "CXX=icpc"
pbuild::add_configure_args "FC=ifort"
pbuild::add_configure_args "F77=ifort"
pbuild::add_configure_args "F90=ifort"
# pbuild::add_configure_args "LDFLAGS=-Wc,-static-intel"
fi
# pbuild::add_configure_args "--enable-pmi-backward-compatibility"
pbuild::add_configure_args "--enable-shared"
pbuild::add_configure_args "--enable-static"
if [[ -v INTEL_VERSION ]]; then
pbuild::add_configure_args "CC=icc"
build::add_configure_args "CXX=icpc"
pbuild::add_configure_args "FC=ifort"
pbuild::add_configure_args "F77=ifort"
pbuild::add_configure_args "F90=ifort"
# pbuild::add_configure_args "LDFLAGS=-Wc,-static-intel"
fi
}

View File

@@ -1,24 +0,0 @@
#!/usr/bin/env modbuild
pbuild::pre_configure() {
if [[ -v HWLOC_PREFIX ]]; then
pbuild::add_configure_args "--with-hwloc=${HWLOC_PREFIX}"
fi
if [[ -v LIBEVENT_PREFIX ]]; then
pbuild::add_configure_args "--with-libevent=${LIBEVENT_PREFIX}"
fi
if [[ -v INTEL_VERSION ]]; then
pbuild::add_configure_args "CC=icc"
pbuild::add_configure_args "CXX=icpc"
pbuild::add_configure_args "FC=ifort"
pbuild::add_configure_args "F77=ifort"
pbuild::add_configure_args "F90=ifort"
# pbuild::add_configure_args "LDFLAGS=-Wc,-static-intel"
fi
# pbuild::add_configure_args "--enable-pmi-backward-compatibility"
pbuild::add_configure_args "--enable-shared"
pbuild::add_configure_args "--enable-static"
}

View File

@@ -3,7 +3,10 @@ pmix:
defaults:
group: Libraries
relstage: stable
compile_in_sourcetree: yes
compile_in_sourcetree: true
configure_args:
- --enable-shared
- --enable-static
docfiles:
- AUTHORS
- README.md
@@ -11,7 +14,7 @@ pmix:
- NEWS
- VERSION
urls:
- url: "https://github.com/openpmix/openpmix/releases/download/v${V_PKG}/$P-${V_PKG}.tar.gz"
- url: https://github.com/openpmix/openpmix/releases/download/v${V_PKG}/$P-${V_PKG}.tar.gz
shasums:
pmix-1.2.5.tar.gz: d7337601c5b985743e6b6f79ec1a34dfc2aefbb2d04d40b2c0d5bd7100d268ed
pmix-2.2.5.tar.gz: db24480fa5be080e1ddcb273098992b69f8f21e4cd6b8df1682e836b303a2a6f
@@ -19,6 +22,7 @@ pmix:
pmix-4.1.2.tar.gz: a7a6d5b322c261999ce0a6395c0ac7dc359c0ff61380ed4c6935430fb9f5f6e6
pmix-4.2.3.tar.gz: fd45e18e483e42089d4059df9753d9be3cfb68297a05981b1d937e09f7716d5a
pmix-4.2.4.tar.gz: f1fe5fe817ac447ce8d3d88486a1c0d22227efd186e11062aa1f7b0f093089c6
pmix-5.0.3.tar.gz: d9b0b81ba45f58f44573796eb05858061ed7f47ea6b29af8058090023e35dfa9
versions:
1.2.5:
config:
@@ -33,12 +37,12 @@ pmix:
relstage: unstable
4.1.2:
config:
relstage: unstable
relstage: stable
runtime_deps: [libevent/2.1.12]
build_requires: [hwloc/2.7.1]
4.2.3:
config:
relstage: unstable
relstage: stable
runtime_deps: [libevent/2.1.12]
build_requires: [hwloc/2.9.1]
4.2.4:
@@ -46,3 +50,13 @@ pmix:
relstage: stable
runtime_deps: [libevent/2.1.12]
build_requires: [gcc/10.4.0, hwloc/2.9.1]
5.0.3:
config:
relstage: unstable
runtime_deps: [libevent/2.1.12]
build_requires: [gcc/12.3.0, hwloc/2.11.1]
variants:
- systems: [.*.merlin7.psi.ch]
overlay: Alps
use_overlays: [PSI]
- systems: [rhel.*]