Skip to content
Snippets Groups Projects
Commit b39c7305 authored by Tom Fischer's avatar Tom Fischer
Browse files

Merge branch 'barnard-env' into 'master'

[env] Added barnard env (module loading) scripts.

See merge request ogs/ogs!5198
parents be571fe6 28d82626
No related branches found
No related tags found
No related merge requests found
module purge
module load foss/2022b
module load Ninja/1.11.1
module load CMake/3.24.3
module load git/2.38.1-nodocs
\ No newline at end of file
......@@ -7,13 +7,7 @@ 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
module load HDF5/1.14.0
module load Python/3.10.8
# 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
# PETSc and VTK build by ogs
\ No newline at end of file
# 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_CACHE=$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
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."
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
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment