From c34be4764c46329f03852ae7dcd693857b52b310 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Sun, 18 Feb 2024 12:22:40 -0500 Subject: [PATCH] Simplified RCAC build scripts --- buildscripts/build_rcac_gnu.sh | 34 ++++++++++++----------------- buildscripts/build_rcac_intel.sh | 37 ++++++++++++++------------------ 2 files changed, 30 insertions(+), 41 deletions(-) diff --git a/buildscripts/build_rcac_gnu.sh b/buildscripts/build_rcac_gnu.sh index aefc6fc71..09bbbb561 100755 --- a/buildscripts/build_rcac_gnu.sh +++ b/buildscripts/build_rcac_gnu.sh @@ -1,8 +1,10 @@ #!/bin/zsh -l # Builds Swiftest on the Purdue RCAC cluster system using the GNU compiler # This is a convenience script for Kaustub -# The default build type is Release, in which case the Python package is installed in editable mode. Otherwise, only the Fortran -# library and executables are built, but not installed, so that the user can run them from the build directory. +# The default build type is Release. Pass other build types as a string argument. +# +# Example: +# $ buildscripts/build_rcac_gnu.sh "Debug" set -a SCRIPT_DIR=$(realpath $(dirname $0)) @@ -69,21 +71,13 @@ elif [[ $MACHINE_NAME == "negishi" ]]; then 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 - 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 \ No newline at end of file +pip uninstall swiftest +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 . \ No newline at end of file diff --git a/buildscripts/build_rcac_intel.sh b/buildscripts/build_rcac_intel.sh index 8e7ae495e..830afd51f 100755 --- a/buildscripts/build_rcac_intel.sh +++ b/buildscripts/build_rcac_intel.sh @@ -1,9 +1,12 @@ #!/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 mintongroup module first. Using the RCAC tools it's the following commands: -# $ conda env create -f environment.yml -# $ conda-env-mod module -n mintongroup --jupyter +# To use in Release mode +# The default build type is Release. Pass other build types as a string argument. +# +# Example: +# $ buildscripts/build_rcac_intel.sh "Debug" + set -a SCRIPT_DIR=$(realpath $(dirname $0)) @@ -77,21 +80,13 @@ 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=${FC}" \ - --config-settings=cmake.args="-DMACHINE_CODE_VALUE=$MACHINE_CODE_VALUE" \ - --config-settings=install.strip=false \ - --no-build-isolation \ - -ve . -else - cmake -B ${ROOT_DIR}/build -S . -G Ninja \ - -DMACHINE_CODE_VALUE=${MACHINE_CODE_VALUE} \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DCMAKE_Fortran_COMPILER=${FC} \ - - cmake --build ${ROOT_DIR}/build -j${OMP_NUM_THREADS} -v -fi \ No newline at end of file +pip uninstall swiftest +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=${FC}" \ + --config-settings=cmake.args="-DMACHINE_CODE_VALUE=$MACHINE_CODE_VALUE" \ + --config-settings=install.strip=false \ + --no-build-isolation \ + -ve . \ No newline at end of file