diff --git a/scripts/env/taurus/build_ogs.sh b/scripts/env/taurus/build_ogs.sh new file mode 100644 index 0000000000000000000000000000000000000000..0c88258b346f575ea8bf06d64c5d5c725d6804ea --- /dev/null +++ b/scripts/env/taurus/build_ogs.sh @@ -0,0 +1,19 @@ +# Alternative: OGS_DIR=$HOME/o/ +OGS_DIR=$( realpath ../../../.. ) +BIN_DIR=rp +ENV=taurus +source $OGS_DIR/s/scripts/env/$ENV/petsc.sh + +echo "Folder with all PETSC binaries for selected Partition: $PETSC_DIR" + +BUILD_DIR=$OGS_DIR/build/$PARTITION_NAME/$BIN_DIR/ + +mkdir -p $OGS_DIR/build/cpm_cache +mkdir -p $BUILD_DIR +cd $BUILD_DIR + +export CPM_SOURCE_DIR=$OGS_DIR/build/cpm_cache + +CC=`which mpicc` CXX=`which mpic++` cmake $OGS_DIR/s -G Ninja -DCMAKE_BUILD_TYPE=Release -DOGS_EIGEN_DYNAMIC_SHAPE_MATRICES=Off -DOGS_USE_PCH=Off -DOGS_USE_PETSC=On -DOGS_BUILD_PROCESSES="HT" -DPETSC_DIR=$PETSC_DIR -DPETSC_ARCH=arch-linux-c-opt + +ninja -j 8 \ No newline at end of file diff --git a/scripts/env/taurus/build_petsc.sh b/scripts/env/taurus/build_petsc.sh new file mode 100644 index 0000000000000000000000000000000000000000..a4952e5e36070ebaa6ff2b2e95b4cad4a7247fbd --- /dev/null +++ b/scripts/env/taurus/build_petsc.sh @@ -0,0 +1,22 @@ +if [ -n "$ZSH_VERSION" ]; then + DIR=$( cd $(dirname "${(%):-%x}") ; pwd -P ) + +else + DIR=$( cd $(dirname "${BASH_SOURCE[0]}") ; pwd -P ) +fi + +source $DIR/petsc.sh + +PETSC_INSTALL=$ALL_PETSC_DIR/$PARTITION_NAME/ +mkdir -p $PETSC_INSTALL + +cd $ALL_PETSC_DIR +echo "Clone or checkout PETSC (Version: $PETSC_VERSION) to $PETSC_DIR." +git clone --depth 1 --branch $PETSC_VERSION --single-branch https://gitlab.com/petsc/petsc.git $PETSC_DIR || (cd $PETSC_DIR ; git pull) +mkdir -p petsc_$PETSC_VERSION +cd $PETSC_DIR +echo "Build PETSC in $PETSC_DIR started." +./configure --with-cc=gcc --with-cxx=g++ --with-fc=0 --prefix=PETSC_INSTALL --with-debugging=0 +make +make PETSC_DIR=$PETSC_DIR PETSC_ARCH=arch-linux-c-opt install +echo "Build PETSC in $PETSC_DIR done." diff --git a/scripts/env/taurus/cli.sh b/scripts/env/taurus/cli.sh new file mode 100644 index 0000000000000000000000000000000000000000..195ca0e4d9a5d070c84839b6ccd07a9f505faeed --- /dev/null +++ b/scripts/env/taurus/cli.sh @@ -0,0 +1,8 @@ +module purge +module load foss/2021b +# foss/2021b loads GCCcore/11.2.0, OpenMPI/4.4.1-GCC-11.2.0, ScaLAPACK/2.1.0-gompi-2021b-fb + +module load Ninja/1.10.2 +module load CMake/3.21.1 +module load git-lfs/2.7.2 +module load git/2.33.1-GCCcore-11.2.0-nodocs diff --git a/scripts/env/taurus/petsc.sh b/scripts/env/taurus/petsc.sh new file mode 100644 index 0000000000000000000000000000000000000000..bcdd782a7b990e1a0e72ce19a93e288b7bad873d --- /dev/null +++ b/scripts/env/taurus/petsc.sh @@ -0,0 +1,19 @@ +if [ -n "$ZSH_VERSION" ]; then + DIR=$( cd $(dirname "${(%):-%x}") ; pwd -P ) +else + DIR=$( cd $(dirname "${BASH_SOURCE[0]}") ; pwd -P ) +fi + +source $DIR/cli.sh +source $DIR/user.sh + +module load HDF5/1.12.1 +module load Python/3.9.6 +module load Boost/1.77 + +# VTK will be built by CPM, because no VTK build with GCCCore/11.2.0 in foss/2021b available + +# PETSC needs custom build! +PETSC_VERSION=v3.16.4 +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ALL_PETSC_DIR/$PARTITION_NAME/lib +PETSC_DIR=$ALL_PETSC_DIR/$PARTITION_NAME/petsc_$PETSC_VERSION \ No newline at end of file diff --git a/scripts/env/taurus/user.sh b/scripts/env/taurus/user.sh new file mode 100644 index 0000000000000000000000000000000000000000..558417cd8495cf4a412b3a887015e44e9ba9b773 --- /dev/null +++ b/scripts/env/taurus/user.sh @@ -0,0 +1,5 @@ +# Location of all petsc builds are specified by user +ALL_PETSC_DIR=$HOME/petsc/ +# Cluster partition names are based https://doc.zih.tu-dresden.de/jobs_and_resources/hardware_overview/ +# alpha, romeo, julia, ml, haswell, broadwell, gpu2, smp2 +PARTITION_NAME=haswell