diff --git a/scripts/setupLC-TPL-uberenv-helper.bash b/scripts/setupLC-TPL-uberenv-helper.bash index 90f4567f..9ac31a6a 100755 --- a/scripts/setupLC-TPL-uberenv-helper.bash +++ b/scripts/setupLC-TPL-uberenv-helper.bash @@ -1,14 +1,12 @@ #!/bin/bash ## Builds the TPLs for a specific system and host config. -## Usage ./setupLC-TPL-uberenv-helper.bash pathToGeosxDirectory pathToInstallDirectory machine compiler commandToGetANode -#GEOSX_DIR=$1 -GEOS_BRANCH=$1 -INSTALL_DIR=$2 -MACHINE=$3 -COMPILER=$4 -SPEC=\"${5}\" -GET_A_NODE=$6 +## Usage ./setupLC-TPL-uberenv-helper.bash pathToInstallDirectory machine compiler spackSpecToBuild commandToGetANode +INSTALL_DIR=$1 +MACHINE=$2 +COMPILER=$3 +SPEC=\"${4}\" +GET_A_NODE=$5 ## Eat up the command line arguments so the rest can be forwarded to config-build. shift @@ -19,31 +17,15 @@ shift CONFIG=$MACHINE-$COMPILER LOG_FILE=$CONFIG.log -# HOST_CONFIG=$GEOSX_DIR/host-configs/LLNL/$CONFIG.cmake -#INSTALL_DIR=$INSTALL_DIR/install-$CONFIG-release -#echo "Building the TPLs on $MACHINE for $HOST_CONFIG to be installed at $INSTALL_DIR. Progress will be written to $LOG_FILE." echo "Building the TPLs on $MACHINE for $COMPILER to be installed at $INSTALL_DIR. Progress will be written to $LOG_FILE." ssh $MACHINE -t " . /etc/profile && cd $PWD/tempGEOS && -echo $SPEC && -echo $GET_A_NODE && $GET_A_NODE ./scripts/uberenv/uberenv.py --spec ${SPEC} --prefix ${INSTALL_DIR}/${CONFIG}_tpls --spack-env-name ${CONFIG}_env && exit" > $LOG_FILE 2>&1 -# $GET_A_NODE ./scripts/uberenv/uberenv.py --spec ${SPEC} --prefix $INSTALL_DIR --spack-env-name ${CONFIG}_env --skip-setup && - -# ssh $MACHINE -t " -# . /etc/profile && -# cd $PWD && -# module load cmake/3.23.1 && -# python3 scripts/config-build.py -hc $HOST_CONFIG -bt Release -ip $INSTALL_DIR $@ && -# cd build-$CONFIG-release && -# $GET_A_NODE make && -# exit" > $LOG_FILE 2>&1 - ## Check the last ten lines of the log file. ## A successful install should show up on one of the final lines. tail -10 $LOG_FILE | grep -E "Successfully installed geos" > /dev/null diff --git a/scripts/setupLC-TPL-uberenv.bash b/scripts/setupLC-TPL-uberenv.bash index 58b000ec..89c09446 100755 --- a/scripts/setupLC-TPL-uberenv.bash +++ b/scripts/setupLC-TPL-uberenv.bash @@ -1,7 +1,7 @@ #!/bin/bash ## Builds the TPLs on all LC systems. Must be run from the top level TPL directory. -## Usage ./setupLC-TPL.bash branchToBuild pathToInstallDirectory [extra arguments to config-build ] +## Usage ./setupLC-TPL.bash branchToBuild pathToInstallDirectory GEOS_BRANCH=$1 INSTALL_DIR=$2 @@ -24,13 +24,13 @@ killall() { branch_exists=$(git ls-remote https://github.com/GEOS-DEV/GEOS.git $GEOS_BRANCH | wc -l) if [[ $branch_exists != 1 ]] ; then - echo "Branch $GEOS_BRANCH does not exist in GEOS repository" - exit + echo "Branch $GEOS_BRANCH does not exist in GEOS repository" + exit fi if [[ -z $INSTALL_DIR ]]; then - echo "No installation directory path was provided" - exit + echo "No installation directory path was provided" + exit fi if [[ ! -d $INSTALL_DIR ]]; then @@ -51,25 +51,26 @@ git clone -b $GEOS_BRANCH https://github.com/GEOS-DEV/GEOS.git tempGEOS cd tempGEOS git submodule init scripts/uberenv git submodule update -# ./scripts/uberenv/uberenv.py --prefix $INSTALL_DIR --setup-only --spack-env-file scripts/spack_configs/toss_4_x86_64_ib/spack.yaml cd .. -echo "Building all LC TPLs from $GEOS_BRANCH to be installed at $INSTALL_DIR" +echo "Building all LC TPLs from $GEOS_BRANCH to be installed at $INSTALL_DIR..." chmod -R g+rx $INSTALL_DIR chgrp -R GEOS $INSTALL_DIR -./scripts/setupLC-TPL-uberenv-helper.bash $GEOS_BRANCH $INSTALL_DIR quartz clang-14 "%clang@14.0.6 +docs" "salloc -N 1 -t 150 " $@ & -./scripts/setupLC-TPL-uberenv-helper.bash $GEOS_BRANCH $INSTALL_DIR quartz gcc-12 "%gcc@12.1.1 +docs" "salloc -N 1 -t 150 " $@ & -./scripts/setupLC-TPL-uberenv-helper.bash $GEOS_BRANCH $INSTALL_DIR lassen gcc-8-cuda-11 "%gcc@8.3.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & -./scripts/setupLC-TPL-uberenv-helper.bash $GEOS_BRANCH $INSTALL_DIR lassen clang-13-cuda-11 "%clang@13.0.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & -./scripts/setupLC-TPL-uberenv-helper.bash $GEOS_BRANCH $INSTALL_DIR lassen clang-10-cuda-11 "%clang@10.0.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & - +./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR quartz clang-14 "%clang@14.0.6 +docs" "salloc -N 1 -t 150 " $@ & +./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR quartz gcc-12 "%gcc@12.1.1 +docs" "salloc -N 1 -t 150 " $@ & +./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR lassen gcc-8-cuda-11 "%gcc@8.3.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & +./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR lassen clang-13-cuda-11 "%clang@13.0.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & +./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR lassen clang-10-cuda-11 "%clang@10.0.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & + +# Note: Estimated completion time is ~90 minutes. +# Check log files for unreported completion of jobs. wait -echo "Copying generated host-configs..." +echo "Copying generated host-configs from tempGEOS directory..." cd tempGEOS && cp *.cmake .. -#echo "Removing temporary GEOS repo tempGEOS..." -#rm -rf tempGEOS +echo "Removing temporary GEOS repo tempGEOS..." +rm -rf tempGEOS echo "Complete"