]> https://gitweb.dealii.org/ - candi.git/commitdiff
Clean up PETSc and SLEPc 278/head
authorFabian Castelli <fabian.castelli@kit.edu>
Mon, 14 Feb 2022 15:31:06 +0000 (16:31 +0100)
committerFabian Castelli <fabian.castelli@kit.edu>
Mon, 14 Feb 2022 15:31:06 +0000 (16:31 +0100)
deal.II-toolchain/packages/dealii.package
deal.II-toolchain/packages/petsc.package
deal.II-toolchain/packages/slepc.package

index 58d399bf41d666e7fef86d89ab62b7e1492ca2cb..42ceb92cb61dbe17b52bc69365066b2d47c2be12 100644 (file)
@@ -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
 
 ########################################
index a7d4b7edab0fe37238cdf5432d272a06e7bb5fc5..b594ee2b330529188f733ace48119fc9b92086a8 100644 (file)
@@ -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
 }
index fd894c060342eddce395892e535c3a4af64d1293..89e2968ff15a9122bb5e315870cc23725a84100b 100644 (file)
@@ -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}
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.