2024-07-27 17:56:09 +00:00
|
|
|
# Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>
|
2017-09-13 19:28:17 +00:00
|
|
|
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
2022-06-07 12:35:30 +00:00
|
|
|
# Maintainer: David Runge <dvzrv@archlinux.org>
|
2017-09-13 19:28:17 +00:00
|
|
|
# Contributor: Anatol Pomozov <anatol dot pomozov at gmail>
|
2014-09-19 19:29:48 +00:00
|
|
|
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org
|
2022-06-07 12:35:30 +00:00
|
|
|
# - remove make/optdepend on cuda and configure option
|
2024-02-12 13:58:08 +00:00
|
|
|
# - remove make/optdepend on hip-runtime-amd and rocm configure option
|
2024-07-11 19:01:28 +00:00
|
|
|
# - remove makedepend on nvidia-utils
|
2024-02-06 04:27:48 +00:00
|
|
|
# - build for v8 only, 32-bit support dropped in version 5
|
|
|
|
|
|
|
|
buildarch=8
|
2014-09-19 19:29:48 +00:00
|
|
|
|
2024-02-06 04:15:00 +00:00
|
|
|
pkgbase=openmpi
|
|
|
|
pkgname=(
|
|
|
|
openmpi
|
|
|
|
openmpi-docs
|
|
|
|
)
|
2024-07-27 17:56:09 +00:00
|
|
|
pkgver=5.0.5
|
2024-11-08 01:36:20 +00:00
|
|
|
pkgrel=2
|
2014-09-19 19:29:48 +00:00
|
|
|
pkgdesc='High performance message passing library (MPI)'
|
2022-06-07 12:35:30 +00:00
|
|
|
arch=(x86_64)
|
2017-09-13 19:28:17 +00:00
|
|
|
url='https://www.open-mpi.org'
|
2024-02-06 04:15:00 +00:00
|
|
|
license=('BSD-3-Clause AND LicenseRef-MPICH')
|
|
|
|
makedepends=(
|
|
|
|
gcc-fortran
|
2023-06-03 19:01:09 +00:00
|
|
|
gcc-libs
|
|
|
|
glibc
|
|
|
|
hwloc
|
|
|
|
libevent
|
2024-02-12 13:58:08 +00:00
|
|
|
libfabric
|
2023-06-03 19:01:09 +00:00
|
|
|
libnl
|
2024-02-12 13:58:08 +00:00
|
|
|
openpmix
|
2024-02-06 04:15:00 +00:00
|
|
|
prrte
|
2023-06-03 19:01:09 +00:00
|
|
|
valgrind
|
2024-02-06 04:15:00 +00:00
|
|
|
zlib
|
2022-06-07 12:35:30 +00:00
|
|
|
)
|
2023-06-03 19:01:09 +00:00
|
|
|
source=(
|
2024-02-06 04:15:00 +00:00
|
|
|
https://www.open-mpi.org/software/ompi/v${pkgver%.*}/downloads/$pkgbase-$pkgver.tar.bz2)
|
2024-07-27 17:56:09 +00:00
|
|
|
sha256sums=('6588d57c0a4bd299a24103f4e196051b29e8b55fbda49e11d5b3d32030a32776')
|
|
|
|
b2sums=('740e5dbc7e54b8f4eac4fa2c40fb5a0ccfba201dff15ccc84899f28dfad0147078ef6c2b0585615c93fc6edb70b665b3f7a9adea5e5e53a7563ae4c7a6ccbada')
|
2024-02-06 04:15:00 +00:00
|
|
|
|
|
|
|
_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
|
|
|
|
}
|
2014-09-19 19:29:48 +00:00
|
|
|
|
2014-09-29 15:51:13 +00:00
|
|
|
build() {
|
2023-02-27 23:56:21 +00:00
|
|
|
local configure_options=(
|
|
|
|
--prefix=/usr
|
|
|
|
--enable-builtin-atomics
|
|
|
|
--enable-memchecker
|
|
|
|
--enable-mpi-fortran=all
|
|
|
|
--enable-pretty-print-stacktrace
|
|
|
|
--libdir=/usr/lib
|
2024-02-06 04:15:00 +00:00
|
|
|
--sysconfdir=/etc/$pkgbase
|
2023-02-27 23:56:21 +00:00
|
|
|
--with-hwloc=external
|
|
|
|
--with-libevent=external
|
|
|
|
--with-pmix=external
|
2024-02-06 04:15:00 +00:00
|
|
|
--with-prrte=external
|
2023-02-27 23:56:21 +00:00
|
|
|
--with-valgrind
|
|
|
|
)
|
2024-02-06 04:15:00 +00:00
|
|
|
cd $pkgbase-$pkgver
|
2014-09-19 19:29:48 +00:00
|
|
|
|
2024-01-25 00:41:38 +00:00
|
|
|
# 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
|
|
|
|
|
2023-12-29 20:54:01 +00:00
|
|
|
# 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[@]}"
|
2022-06-07 12:35:30 +00:00
|
|
|
# prevent excessive overlinking due to libtool
|
|
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
|
|
make V=1
|
2014-09-19 19:29:48 +00:00
|
|
|
}
|
|
|
|
|
2014-09-29 15:51:13 +00:00
|
|
|
check() {
|
2024-02-06 04:15:00 +00:00
|
|
|
make check -C $pkgbase-$pkgver
|
|
|
|
}
|
|
|
|
|
|
|
|
package_openmpi() {
|
|
|
|
depends=(
|
|
|
|
gcc-libs
|
|
|
|
glibc
|
|
|
|
hwloc
|
2024-02-23 18:48:16 +00:00
|
|
|
libevent libevent_{core,pthreads}-2.1.so
|
2024-02-12 13:58:08 +00:00
|
|
|
libfabric
|
2024-02-06 04:15:00 +00:00
|
|
|
libnl
|
|
|
|
openpmix libpmix.so
|
2024-05-01 13:00:54 +00:00
|
|
|
prrte
|
2024-02-06 04:15:00 +00:00
|
|
|
zlib
|
|
|
|
)
|
|
|
|
optdepends=(
|
|
|
|
'gcc-fortran: fortran support'
|
2024-02-25 14:13:14 +00:00
|
|
|
'openssh: for execution on remote hosts via plm_ssh_agent'
|
2024-02-06 04:15:00 +00:00
|
|
|
)
|
|
|
|
provides=(
|
|
|
|
libmpi.so
|
|
|
|
libmpi_mpifh.so
|
|
|
|
libmpi_usempi_ignore_tkr.so
|
|
|
|
libmpi_usempif08.so
|
|
|
|
libopen-pal.so
|
2024-02-19 22:58:18 +00:00
|
|
|
liboshmem.so
|
2024-02-06 04:15:00 +00:00
|
|
|
)
|
2024-02-25 00:39:42 +00:00
|
|
|
backup=(etc/$pkgname/$pkgname-mca-params.conf)
|
2024-02-06 04:15:00 +00: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/"
|
2014-09-29 15:51:13 +00:00
|
|
|
}
|
|
|
|
|
2024-02-06 04:15:00 +00:00
|
|
|
package_openmpi-docs() {
|
|
|
|
pkgdesc+=" - documentation"
|
2014-09-19 19:29:48 +00:00
|
|
|
|
2024-02-12 13:58:08 +00:00
|
|
|
mv -v $pkgname/* "$pkgdir"
|
2024-02-06 04:15:00 +00:00
|
|
|
install -vDm 644 $pkgbase-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
|
2014-09-19 19:29:48 +00:00
|
|
|
}
|
2017-09-13 19:28:17 +00:00
|
|
|
|
|
|
|
# vim: ts=2 sw=2 et:
|