2024-02-19 01:27:37 +01:00
|
|
|
#!/usr/bin/bash
|
|
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
|
|
|
# Website : https://pozol.eu
|
|
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
|
|
|
|
pkgbase=openmpi
|
|
|
|
pkgname=(openmpi) # openmpi-docs)
|
|
|
|
pkgver=5.0.2
|
2024-04-02 03:46:16 +02:00
|
|
|
pkgrel=08
|
2024-02-19 01:27:37 +01:00
|
|
|
pkgdesc='High performance message passing library (MPI)'
|
|
|
|
url='https://www.open-mpi.org'
|
|
|
|
makedepends=(cuda gcc-fortran gcc-libs glibc hip-runtime-amd hwloc libevent
|
2024-02-25 07:42:02 +01:00
|
|
|
libfabric libnl openpmix openucc openucx prrte valgrind zlib)
|
2024-02-19 01:27:37 +01:00
|
|
|
source=(https://www.open-mpi.org/software/ompi/v${pkgver%.*}/downloads/$pkgbase-$pkgver.tar.bz2)
|
|
|
|
|
|
|
|
_pick() {
|
|
|
|
local p="$1" f d; shift
|
|
|
|
for f; do
|
|
|
|
d="$srcdir/$p/${f#$pkgdir/}"
|
|
|
|
mkdir -p "$(dirname "$d")"
|
|
|
|
mv "$f" "$d"
|
|
|
|
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
# workaround for https://github.com/open-mpi/ompi/issues/12257
|
|
|
|
sed -i 's|WRAPPER__FCFLAGS|WRAPPER_FCFLAGS|g' configure
|
|
|
|
sed -i 's|WRAPPER_EXTRA_FCFLAGS|WRAPPER_FCFLAGS|g' configure
|
|
|
|
sed -i 's|"-I/usr/include",||' opal/tools/wrappers/opal_wrapper.c
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local configure_options=(
|
|
|
|
--prefix=/usr
|
|
|
|
--enable-builtin-atomics
|
|
|
|
--enable-memchecker
|
|
|
|
--enable-mpi-fortran=all
|
|
|
|
--enable-pretty-print-stacktrace
|
|
|
|
--with-ucc=/usr
|
|
|
|
--with-ucx=/usr
|
|
|
|
--libdir=/usr/lib
|
|
|
|
--sysconfdir=/etc/$pkgbase
|
2024-02-25 07:42:02 +01:00
|
|
|
--with-hwloc=external
|
|
|
|
--with-libevent=external
|
|
|
|
--with-pmix=external
|
|
|
|
--with-prrte=external
|
|
|
|
--with-valgrind
|
2024-02-19 01:27:37 +01:00
|
|
|
--with-cuda=/opt/cuda
|
|
|
|
# this tricks the configure script to look for /usr/lib/pkgconfig/cuda.pc
|
|
|
|
# instead of /opt/cuda/lib/pkgconfig/cuda.pc
|
|
|
|
--with-cuda-libdir=/usr/lib
|
|
|
|
--with-rocm=/opt/rocm
|
|
|
|
# all components that link to libraries provided by optdepends must be run-time loadable
|
|
|
|
--enable-mca-dso=accelerator_cuda,accelerator_rocm,btl_smcuda,rcache_gpusm,rcache_rgpusm,coll_ucc,scoll_ucc
|
2024-02-25 07:42:02 +01:00
|
|
|
# mpirun should not warn on MCA component load failures by default - usually caused by missing optdepends, which is ok
|
|
|
|
# https://docs.open-mpi.org/en/main/installing-open-mpi/configure-cli-options/installation.html
|
|
|
|
--with-show-load-errors='^accelerator,rcache,coll/ucc'
|
2024-02-19 01:27:37 +01:00
|
|
|
)
|
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
|
|
|
|
# set environment variables for reproducible build
|
|
|
|
# see https://github.com/open-mpi/ompi/blob/main/docs/release-notes/general.rst
|
|
|
|
export HOSTNAME=buildhost
|
|
|
|
export USER=builduser
|
|
|
|
|
|
|
|
# TODO: remove ac_cv_func_sem_open=no when there is a glibc release fixing https://sourceware.org/bugzilla/show_bug.cgi?id=30789
|
|
|
|
ac_cv_func_sem_open=no ./configure "${configure_options[@]}"
|
|
|
|
# prevent excessive overlinking due to libtool
|
|
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
|
|
make V=1
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#### a few tests fail, if they do run again makepkg --nocheck -e
|
|
|
|
|
|
|
|
check() {
|
|
|
|
make check -C $pkgbase-$pkgver
|
|
|
|
}
|
|
|
|
|
|
|
|
package_openmpi() {
|
2024-02-25 07:42:02 +01:00
|
|
|
depends=(gcc-libs glibc hwloc libevent libevent_{core,pthreads}-2.1.so libfabric libnl openpmix libpmix.so
|
2024-02-25 20:53:00 +01:00
|
|
|
openucx prrte zlib)
|
2024-02-19 01:27:37 +01:00
|
|
|
optdepends=(
|
|
|
|
'cuda: cuda support'
|
|
|
|
'hip-runtime-amd: ROCm support'
|
|
|
|
'gcc-fortran: fortran support'
|
2024-02-25 20:53:00 +01:00
|
|
|
'openssh: for execution on remote hosts via plm_ssh_agent'
|
2024-02-19 01:27:37 +01:00
|
|
|
'openucc: for UCC accelerated collectives'
|
|
|
|
)
|
|
|
|
provides=(libmpi.so libmpi_mpifh.so libmpi_usempi_ignore_tkr.so
|
|
|
|
libmpi_usempif08.so libopen-pal.so liboshmem.so)
|
2024-02-25 07:42:02 +01:00
|
|
|
backup=(etc/$pkgname/$pkgname-mca-params.conf)
|
2024-02-19 01:27:37 +01:00
|
|
|
|
|
|
|
make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
|
|
|
|
(
|
|
|
|
cd "$pkgdir"
|
|
|
|
_pick $pkgbase-docs usr/share/doc
|
|
|
|
)
|
|
|
|
install -Dm 644 $pkgbase-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
|
|
|
|
}
|
|
|
|
|
|
|
|
#package_openmpi-docs() {
|
|
|
|
# pkgdesc+=" - documentation"
|
|
|
|
#
|
|
|
|
# mv -v $pkgname/* "$pkgdir"
|
|
|
|
# install -vDm 644 $pkgbase-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
|
|
|
|
#}
|
|
|
|
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
|
|
|
|
arch=(x86_64)
|
|
|
|
|
|
|
|
license=('BSD-3-Clause AND LicenseRef-MPICH')
|
|
|
|
|
|
|
|
sha256sums=(ee46ad8eeee2c3ff70772160bff877cbf38c330a0bc3b3ddc811648b3396698f) # openmpi-5.0.2.tar.bz2
|
|
|
|
|