petsc-git-PKGBUILD

build template for non-complex PETSC with petsc4py
git clone git://src.adamsgaard.dk/petsc-git-PKGBUILD # fast
git clone https://src.adamsgaard.dk/petsc-git-PKGBUILD.git # slow
Log | Files | Refs Back to index

commit ba7c6d190a7031dda17dc1e84ab392013980e7c1
parent eb332664bd9e49033b865c024e616dd82db8c0d9
Author: eDgar <eDgar_|at|_openmail.cc>
Date:   Tue, 21 Sep 2021 19:31:08 -0500

force right libraries on blaslapack, get rid of patch

Diffstat:
M.SRCINFO | 4+---
M.gitignore | 1+
MPKGBUILD | 13+++----------
Dblaslapack_download.patch | 11-----------
Mtest_optdepends.sh | 15+++++++++++----
5 files changed, 16 insertions(+), 28 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = petsc-git pkgdesc = Portable, extensible toolkit for scientific computation - pkgver = 3.15.4.31.g36206f8ec7e + pkgver = 3.15.4.33.g0bac13e0fe9 pkgrel = 1 url = https://gitlab.com/petsc/petsc arch = i686 @@ -28,11 +28,9 @@ pkgbase = petsc-git source = git+https://gitlab.com/petsc/petsc.git#branch=release source = https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-with-docs-3.15.4.tar.gz source = test_optdepends.sh - source = blaslapack_download.patch sha512sums = SKIP sha512sums = b6a1d48aab1c2639a4c1cbd8b313ace253f1c36eedaa3de3508ffbd6060e1def99e2f516ed9bb509307f614b41791d09342e2c2280c0b2c25dda1092b0e569d2 sha512sums = 4561205ad12cb1f0031ad4cfcf2117a909002c475a992eede429b8af0e06df44baf1ce9caa95413593a1710b688e5d9c75a3b896b8c428a3cc04ae38324faae5 - sha512sums = af899ea1d06bf6d4cee1c1fe86902ba2772d1001caf00e89363c6217fed9dd837588ee6f7f827ca8b8fd2a01316fbcd73d98874e28d452af71b9598127b6f179 pkgname = petsc-git optdepends = boost: Free peer-reviewed portable C++ source libraries diff --git a/.gitignore b/.gitignore @@ -7,3 +7,4 @@ src *.tar.gz petsc +clean-configure.sh diff --git a/PKGBUILD b/PKGBUILD @@ -5,7 +5,7 @@ _base=petsc pkgname=("${_base}"-git "${_base}"-doc) -pkgver=3.15.4.31.g36206f8ec7e +pkgver=3.15.4.33.g0bac13e0fe9 pkgrel=1 _mainver="${pkgver:0:6}" pkgdesc="Portable, extensible toolkit for scientific computation" @@ -19,12 +19,10 @@ 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 - blaslapack_download.patch) + test_optdepends.sh) sha512sums=('SKIP' 'b6a1d48aab1c2639a4c1cbd8b313ace253f1c36eedaa3de3508ffbd6060e1def99e2f516ed9bb509307f614b41791d09342e2c2280c0b2c25dda1092b0e569d2' - '4561205ad12cb1f0031ad4cfcf2117a909002c475a992eede429b8af0e06df44baf1ce9caa95413593a1710b688e5d9c75a3b896b8c428a3cc04ae38324faae5' - 'af899ea1d06bf6d4cee1c1fe86902ba2772d1001caf00e89363c6217fed9dd837588ee6f7f827ca8b8fd2a01316fbcd73d98874e28d452af71b9598127b6f179') + '4561205ad12cb1f0031ad4cfcf2117a909002c475a992eede429b8af0e06df44baf1ce9caa95413593a1710b688e5d9c75a3b896b8c428a3cc04ae38324faae5') _config=linux-c-opt _install_dir="/usr" @@ -89,10 +87,6 @@ export OMPI_MCA_opal_cuda_support=0 unset PETSC_DIR export PETSC_ARCH=${_config} -prepare() { - patch -p1 -i blaslapack_download.patch -} - pkgver() { cd "${srcdir}"/"${_base}" git describe --tags --match '*.*' | tr '-' '.' | sed 's-^v--' @@ -129,7 +123,6 @@ build() { cd "${srcdir}"/"${_base}" python ./configure ${CONFOPTS[@]} - make -s ${MAKEFLAGS} all } diff --git a/blaslapack_download.patch b/blaslapack_download.patch @@ -1,11 +0,0 @@ ---- 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 @@ -126,11 +126,18 @@ if [ -f "$(whereis -b libpnetcdf.so | cut -d' ' -f2)" ]; then fi # OpenBLAS: Linear algebra libraries -OPENBLAS_SO="$(whereis -b libblas.so | cut -d' ' -f2)" -if [ -f "${OPENBLAS_SO}" ]; then +BLAS_SO="$(whereis -b libblas.so | cut -d' ' -f2)" +OPENBLAS_SO="$(whereis -b libopenblas.so | cut -d' ' -f2)" +LAPACK_SO="$(whereis -b liblapack.so | cut -d' ' -f2)" +if [ -f "${BLAS_SO}" && \-f "${OPENBLAS_SO}" && \ + -f "${LAPACK_SO}"]; then CONFOPTS+=" --with-openblas=1" - CONFOPTS+=" --with-openblas-pkg-config=" - CONFOPTS+="$(dirname $(pkgconf --path openblas))" + CONFOPTS+=" --with-openblas-lib=${OPENBLAS_SO}" + CONFOPTS+=" --with-openblas-include=/usr/include" + # With help from Satish Balay + # @ 3.15.4.33.g0bac13e0fe9 2021-09-21 + # nm -AoD /usr/lib64/libopenblas.so | grep dgetrs_ + CONFOPTS+=" --with-blaslapack-lib=${LAPACK_SO},${BLAS_SO}" fi # OpenCL: GPU computing