]> https://gitweb.dealii.org/ - candi.git/commitdiff
Update sundials package 232/head
authorFabian Castelli <fabian.castelli@kit.edu>
Mon, 7 Jun 2021 10:16:37 +0000 (12:16 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Tue, 6 Jul 2021 11:37:58 +0000 (13:37 +0200)
deal.II-toolchain/packages/dealii.package
deal.II-toolchain/packages/sundials.package

index 8fb6a352fabc15c502949e356e97019b668d4c65..a68cb65f9eddd20ed7ab5123804a3fc4010c56f5 100644 (file)
@@ -297,6 +297,22 @@ if [ ! -z "${ADOLC_DIR}" ]; then
       -D ADOLC_DIR=${ADOLC_DIR}"
 fi
 
+########################################
+# SUNDIALS
+if [[ ${PACKAGES_OFF} =~ 'sundials' ]]; then
+    if [ ! -z "${SUNDIALS_DIR}" ]; then
+        cecho ${INFO} "deal.II: unset SUNDIALS_DIR due to forced DEAL_II_WITH_SUNDIALS:BOOL=OFF option"
+        unset SUNDIALS_DIR
+    fi
+fi
+
+if [ ! -z "${SUNDIALS_DIR}" ]; then
+    cecho ${INFO} "deal.II: configuration with SUNDIALS"
+    CONFOPTS="${CONFOPTS} \
+      -D DEAL_II_WITH_SUNDIALS:BOOL=ON \
+      -D SUNDIALS_DIR=${SUNDIALS_DIR}"
+fi
+
 ################################################################################
 package_specific_install() {
     if [ ${RUN_DEAL_II_TESTS} = ON ]; then
index 888401574f91101a7578cb6340eaf08cab42af0e..f1c0a528777bdc60fea963adcb1b9419998dcb34 100644 (file)
@@ -1,28 +1,59 @@
-VERSION=3.1.0
-NAME=sundials-${VERSION}
-EXTRACTSTO=sundials-${VERSION}
-SOURCE=https://computation.llnl.gov/projects/sundials/download/
-CHECKSUM=1a84ca41c7f71067e03d519ddbcd9dae
-PACKING=.tar.gz
+################################################################################
+## SUNDIALS                                                                   ##
+################################################################################
+
+# By default load the tarball.
+# To load the git repository define a variable CANDI_SUNDIALS_LOAD_TARBALL=OFF.
+if [ -z ${CANDI_SUNDIALS_LOAD_TARBALL} ]; then
+    CANDI_SUNDIALS_LOAD_TARBALL=ON
+fi
+
+if [ ${CANDI_SUNDIALS_LOAD_TARBALL} = ON ]; then
+    # 2021/07/01
+    VERSION=5.7.0
+    CHECKSUM=48da7baa8152ddb22aed1b02d82d1dbb4fbfea22acf67634011aa0303a100a43
+    CHECKSUM="${CHECKSUM} c04ecc9102851955b62e626a43ad5f604e890ab0"
+    CHECKSUM="${CHECKSUM} 483784dab433f178e79072bbed98c38c"
+
+    # VERSION=3.1.0
+    # CHECKSUM=1a84ca41c7f71067e03d519ddbcd9dae
+
+    NAME=sundials-${VERSION}
+    PACKING=.tar.gz
+    EXTRACTSTO=sundials-${VERSION}
+    SOURCE=https://github.com/LLNL/sundials/releases/download/v${VERSION}/
+else
+
+    VERSION=v5.7.0
+    # VERSION=v3.2.1
+
+    NAME=sundials
+    PACKING=git
+    SOURCE=https://github.com/LLNL/
+    EXTRACTSTO=${NAME}-${VERSION}
+fi
+unset CANDI_SUNDIALS_LOAD_TARBALL
+
 BUILDCHAIN=cmake
 
 BUILDDIR=${BUILD_PATH}/sundials-${VERSION}
 INSTALL_PATH=${INSTALL_PATH}/sundials-${VERSION}
 
-CONFOPTS="-D CMAKE_INSTALL_PREFIX=${INSTALL_PATH} \
- -D MPI_ENABLE=ON \
- -D BUILD_SHARED_LIBS=ON"
+# In versions prior to v5.7.0 the deprecated options MPI_ENABLE instead of the
+# new ENABLE_MPI option was used.
+CONFOPTS="\
+  -D ENABLE_MPI:BOOL=ON \
+  -D BUILD_SHARED_LIBS:BOOL=ON"
 
-package_specific_register () {
+package_specific_register() {
     export SUNDIALS_DIR=${INSTALL_PATH}
 }
 
-package_specific_conf () {
+package_specific_conf() {
     # Generate configuration file
     CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
     rm -f $CONFIG_FILE
     echo "
 export SUNDIALS_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.