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
|
2014-09-19 19:29:48 +00:00
|
|
|
|
2024-02-06 04:15:00 +00:00
|
|
|
pkgbase=openmpi
|
|
|
|
pkgname=(
|
|
|
|
openmpi
|
|
|
|
openmpi-docs
|
|
|
|
)
|
|
|
|
pkgver=5.0.1
|
|
|
|
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
|
|
|
|
libnl
|
2024-02-06 04:15:00 +00:00
|
|
|
openpmix libpmix.so
|
2023-06-03 19:01:09 +00:00
|
|
|
openssh
|
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)
|
|
|
|
sha256sums=('e357043e65fd1b956a47d0dae6156a90cf0e378df759364936c1781f1a25ef80')
|
|
|
|
b2sums=('4a5b1d6c1cb2c81186f1d1347aee2e78b8634e0db08053a99a10d54df31d2afa5982d64b49a351aea99fc9db64f8ab81adeab9ae427442892774f99de3602230')
|
|
|
|
|
|
|
|
_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
|
|
|
|
libevent
|
|
|
|
libnl
|
|
|
|
openpmix libpmix.so
|
|
|
|
openssh
|
|
|
|
prrte
|
|
|
|
zlib
|
|
|
|
)
|
|
|
|
optdepends=(
|
|
|
|
'gcc-fortran: fortran support'
|
|
|
|
)
|
|
|
|
provides=(
|
|
|
|
libmpi.so
|
|
|
|
libmpi_mpifh.so
|
|
|
|
libmpi_usempi_ignore_tkr.so
|
|
|
|
libmpi_usempif08.so
|
|
|
|
libopen-pal.so
|
|
|
|
)
|
|
|
|
|
|
|
|
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-06 04:15:00 +00:00
|
|
|
mv -v $pkgname/* "$pkgdir/"
|
|
|
|
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:
|