From 8dcc8102d3cbfb43311ee96f43995efcdcb42c5d Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Sun, 15 May 2022 11:56:42 -0400 Subject: [PATCH] new global option: USE_64_BIT_INDICES --- candi.cfg | 3 +++ deal.II-toolchain/packages/dealii.package | 5 +++++ deal.II-toolchain/packages/petsc.package | 9 ++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/candi.cfg b/candi.cfg index 321dab3..bb5a80b 100644 --- a/candi.cfg +++ b/candi.cfg @@ -33,6 +33,9 @@ DEAL_II_CONFOPTS="" # Option {ON|OFF}: Enable machine-specific optimizations (e.g. -march=native)? NATIVE_OPTIMIZATIONS=OFF +# Option {ON|OFF}: Enable 64-bit indices for large computations? +USE_64_BIT_INDICES=OFF + # Option {ON|OFF}: Enable building of dealii examples? BUILD_EXAMPLES=ON diff --git a/deal.II-toolchain/packages/dealii.package b/deal.II-toolchain/packages/dealii.package index fc96fa4..9be7da7 100644 --- a/deal.II-toolchain/packages/dealii.package +++ b/deal.II-toolchain/packages/dealii.package @@ -42,6 +42,11 @@ if [ ${NATIVE_OPTIMIZATIONS} = ON ]; then -D CMAKE_CXX_FLAGS_RELEASE='-O3'" fi +if [ ${USE_64_BIT_INDICES} = ON ]; then + CONFOPTS="${CONFOPTS} \ + -D DEAL_II_WITH_64BIT_INDICES=ON" +fi + if [ ${USE_DEAL_II_CMAKE_MPI_COMPILER} = ON ]; then # Disable CXX, CC for deal.II as recommended in # https://github.com/dealii/dealii/issues/11478 and set MPI_*_COMPILER diff --git a/deal.II-toolchain/packages/petsc.package b/deal.II-toolchain/packages/petsc.package index b594ee2..bdcd5cb 100644 --- a/deal.II-toolchain/packages/petsc.package +++ b/deal.II-toolchain/packages/petsc.package @@ -29,12 +29,19 @@ INSTALL_PATH=${INSTALL_PATH}/${EXTRACTSTO} ################################################################################ +with64bit=0 +if [ ${USE_64_BIT_INDICES} = ON ]; then + with64bit=1 +else + with64bit=0 +fi + CONFOPTS="\ --with-debugging=0 \ --with-shared-libraries=1 \ --with-mpi=1 \ --with-x=0 \ - --with-64-bit-indices=0" + --with-64-bit-indices=$(with64bit}" if [ ${NATIVE_OPTIMIZATIONS} = ON ]; then CONFOPTS="${CONFOPTS} \ -- 2.39.5