This repository was archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
167 additions
and
89 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/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"} | ||
|
||
MACHINE_NAME=$(uname -n | awk -F. '{ | ||
if ($2 == "negishi" || $2 == "bell") | ||
print $2; | ||
else { | ||
split($1, a, "-"); | ||
if (length(a) > 1) | ||
print a[1]; | ||
else | ||
print "Unknown"; | ||
} | ||
}') | ||
|
||
if [[ $MACHINE_NAME == "bell" ]]; then | ||
module purge | ||
module use /depot/daminton/etc/modules/bell | ||
module load gcc/10.2.0 | ||
module load hdf5/1.10.6 | ||
module load netcdf/4.7.4 | ||
module load netcdf-fortran/4.5.3 | ||
module load shtools/gcc10/4.11.10 | ||
module load cmake/3.20.6 | ||
module load ninja/1.11.1 | ||
if [[ $BUILD_TYPE == "Release" ]]; then | ||
module load use.own | ||
module load conda-env/swiftest-env-py3.8.5 | ||
fi | ||
elif [[ $MACHINE_NAME == "negishi" ]]; then | ||
module purge | ||
module use /depot/daminton/etc/modules/negishi | ||
module load gcc/12.2.0 | ||
module load hdf5/1.13.2 | ||
module load netcdf-c/4.9.0 | ||
module load netcdf-fortran/4.6.0 | ||
module load shtools/gcc12/4.11.10 | ||
module load cmake/3.24.3 | ||
module load ninja/1.11.1 | ||
if [[ $BUILD_TYPE == "Release" ]]; then | ||
module load use.own | ||
module load conda-env/swiftest-env-py3.9.13 | ||
fi | ||
fi | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#!/bin/zsh -l | ||
# installs an editable (local) package on Bell | ||
# This is a convenience script for Kaustub | ||
# To use in Release mode, be sure to create the swiftest-env module first. Using the RCAC tools it's the following commands: | ||
# $ conda env create -f environment.yml | ||
# $ conda-env-mod module -n swiftest-env --jupyter | ||
|
||
|
||
set -a | ||
SCRIPT_DIR=$(realpath $(dirname $0)) | ||
ROOT_DIR=$(realpath ${SCRIPT_DIR}/..) | ||
cd ${ROOT_DIR} | ||
BUILD_TYPE=${1:-"Release"} | ||
|
||
MACHINE_NAME=$(uname -n | awk -F. '{ | ||
if ($2 == "negishi" || $2 == "bell") | ||
print $2; | ||
else { | ||
split($1, a, "-"); | ||
if (length(a) > 1) | ||
print a[1]; | ||
else | ||
print "Unknown"; | ||
} | ||
}') | ||
|
||
|
||
if [[ $MACHINE_NAME == "bell" ]]; then | ||
module purge | ||
module use /depot/daminton/etc/modules/bell | ||
module load intel/19.0.5.281 | ||
module load intel-mkl/2019.5.281 | ||
module load impi/2019.5.281 | ||
module load shtools/intel19/4.11.10 | ||
module load cmake/3.20.6 | ||
module load ninja/1.11.1 | ||
module load hdf5/1.10.6 | ||
module load netcdf/4.7.4 | ||
module load netcdf-fortran/4.5.3 | ||
if [[ $BUILD_TYPE == "Release" ]]; then | ||
module load use.own | ||
module load conda-env/swiftest-env-py3.8.5 | ||
fi | ||
elif [[ $MACHINE_NAME == "negishi" ]]; then | ||
module purge | ||
module use /depot/daminton/etc/modules/negishi | ||
module load intel-oneapi-compilers/2023.0.0 | ||
module load intel-oneapi-mkl/2023.0.0 | ||
module load intel-oneapi-mpi/2021.8.0 | ||
source ${INTEL_ONEAPI_COMPILERS_HOME}/setvars.sh > /dev/null 2>&1 | ||
module load netcdf-fortran/intel-oneapi/4.6.1 | ||
module load shtools/intel-oneapi/4.11.10 | ||
module load cmake/3.24.3 | ||
module load ninja/1.11.1 | ||
if [[ $BUILD_TYPE == "Release" ]]; then | ||
module load use.own | ||
module load conda-env/mintongroup-py3.9.13 | ||
fi | ||
fi | ||
|
||
|
||
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 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,5 @@ dependencies: | |
- pip | ||
- flake8 | ||
- pyshtools | ||
- scikit-build-core | ||
- ipykernel |