Skip to content

Commit

Permalink
Linting fixes on build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Heinrich-BR committed Jul 9, 2024
1 parent 2a4427c commit 3cf5fb0
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions scripts/build-platypus-csd3-ampere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#SBATCH --output=platypus_gpu_build.%j.out
#SBATCH --error=platypus_gpu_build.%j.err

## WARNING: THIS SCRIPT WILL UNINSTALL ALL SPACK MODULES ASSOCIATED WITH
## THE ARCHITECTURE DEFINED IN THE ARCH VARIABLE. IF YOU DO NOT WISH TO DO
## WARNING: THIS SCRIPT WILL UNINSTALL ALL SPACK MODULES ASSOCIATED WITH
## THE ARCHITECTURE DEFINED IN THE ARCH VARIABLE. IF YOU DO NOT WISH TO DO
## THAT, COMMENT OUT THE SPACK UNINSTALL LINE BEFORE SUBMITTING THE SCRIPT
## -> UNINSTALL LINE IN THE install_spack_deps() FUNCTION
ARCH="linux-rocky8-zen"
Expand Down Expand Up @@ -39,7 +39,10 @@ set_paths() {
BUILD_PATH=${ROOT_PATH}/${BUILD_DIR_NAME}

echo "Building in ${BUILD_PATH}"
mkdir -p "${BUILD_PATH}" || { echo "Failed to create ${BUILD_PATH}" ; exit 1 ; }
mkdir -p "${BUILD_PATH}" || {
echo "Failed to create ${BUILD_PATH}"
exit 1
}

cd "${BUILD_PATH}" || exit 1

Expand All @@ -48,7 +51,7 @@ set_paths() {
check_spack() {

cd "${ROOT_PATH}" || exit 1

if [ $(command -v spack) ]; then
echo "Spack command detected. Using pre-loaded spack."
elif [ -f ${ROOT_PATH}/spack/share/spack/setup-env.sh ]; then
Expand Down Expand Up @@ -104,7 +107,6 @@ install_spack_deps() {
spack install py-setuptools
spack load py-setuptools arch=${ARCH}


}

install_gslib() {
Expand Down Expand Up @@ -152,7 +154,7 @@ install_mfem() {
if [ $? -eq 2 ]; then
echo "MFEM config failed"
exit 1
fi
fi

make -j"$compile_cores"

Expand All @@ -172,7 +174,6 @@ install_moose() {
export METHOD="opt"
export SLEPC_DIR=$(spack find --format "{prefix}" slepc arch=${ARCH})


cd "${BUILD_PATH}" || exit 1
git clone https://github.com/idaholab/moose
cd moose || exit 1
Expand All @@ -189,35 +190,35 @@ install_moose() {
if [ $? -eq 2 ]; then
echo "WASP build failed"
exit 1
fi
fi

./configure --with-derivative-size=200
if [ $? -eq 2 ]; then
echo "MOOSE configure failed"
exit 1
fi
fi

cd framework || exit 1
make -j"$compile_cores"
if [ $? -eq 2 ]; then
echo "MOOSE framework build failed"
exit 1
fi
fi

cd ../modules || exit 1
make -j"$compile_cores"
if [ $? -eq 2 ]; then
echo "MOOSE modules build failed"
exit 1
fi
fi

# This takes very long! Only run the tests if you really need to!
#cd ../test || exit 1
#make -j"$compile_cores"
#if [ $? -eq 2 ]; then
# echo "MOOSE test build failed"
# exit 1
#fi
#fi

#./run_tests -j"$compile_cores"
}
Expand Down

0 comments on commit 3cf5fb0

Please sign in to comment.