diff --git a/scripts/setup/levante.intel-2021.5.0_ompi415.sh b/scripts/setup/levante.intel-2021.5.0_ompi415.sh deleted file mode 100644 index 05cffa15d02c67622519d10372ccf4c03520e1ff..0000000000000000000000000000000000000000 --- a/scripts/setup/levante.intel-2021.5.0_ompi415.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -while [ $# -gt 0 ]; do - case "$1" in - --yaco-root) - YACO_ROOT=$2 - ABSOLUTE_YACO_ROOT=$(readlink -f "${YACO_ROOT}") - shift - break - ;; - *) - echo "Error: unknown argument '$1'. Call this script with only --yaco-root and path to your yaco-root" - exit 1 - ;; - esac -done - -echo "Absolute path provided as the yaco root: $ABSOLUTE_YACO_ROOT" - -# take the right compiler -MPI_ROOT='/sw/spack-levante/openmpi-4.1.5-j4eizi' -CC="${MPI_ROOT}/bin/mpicc" -FC="${MPI_ROOT}/bin/mpif90" -CXX="${MPI_ROOT}/bin/mpicxx" -CFLAGS='-g -O2' -LDFLAGS="-c++libs -cuda" -LIBS="-Wl,--as-needed" - -MPI_LAUNCH="${MPI_ROOT}/bin/mpiexec" - - -BUILD_DIRECTORY=$(pwd) -THREADS=8 -# build dependencies for yaco -echo "=== Building yaco dependencies ===" -bash $ABSOLUTE_YACO_ROOT/scripts/setup/build-dependencies.sh -j $THREADS --dependency all --work_dir $BUILD_DIRECTORY - -# build yaco -bash $ABSOLUTE_YACO_ROOT/scripts/setup/build-yaco.sh -j $THREADS --work_dir $BUILD_DIRECTORY - - -script_dir=$(cd "$(dirname "$0")"; pwd) -icon_dir=$(cd "${script_dir}/../.."; pwd) - diff --git a/scripts/setup/levante.intel-ompi412.sh b/scripts/setup/levante.intel-ompi412.sh new file mode 100644 index 0000000000000000000000000000000000000000..a7f4db2a0247ef2592daccfe7e6255363e20f3fe --- /dev/null +++ b/scripts/setup/levante.intel-ompi412.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +while [ $# -gt 0 ]; do + case "$1" in + --yaco-root) + YACO_ROOT=$2 + ABSOLUTE_YACO_ROOT=$(readlink -f "${YACO_ROOT}") + shift + break + ;; + *) + echo "Error: unknown argument '$1'. Call this script with --yaco-root and path to your yaco-root" + exit 1 + ;; + esac +done + +echo "Absolute path provided as the yaco root: $ABSOLUTE_YACO_ROOT" + +# take the right compiler +COMPILER="openmpi-4.1.2-yfwe6t4" +export MPI_ROOT="/sw/spack-levante/${COMPILER}" +export CC="${MPI_ROOT}/bin/mpicc" +export FC="${MPI_ROOT}/bin/mpif90" +export CXX="${MPI_ROOT}/bin/mpicxx" +export MPI_LAUNCH="${MPI_ROOT}/bin/mpiexec" + +THREADS=64 +BUILD_PATH=$ABSOLUTE_YACO_ROOT/build/$COMPILER +INSTALL_PATH=$BUILD_PATH/install + +# build dependencies for yaco +echo "=== Building yaco dependencies ===" +$ABSOLUTE_YACO_ROOT/scripts/setup/build-dependencies.sh -j $THREADS --dependency all --build_dir_name $COMPILER --prefix_path $INSTALL_PATH + +# build yaco +echo "=== Building yaco ===" +cd "$BUILD_PATH" +CC="${CC}" FC="${FC}" cmake $ABSOLUTE_YACO_ROOT -DCMAKE_PREFIX_PATH=$INSTALL_PATH -DENABLE_NETCDF=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release +cmake --build . -j $THREADS +cmake --install . --prefix=$INSTALL_PATH \ No newline at end of file diff --git a/scripts/setup/levante.intel-2021.5.0.sh b/scripts/setup/levante.intel-ompi415.sh similarity index 100% rename from scripts/setup/levante.intel-2021.5.0.sh rename to scripts/setup/levante.intel-ompi415.sh