summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoreDgar2021-09-23 11:11:13 -0500
committereDgar2021-09-23 11:12:05 -0500
commitd8aa242b76075f92d225789a712db168e3484888 (patch)
tree1770ee66b97fb5a45c227c6cc10fdf5d1035d0e5
parent3923f5328d1e9c3782719b8b5de2b301dbe9d2c9 (diff)
downloadaur-d8aa242b76075f92d225789a712db168e3484888.tar.gz
reinstate blaslapack_download.patch; arrange LIBX11_SO; fix BLAS if
-rw-r--r--PKGBUILD12
-rw-r--r--blaslapack_download.patch11
-rw-r--r--test_optdepends.sh31
3 files changed, 35 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 10d806f82568..ae9662537606 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
_base=petsc
pkgname=("${_base}"-git "${_base}"-doc)
-pkgver=3.15.4.33.g0bac13e0fe9
+pkgver=3.15.4.37.g17c486c0fcd
pkgrel=1
_mainver="${pkgver:0:6}"
pkgdesc="Portable, extensible toolkit for scientific computation"
@@ -19,10 +19,12 @@ makedepends=('gcc' 'gcc-fortran' 'cmake' 'sowing' "pkgconf"
'git' 'cython' 'chrpath' "hypre=2.18.2")
source=(git+${url}.git#branch=release
https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-with-docs-"${_mainver}".tar.gz
- test_optdepends.sh)
+ test_optdepends.sh
+ blaslapack_download.patch)
sha512sums=('SKIP'
'b6a1d48aab1c2639a4c1cbd8b313ace253f1c36eedaa3de3508ffbd6060e1def99e2f516ed9bb509307f614b41791d09342e2c2280c0b2c25dda1092b0e569d2'
- '26145ebce4c3c2a418488e1412579ea56744e9da07f0f6ebc9e457a14ca8679d207135b36a351e5e49efa5083ea6506516f6bfb2aef978d3986fcde7ebe8d4c0')
+ '3b3b6de71e65e8b9806e16f9a2c839e6022ce0d6860606ec38604377b946e843c7227385c46d1f13195266575dc381b6a391cba33fc754ff461fed650ac1d332'
+ 'af899ea1d06bf6d4cee1c1fe86902ba2772d1001caf00e89363c6217fed9dd837588ee6f7f827ca8b8fd2a01316fbcd73d98874e28d452af71b9598127b6f179')
_config=linux-c-opt
_install_dir="/usr"
@@ -87,6 +89,10 @@ export OMPI_MCA_opal_cuda_support=0
unset PETSC_DIR
export PETSC_ARCH=${_config}
+prepare () {
+ patch -p1 -i "${srcdir}"/blaslapack_download.patch
+}
+
pkgver() {
cd "${srcdir}"/"${_base}"
git describe --tags --match '*.*' | tr '-' '.' | sed 's-^v--'
diff --git a/blaslapack_download.patch b/blaslapack_download.patch
new file mode 100644
index 000000000000..abf007480f17
--- /dev/null
+++ b/blaslapack_download.patch
@@ -0,0 +1,11 @@
+--- b/petsc/config/BuildSystem/config/packages/BlasLapack.py 2021-09-17 23:26:42.115594175 -0500
++++ b/petsc/config/BuildSystem/config/packages/BlasLapack.py 2021-09-17 22:53:07.122154127 -0500
+@@ -187,7 +187,7 @@
+ yield ('OpenBLAS with full path', None, os.path.join(self.openblas.libDir,'libopenblas.a'),self.openblas.known64,self.openblas.usesopenmp)
+ else:
+ yield ('OpenBLAS', None, self.openblas.lib,self.openblas.known64,self.openblas.usesopenmp)
+- raise RuntimeError('--download-openblas libraries cannot be used')
++ ###raise RuntimeError('--download-openblas libraries cannot be used')
+ if 'with-blas-lib' in self.argDB and not 'with-lapack-lib' in self.argDB:
+ raise RuntimeError('If you use the --with-blas-lib=<lib> you must also use --with-lapack-lib=<lib> option')
+ if not 'with-blas-lib' in self.argDB and 'with-lapack-lib' in self.argDB:
diff --git a/test_optdepends.sh b/test_optdepends.sh
index fff61191b60d..45796e7cf23b 100644
--- a/test_optdepends.sh
+++ b/test_optdepends.sh
@@ -11,9 +11,11 @@ find_so () {
# Find directory where a pkg-config file is
# example: find_pc glut
find_pc () {
- $(dirname "$(pkgconf --path "$1")")
+ dirname "$(pkgconf --path "$1")"
}
+ONLY_INC="--keep-system-cflags --cflags-only-I";
+
type mpicc >/dev/null && \
CONFOPTS="${CONFOPTS} --with-cc=mpicc"
type mpicxx >/dev/null && \
@@ -132,16 +134,13 @@ fi
BLAS_SO="$(find_so libblas.so)"
OPENBLAS_SO="$(find_so libopenblas.so)"
LAPACK_SO="$(find_so liblapack.so)"
-if [ -f "${BLAS_SO}" && \-f "${OPENBLAS_SO}" && \
- -f "${LAPACK_SO}" ]; then
- OPENBLAS_INC="$(pkgconf -keep-system-cflags -cflags openblas)"
- CONFOPTS="${CONFOPTS} --with-openblas=1"
+if [ -f "${BLAS_SO}" ] && [ -f "${OPENBLAS_SO}" ] \
+ && [ -f "${LAPACK_SO}" ]; then
+ CONFOPTS="${CONFOPTS} --with-openblas=1"
+ OPENBLAS_INC="$(pkgconf ${ONLY_INC} openblas)"
+ OPENBLAS_INC="${OPENBLAS_INC//-I/}"
CONFOPTS="${CONFOPTS} --with-openblas-lib=${OPENBLAS_SO}"
CONFOPTS="${CONFOPTS} --with-openblas-include=${OPENBLAS_INC}"
- # With help from Satish Balay
- # @ 3.15.4.33.g0bac13e0fe9 2021-09-21
- # nm -AoD /usr/lib64/libopenblas.so | grep dgetrs_
- CONFOPTS="${CONFOPTS} --with-blaslapack-lib=${LAPACK_SO},${BLAS_SO}"
fi
# OpenCL: GPU computing
@@ -239,15 +238,15 @@ if [ -f "${OPENCL_SO}" ]; then
fi
# X: to enable ksp_xmonitor
-LIBX11="$(find_so libX11.so)"
-LIBX11_DIR="$(dirname ${LIBX11})"
-if [ -f "${LIBX11}" ]; then
- LIBX11_INC="--keep-system-cflags --cflags-only-I";
- LIBX11_INC="$(pkgconf ${LIBX11_INC} x11)";
+LIBX11_SO="$(find_so libX11.so)"
+LIBX11_DIR="$(dirname ${LIBX11_SO})"
+if [ -f "${LIBX11_SO}" ]; then
+ LIBX11_INC="$(pkgconf ${ONLY_INC} x11)";
+ LIBX11_INC="${LIBX11_INC//-I/}";
CONFOPTS="${CONFOPTS} --with-x-lib=[${LIBX11_DIR}/";
# As per X11.pc, it seems that xcb.so is needed
- CONFOPTS="${CONFOPTS}libX11-xcb.so,${LIBX11}]"
- CONFOPTS="${CONFOPTS} --with-x-include=${LIBX11_INC//-I/}"
+ CONFOPTS="${CONFOPTS}libX11-xcb.so,${LIBX11_SO}]"
+ CONFOPTS="${CONFOPTS} --with-x-include=${LIBX11_INC}"
fi
# ZLIB