summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2022-05-24 15:41:46 -0500
committerCarlos Aznarán Laos2022-05-24 15:41:46 -0500
commit7b97c9f06b2ca72b5591a68d01acac42df5705be (patch)
tree2f16f3b6fa275319ee8a1ce5809d709f8a50c2f4
parent6702a3d2dfafbb95d39cadce6feaa80aa2f45155 (diff)
downloadaur-7b97c9f06b2ca72b5591a68d01acac42df5705be.tar.gz
Bump version to 3.17.1
-rw-r--r--.SRCINFO58
-rw-r--r--PKGBUILD127
-rw-r--r--petsc.install24
-rw-r--r--test_optdepends.sh12
4 files changed, 93 insertions, 128 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 380135f7bce4..c8856d74e958 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,44 +1,40 @@
pkgbase = petsc-complex
pkgdesc = Portable, extensible toolkit for scientific computation (complex scalars)
- pkgver = 3.16.0
+ pkgver = 3.17.1
pkgrel = 1
- url = https://www.mcs.anl.gov/petsc/
+ url = https://petsc.org
install = petsc.install
+ arch = i686
arch = x86_64
- license = BSD
- makedepends = metis
- makedepends = mumps
- makedepends = parmetis
- makedepends = pastix
- makedepends = scotch
- makedepends = superlu
- makedepends = superlu_dist
- makedepends = cmake
+ license = custom:BSD-2-clause
+ makedepends = gcc
makedepends = gcc-fortran
+ makedepends = cmake
+ makedepends = cython
+ depends = python-numpy
+ depends = openmpi
depends = boost
- depends = tcsh
- depends = fftw
- depends = hdf5-openmpi
- depends = hypre
depends = lapack
- depends = openmpi
- depends = python
- depends = suitesparse
- depends = triangle
- optdepends = metis
- optdepends = mumps
- optdepends = parmetis
- optdepends = pastix
- optdepends = scotch
- optdepends = superlu
- optdepends = superlu_dist
- optdepends = trilinos
- provides = petsc
+ optdepends = trilinos: support for trilinos
+ optdepends = ptscotch: support for ptscotch sequential and parallel graph partitioning library
+ optdepends = parmetis: support for parmetis parallel graph partitioning library
+ optdepends = metis: support for metis graph partitioning library
+ optdepends = pastix: support for the pastix solver
+ optdepends = superlu: support for the superlu sparse solver
+ optdepends = superlu_dist: support for the superlu_dist sparse solver
+ optdepends = hypre: support for the hypre sparse system solver
+ optdepends = hdf5-openmpi: support for the parallel version of HDF5
+ optdepends = mumps: support for the mumps sparse solver
+ optdepends = fftw: support for the FFTW fast Fourier transform
+ optdepends = triangle: support for the two-dimensional quality mesh generator and Delaunay triangulator
+ optdepends = suitesparse: support for the suitesparse sparse matrix libraries
+ optdepends = valgrind: support for valgrind to help find memory-management problems in programs
+ provides = petsc=3.17.1
conflicts = petsc
options = staticlibs
- source = http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.16.0.tar.gz
+ source = https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.17.1.tar.gz
source = test_optdepends.sh
- sha256sums = 5aaad7deea127a4790c8aa95c42fd9451ab10b5d6c68b226b92d4853002f438d
- sha256sums = 902f8d222706868184cfeff94b1c26a781fd9553a43a66deac7cc1317de82a86
+ sha512sums = 8c81cc148b1a899a55e54a013d61519ec7b44f98f7ae30c3f8d0e83ba285b23f4b4d9e2cd483c531d337bc41887e4079b727ba73676b1b653910140291e93575
+ sha512sums = f485f2cce6bb0601fe3bcbb3070892861d25394fc00bf3f6ca2eb8b030dc94dd42ec40d31a958fb860e955e82dc39073267d8c29be8ad8f33cdb3165a47e4a46
pkgname = petsc-complex
diff --git a/PKGBUILD b/PKGBUILD
index 232592ee210c..380885803b63 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,110 +1,101 @@
-# Maintainer: Jingbei Li <i@jingbei.li>
+# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
+# Contributor: Jingbei Li <i@jingbei.li>
# Contributor: Sigvald Marholm <marholm@marebakken.com>
# Adapted from the package petsc with the following original contributors:
# Contributor: Martin Diehl <https://martin-diehl.net>
# Contributor: Andreas Bilke <abilke at cosy dot sbg dot ac dot at>
# Contributor: Myles English <myles at rockhead dot biz>
# Contributor: Lucas H. Gabrielli <heitzmann at gmail dot com>
-
-pkgname=petsc-complex
-_pkgname=petsc
-pkgver=3.16.0
+_base=petsc
+pkgname=${_base}-complex
+pkgver=3.17.1
pkgrel=1
_config=linux-c-opt
# if --with-debugging=yes is set then PETSC_ARCH is automatically set to
#"linux-c-debug" for some things, so the _config should be changed too
#_config=linux-c-debug
pkgdesc="Portable, extensible toolkit for scientific computation (complex scalars)"
-arch=('x86_64')
-url="https://www.mcs.anl.gov/petsc/"
-license=('BSD')
+arch=('i686' 'x86_64')
+url="https://${_base}.org"
+license=('custom:BSD-2-clause')
options=(staticlibs)
-conflicts=('petsc')
-provides=('petsc')
-depends=(
- 'boost'
- 'tcsh'
- 'fftw'
- 'hdf5-openmpi'
- 'hypre'
- 'lapack'
- 'openmpi'
- 'python'
- 'suitesparse'
- 'triangle'
-)
-_depends=(
- 'metis'
- 'mumps'
- 'parmetis'
- 'pastix'
- 'scotch'
- 'superlu'
- 'superlu_dist'
-)
-makedepends=(${_depends[@]} 'cmake' 'gcc-fortran')
-optdepends=(${_depends[@]} 'trilinos')
-install=petsc.install
-source=(http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${_pkgname}-lite-${pkgver/_/-}.tar.gz
- test_optdepends.sh)
-sha256sums=('5aaad7deea127a4790c8aa95c42fd9451ab10b5d6c68b226b92d4853002f438d'
- '902f8d222706868184cfeff94b1c26a781fd9553a43a66deac7cc1317de82a86')
-
-_install_dir=/opt/petsc/${_config}
-_petsc_arch="arch-${_config}"
+conflicts=("${_base}")
+provides=("${_base}=${pkgver}")
+depends=('python-numpy' 'openmpi' 'boost' 'lapack')
+makedepends=('gcc' 'gcc-fortran' 'cmake' 'cython')
+optdepends=('trilinos: support for trilinos'
+ 'ptscotch: support for ptscotch sequential and parallel graph partitioning library'
+ 'parmetis: support for parmetis parallel graph partitioning library'
+ 'metis: support for metis graph partitioning library'
+ 'pastix: support for the pastix solver'
+ 'superlu: support for the superlu sparse solver'
+ 'superlu_dist: support for the superlu_dist sparse solver'
+ 'hypre: support for the hypre sparse system solver'
+ 'hdf5-openmpi: support for the parallel version of HDF5'
+ 'mumps: support for the mumps sparse solver'
+ 'fftw: support for the FFTW fast Fourier transform'
+ 'triangle: support for the two-dimensional quality mesh generator and Delaunay triangulator'
+ 'suitesparse: support for the suitesparse sparse matrix libraries'
+ 'valgrind: support for valgrind to help find memory-management problems in programs')
+install=${_base}.install
+source=(https://ftp.mcs.anl.gov/pub/${_base}/release-snapshots/${_base}-lite-${pkgver}.tar.gz
+ test_optdepends.sh)
+sha512sums=('8c81cc148b1a899a55e54a013d61519ec7b44f98f7ae30c3f8d0e83ba285b23f4b4d9e2cd483c531d337bc41887e4079b727ba73676b1b653910140291e93575'
+ 'f485f2cce6bb0601fe3bcbb3070892861d25394fc00bf3f6ca2eb8b030dc94dd42ec40d31a958fb860e955e82dc39073267d8c29be8ad8f33cdb3165a47e4a46')
+
+_install_dir=/opt/${_base}/${_config}
+_petsc_arch=arch-${_config}
build() {
- _build_dir="${srcdir}/${_pkgname}-${pkgver/_/-}"
-
+ _build_dir=${srcdir}/${_base}-${pkgver}
cd ${_build_dir}
- unset PETSC_ARCH
+ export PETSC_ARCH=${_petsc_arch}
export PETSC_DIR=${_build_dir}
- CONFOPTS="--with-shared-libraries=1 --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3 --FOPTFLAGS=-O3 \
+ OPTFLAGS='-O3 -march=native'
+ CONFOPTS="--with-shared-libraries=1 \
+ --with-petsc4py=1 \
+ --with-mpi-f90module-visibility=0 \
--with-cc=$(which mpicc) --with-cxx=$(which mpicxx) --with-fc=$(which mpifort) \
- --with-scalar-type=complex"
- CONFOPTS="${CONFOPTS} $(sh ${srcdir}/test_optdepends.sh)"
+ --with-scalar-type=complex \
+ $(sh ${srcdir}/test_optdepends.sh)"
echo ${CONFOPTS}
- python ./configure \
- --prefix=${_install_dir} \
- --PETSC_ARCH=${_petsc_arch} \
- ${CONFOPTS}
+ python ./configure --prefix=${_install_dir} ${CONFOPTS} \
+ --COPTFLAGS=${OPTFLAGS} --CXXOPTFLAGS=${OPTFLAGS} --FOPTFLAGS=${OPTFLAGS}
- make ${MAKEFLAGS} PETSC_DIR=${_build_dir} PETSC_ARCH=${_petsc_arch} all
+ make ${MAKEFLAGS} all
+ make DESTDIR=${srcdir}/tmp install
}
check() {
- _build_dir="${srcdir}/${_pkgname}-${pkgver/_/-}"
- cd ${_build_dir}
+ cd ${srcdir}/${_base}-${pkgver}
- make check
+ if [ -z "$(ldconfig -p | grep libcuda.so.1)" ]; then
+ export OMPI_MCA_opal_warn_on_missing_libcuda=0
+ fi
+ PYTHONPATH=${srcdir}/tmp/${_install_dir}/lib:${PYTHONPATH} make check
}
package() {
- _build_dir="${srcdir}/${_pkgname}-${pkgver/_/-}"
-
- cd ${_build_dir}
- echo "make ${MAKEFLAGS} PETSC_DIR=${_build_dir} DESTDIR=${pkgdir} install"
- export PETSC_DIR=${_build_dir}
- make ${MAKEFLAGS} PETSC_DIR=${_build_dir} DESTDIR=${pkgdir} install
-
- rm -rf ${pkgdir}/opt/petsc/linux-c-opt/lib/petsc/bin/__pycache__
+ _build_dir=${srcdir}/${_base}-${pkgver}
- export PETSC_DIR=${_install_dir}
+ mkdir -p ${pkgdir}/${_install_dir}
+ cp -Hr ${srcdir}/tmp/* ${pkgdir}
# install licence (even though there is no such word as licenses)
- install -Dm 644 ${_build_dir}/LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
+ install -Dm 644 ${_build_dir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
mkdir -p ${pkgdir}/etc/profile.d
- echo "export PETSC_DIR=${_install_dir}" > ${pkgdir}/etc/profile.d/petsc.sh
+ echo export PETSC_DIR=${_install_dir} >${pkgdir}/etc/profile.d/petsc.sh
+ echo export PYTHONPATH=${_install_dir}/lib:'${PYTHONPATH}' >>${pkgdir}/etc/profile.d/petsc.sh
chmod +x ${pkgdir}/etc/profile.d/petsc.sh
# show where the shared libraries are
install -dm 755 "${pkgdir}"/etc/ld.so.conf.d/
- echo "${_install_dir}/lib" > "${pkgdir}"/etc/ld.so.conf.d/petsc.conf
+ echo ${_install_dir}/lib >${pkgdir}/etc/ld.so.conf.d/petsc.conf
# install pkgconfig settings
- install -Dm 644 "${_build_dir}/${_petsc_arch}"/lib/pkgconfig/PETSc.pc "${pkgdir}"/usr/share/pkgconfig/PETSc.pc
+ install -Dm 644 ${_build_dir}/${_petsc_arch}/lib/pkgconfig/PETSc.pc ${pkgdir}/usr/share/pkgconfig/PETSc.pc
}
diff --git a/petsc.install b/petsc.install
index 061fa062d5f2..0079ebaa744e 100644
--- a/petsc.install
+++ b/petsc.install
@@ -1,25 +1,3 @@
post_install() {
-
-# set the PETSC_DIR
-source /etc/profile.d/petsc.sh
-export PETSC_DIR=${PETSC_DIR}
-#export PETSC_ARCH=${PETSC_ARCH}
-
-noVersion=${1%%-[1-9]}
-rootDir=${noVersion/_/-}
-
-cat << EOF
-
-If you just ran makepkg in this directory then
-to test the PETSc installation you can run:
-
-$ cd src/petsc-${rootDir}/; make PETSC_DIR=$PETSC_DIR test
-
-EOF
+echo -e "\033[0;31msource /etc/profile.d/petsc.sh to set environment variables\033[0m"
}
-
-post_upgrade() {
-post_install
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/test_optdepends.sh b/test_optdepends.sh
index 1d647160d45f..21194ec51998 100644
--- a/test_optdepends.sh
+++ b/test_optdepends.sh
@@ -39,7 +39,7 @@ fi
# Add hdf5 support
if [[ "$(h5stat -V)" ]]; then
- CONFOPTS="${CONFOPTS} --with-hdf5=1"
+ CONFOPTS="${CONFOPTS} --with-hdf5=1 --download-hdf5-fortran-bindings=1"
fi
# Add scalapack support
@@ -98,10 +98,10 @@ if [ -f "${PASTIX_CONF}" ]; then
fi
# Add trilinos support
-#if [ -f "/usr/lib/libml.so" ]; then
-# CONFOPTS="${CONFOPTS} --with-ml=1"
-# # Add boost support (may be useful for trilinos)
-# CONFOPTS="${CONFOPTS} --with-boost=1"
-#fi
+if [ -f "/usr/lib/libml.so" ]; then
+ CONFOPTS="${CONFOPTS} --with-ml=1"
+ # Add boost support (may be useful for trilinos)
+ CONFOPTS="${CONFOPTS} --with-boost=1"
+fi
echo "${CONFOPTS}"