From: Fabian Castelli Date: Mon, 14 Feb 2022 15:31:06 +0000 (+0100) Subject: Clean up PETSc and SLEPc X-Git-Tag: v9.4.0-r1~8^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F278%2Fhead;p=candi.git Clean up PETSc and SLEPc --- diff --git a/deal.II-toolchain/packages/dealii.package b/deal.II-toolchain/packages/dealii.package index 58d399b..42ceb92 100644 --- a/deal.II-toolchain/packages/dealii.package +++ b/deal.II-toolchain/packages/dealii.package @@ -181,10 +181,9 @@ if [ ! -z "${TRILINOS_DIR}" ]; then -D TRILINOS_DIR=${TRILINOS_DIR}" fi -# petsc +######################################## +# PETSC if [[ ${PACKAGES_OFF} =~ 'petsc' ]]; then - # Disable petsc for deal.II, if a special DEAL_II_CONFOPTS together with - # the dealii-prepare loop forces petsc to be off if [ ! -z "${PETSC_DIR}" ]; then cecho ${INFO} "deal.II: unset PETSC_DIR due to forced DEAL_II_WITH_PETSC:BOOL=OFF option" unset PETSC_DIR @@ -193,16 +192,14 @@ fi if [ ! -z "${PETSC_DIR}" ]; then cecho ${INFO} "deal.II: configuration with PETSC" - CONFOPTS="\ - ${CONFOPTS} \ - -D DEAL_II_WITH_PETSC:BOOL=ON \ - -D PETSC_DIR=${PETSC_DIR}" + CONFOPTS="${CONFOPTS} \ + -D DEAL_II_WITH_PETSC:BOOL=ON \ + -D PETSC_DIR=${PETSC_DIR}" fi -# slepc +######################################## +# SLEPC if [[ ${PACKAGES_OFF} =~ 'slepc' ]]; then - # Disable slepc for deal.II, if a special DEAL_II_CONFOPTS together with - # the dealii-prepare loop forces slepc to be off if [ ! -z "${SLEPC_DIR}" ]; then cecho ${INFO} "deal.II: unset SLEPC_DIR due to forced DEAL_II_WITH_SLEPC:BOOL=OFF option" unset SLEPC_DIR @@ -211,10 +208,9 @@ fi if [ ! -z "${SLEPC_DIR}" ]; then cecho ${INFO} "deal.II: configuration with SLEPC" - CONFOPTS="\ - ${CONFOPTS} \ - -D DEAL_II_WITH_SLEPC:BOOL=ON \ - -D SLEPC_DIR=${SLEPC_DIR}" + CONFOPTS="${CONFOPTS} \ + -D DEAL_II_WITH_SLEPC:BOOL=ON \ + -D SLEPC_DIR=${SLEPC_DIR}" fi ######################################## diff --git a/deal.II-toolchain/packages/petsc.package b/deal.II-toolchain/packages/petsc.package index a7d4b7e..b594ee2 100644 --- a/deal.II-toolchain/packages/petsc.package +++ b/deal.II-toolchain/packages/petsc.package @@ -1,3 +1,7 @@ +################################################################################ +## PETSc ## +################################################################################ + VERSION=3.16.4 CHECKSUM=7de82ee5543cba9a7c12ca00c81f0b87 @@ -23,15 +27,14 @@ BUILDCHAIN=custom INSTALL_PATH=${INSTALL_PATH}/${EXTRACTSTO} -######################################################################### +################################################################################ -CONFOPTS=" - --with-debugging=0 - --with-shared-libraries=1 - --with-mpi=1 - --with-x=0 - --with-64-bit-indices=0 -" +CONFOPTS="\ + --with-debugging=0 \ + --with-shared-libraries=1 \ + --with-mpi=1 \ + --with-x=0 \ + --with-64-bit-indices=0" if [ ${NATIVE_OPTIMIZATIONS} = ON ]; then CONFOPTS="${CONFOPTS} \ @@ -40,7 +43,6 @@ if [ ${NATIVE_OPTIMIZATIONS} = ON ]; then FOPTFLAGS='-O3 -march=native -mtune=native'" fi - for external_pkg in hypre; do CONFOPTS="${CONFOPTS} --download-${external_pkg}=1" done @@ -79,17 +81,15 @@ fi # Add ParMETIS, if present if [ ! -z "${PARMETIS_DIR}" ]; then cecho ${INFO} "PETSc: configuration with ParMETIS" - CONFOPTS="\ - ${CONFOPTS} \ - --with-parmetis-dir=${PARMETIS_DIR} \ - --with-metis-dir=${PARMETIS_DIR}" + CONFOPTS="${CONFOPTS} \ + --with-parmetis-dir=${PARMETIS_DIR} \ + --with-metis-dir=${PARMETIS_DIR}" fi if [ ! -z "${SCALAPACK_DIR}" ]; then cecho ${INFO} "PETSc: configuration with SCALAPACK" - CONFOPTS="\ - ${CONFOPTS} \ - --with-scalapack-dir=${SCALAPACK_DIR}" + CONFOPTS="${CONFOPTS} \ + --with-scalapack-dir=${SCALAPACK_DIR}" else CONFOPTS="${CONFOPTS} --download-scalapack=1" fi @@ -97,12 +97,12 @@ fi if [ ! -z "${MUMPS_DIR}" ]; then cecho ${INFO} "PETSc: configuration with MUMPS" CONFOPTS="${CONFOPTS} \ - --with-mumps-dir=${MUMPS_DIR}" + --with-mumps-dir=${MUMPS_DIR}" else CONFOPTS="${CONFOPTS} --download-mumps=1" fi -######################################################################### +################################################################################ package_specific_setup () { cd ${BUILDDIR} @@ -128,11 +128,11 @@ package_specific_register () { package_specific_conf () { # Generate configuration file CONFIG_FILE=${CONFIGURATION_PATH}/${EXTRACTSTO} - rm -f $CONFIG_FILE + rm -f ${CONFIG_FILE} echo " export PETSC_DIR=${INSTALL_PATH} -" >> $CONFIG_FILE +" >> ${CONFIG_FILE} if [ ! -z "${SCALAPACK_DIR}" ]; then - echo "export SCALAPACK_DIR=${INSTALL_PATH}" >> $CONFIG_FILE + echo "export SCALAPACK_DIR=${INSTALL_PATH}" >> ${CONFIG_FILE} fi } diff --git a/deal.II-toolchain/packages/slepc.package b/deal.II-toolchain/packages/slepc.package index fd894c0..89e2968 100644 --- a/deal.II-toolchain/packages/slepc.package +++ b/deal.II-toolchain/packages/slepc.package @@ -1,3 +1,7 @@ +################################################################################ +## SLEPc ## +################################################################################ + VERSION=3.16.2 CHECKSUM=673dbda220e5a4bd2c3a6618267d8e55 @@ -22,7 +26,7 @@ BUILDCHAIN=custom INSTALL_PATH=${INSTALL_PATH}/${NAME} -############################################################################## +################################################################################ if [ -z "${PETSC_DIR}" ]; then cecho ${BAD} "slepc: error petsc variable PETSC_DIR not found." @@ -32,13 +36,13 @@ fi package_specific_setup () { cd ${BUILDDIR} cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* . - + # make sure no other invalid SLEPC_DIR is set: unset SLEPC_DIR ${PYTHON_INTERPRETER} ./configure --prefix=${INSTALL_PATH} ${CONFOPTS} quit_if_fail "slepc ./configure failed" - + make SLEPC_DIR=$PWD PETSC_DIR=${PETSC_DIR} all install quit_if_fail "slepc make all install failed" } @@ -50,8 +54,8 @@ package_specific_register () { package_specific_conf () { # Generate configuration file CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} - rm -f $CONFIG_FILE + rm -f ${CONFIG_FILE} echo " export SLEPC_DIR=${INSTALL_PATH} -" >> $CONFIG_FILE +" >> ${CONFIG_FILE} }