Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Updated build scripts for bell (not yet tested)
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Feb 14, 2024
1 parent 653c544 commit 04be329
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
39 changes: 39 additions & 0 deletions buildscripts/build_bell_gnu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/zsh -l
# installs an editable (local) package in release mode on Negishi
# This is a convenience script for Kaustub

set -a
SCRIPT_DIR=$(realpath $(dirname $0))
ROOT_DIR=$(realpath ${SCRIPT_DIR}/..)
cd ${ROOT_DIR}
BUILD_TYPE=${1:-"Release"}

module purge
module use /depot/daminton/etc/modules
module load use.own
module load conda-env/mintongroup-py3.9.13
module load gcc/10.2.0
module load hdf5/1.10.6
module load netcdf-c/4.4.4
module load netcdf-fortran/4.5.3
module load shtools/gcc10.2.0/4.11.10
cmake -P distclean.cmake
if [[ BUILD_TYPE == "Release" ]]; then
pip install --config-settings=build-dir="build" \
--config-settings=cmake.build-type="${BUILD_TYPE}" \
--config-settings=cmake.args="-DUSE_SIMD=ON" \
--config-settings=cmake.args="-DUSE_OPENMP=ON" \
--config-settings=cmake.args="-DCMAKE_Fortran_COMPILER=gfortran" \
--config-settings=cmake.args="-DMACHINE_CODE_VALUE=\"Host\" " \
--config-settings=install.strip=false \
--no-build-isolation \
-ve .
else
pip uninstall swiftest -y
cmake -P distclean.cmake
cmake -B ${ROOT_DIR}/build -S . -G Ninja \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_Fortran_COMPILER=gfortran

cmake --build ${ROOT_DIR}/build -j${OMP_NUM_THREADS} -v
fi
45 changes: 45 additions & 0 deletions buildscripts/build_bell_intel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/zsh -l
# installs an editable (local) package in release mode on Negishi
# This is a convenience script for Kaustub

set -a
SCRIPT_DIR=$(realpath $(dirname $0))
ROOT_DIR=$(realpath ${SCRIPT_DIR}/..)
cd ${ROOT_DIR}
BUILD_TYPE=${1:-"Release"}

module purge
module load intel/19.0.5.281
module load intel-mkl/2019.5.281
module load impi/2019.5.281
source ${INTEL_ONEAPI_COMPILERS_HOME}/setvars.sh > /dev/null 2>&1
module use /depot/daminton/etc/modules
module load use.own
module load conda-env/mintongroup-py3.9.13
module load hdf5/1.10.6
module load netcdf-c/4.4.4
module load netcdf-fortran/4.5.3
module load shtools/intel19.0.5.281/4.11.10
cmake -P distclean.cmake
if [[ BUILD_TYPE == "Release" ]]; then
pip install --config-settings=build-dir="build" \
--config-settings=cmake.build-type="${BUILD_TYPE}" \
--config-settings=cmake.args="-DUSE_SIMD=ON" \
--config-settings=cmake.args="-DUSE_OPENMP=ON" \
--config-settings=cmake.args="-DCMAKE_Fortran_COMPILER=mpiifort" \
--config-settings=cmake.args="-DCMAKE_Fortran_FLAGS=\"-f90=ifort\"" \
--config-settings=cmake.args="-DMACHINE_CODE_VALUE=\"Host\" " \
--config-settings=install.strip=false \
--no-build-isolation \
-ve .
else
pip uninstall swiftest -y
cmake -P distclean.cmake
cmake -B ${ROOT_DIR}/build -S . -G Ninja \
-DMACHINE_CODE_VALUE="SSE2" \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_Fortran_COMPILER=mpiifort \
-DCMAKE_Fortran_FLAGS="-f90=ifort"

cmake --build ${ROOT_DIR}/build -j${OMP_NUM_THREADS} -v
fi

0 comments on commit 04be329

Please sign in to comment.