treinstate blaslapack_download.patch; arrange LIBX11_SO; fix BLAS if - petsc-gi… | |
git clone git://src.adamsgaard.dk/petsc-git-PKGBUILD | |
Log | |
Files | |
Refs | |
--- | |
commit d8aa242b76075f92d225789a712db168e3484888 | |
parent 3923f5328d1e9c3782719b8b5de2b301dbe9d2c9 | |
Author: eDgar <eDgar_|at|_openmail.cc> | |
Date: Thu, 23 Sep 2021 11:11:13 -0500 | |
reinstate blaslapack_download.patch; arrange LIBX11_SO; fix BLAS if | |
Diffstat: | |
M PKGBUILD | 12 +++++++++--- | |
A blaslapack_download.patch | 11 +++++++++++ | |
M test_optdepends.sh | 31 +++++++++++++++--------------… | |
3 files changed, 35 insertions(+), 19 deletions(-) | |
--- | |
diff --git a/PKGBUILD b/PKGBUILD | |
t@@ -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" | |
t@@ -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-"$… | |
- test_optdepends.sh) | |
+ test_optdepends.sh | |
+ blaslapack_download.patch) | |
sha512sums=('SKIP' | |
'b6a1d48aab1c2639a4c1cbd8b313ace253f1c36eedaa3de3508ffbd6060e1def9… | |
- '26145ebce4c3c2a418488e1412579ea56744e9da07f0f6ebc9e457a14ca8679d2… | |
+ '3b3b6de71e65e8b9806e16f9a2c839e6022ce0d6860606ec38604377b946e843c… | |
+ 'af899ea1d06bf6d4cee1c1fe86902ba2772d1001caf00e89363c6217fed9dd8375… | |
_config=linux-c-opt | |
_install_dir="/usr" | |
t@@ -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 | |
t@@ -0,0 +1,11 @@ | |
+--- b/petsc/config/BuildSystem/config/packages/BlasLapack.py 2021-09-17… | |
++++ b/petsc/config/BuildSystem/config/packages/BlasLapack.py 2021-09-17… | |
+@@ -187,7 +187,7 @@ | |
+ yield ('OpenBLAS with full path', None, os.path.join(self.openblas.li… | |
+ else: | |
+ yield ('OpenBLAS', None, self.openblas.lib,self.openblas.known64,self… | |
+- 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 … | |
+ 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 | |
t@@ -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 && \ | |
t@@ -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 | |
t@@ -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 |