diff --git a/cron/polaris_aurora_cron.sh b/cron/polaris_aurora_cron.sh new file mode 100755 index 0000000..fc2f701 --- /dev/null +++ b/cron/polaris_aurora_cron.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +HERE=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) + +# top directory of all Polaris cronjob work +export POLARIS_CRON_ROOT="/lus/flare/projects/E3SM_Dec/$USER/polaris_scratch/cron" + +mkdir -p $POLARIS_CRON_ROOT + +# launch polaris cronjob +exec bash $HERE/polaris_cron.sh diff --git a/cron/polaris_chrysalis_cron.sh b/cron/polaris_chrysalis_cron.sh new file mode 100755 index 0000000..ab30ee7 --- /dev/null +++ b/cron/polaris_chrysalis_cron.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +HERE=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) + +# top directory of all Polaris cronjob work +export POLARIS_CRON_ROOT="/lcrc/group/e3sm/$USER/scratch/cron" + +mkdir -p $POLARIS_CRON_ROOT + +# launch polaris cronjob +exec bash $HERE/polaris_cron.sh diff --git a/cron/polaris_cron.sh b/cron/polaris_cron.sh new file mode 100755 index 0000000..7b5bc67 --- /dev/null +++ b/cron/polaris_cron.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Configuration +export POLARIS_ROOT=$POLARIS_CRON_ROOT/polaris +REMOTE_URL="https://github.com/E3SM-Project/polaris.git" +BRANCH="main" + +rm -rf ${POLARIS_ROOT} + +git clone -b "$BRANCH" "$REMOTE_URL" "$POLARIS_ROOT" +cd "$POLARIS_ROOT" || exit + +# Update specific submodules recursively +echo "Updating submodules..." +git submodule update --init --recursive jigsaw-python +git submodule update --init e3sm_submodules/Omega +pushd e3sm_submodules/Omega +git submodule update --init --recursive externals/ekat externals/scorpio cime components/omega/external +popd + +# Launch the final script with all passed arguments +LAUNCH_SCRIPT="$POLARIS_ROOT/cron-scripts/launch_all.sh" + +if [ -f "$LAUNCH_SCRIPT" ]; then + echo "Launching: $LAUNCH_SCRIPT $*" + exec bash "$LAUNCH_SCRIPT" "$@" +else + echo "Error: Launch script not found at $LAUNCH_SCRIPT" + exit 1 +fi diff --git a/cron/polaris_frontier_cron.sh b/cron/polaris_frontier_cron.sh new file mode 100755 index 0000000..376addc --- /dev/null +++ b/cron/polaris_frontier_cron.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +HERE=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) + +# top directory of all Polaris cronjob work +export POLARIS_CRON_ROOT="/lustre/orion/cli115/proj-shared/${USER}/polaris_scratch/cron" + +mkdir -p $POLARIS_CRON_ROOT + +# launch polaris cronjob +exec bash $HERE/polaris_cron.sh diff --git a/cron/polaris_pm-cpu_cron.sh b/cron/polaris_pm-cpu_cron.sh new file mode 100755 index 0000000..c1d8105 --- /dev/null +++ b/cron/polaris_pm-cpu_cron.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +HERE=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) + +# top directory of all Polaris cronjob work +export POLARIS_CRON_ROOT="$PSCRATCH/polaris_scratch/cron/pm-cpu" + +mkdir -p $POLARIS_CRON_ROOT + +# launch polaris cronjob +exec bash $HERE/polaris_cron.sh -m pm-cpu diff --git a/cron/polaris_pm-gpu_cron.sh b/cron/polaris_pm-gpu_cron.sh new file mode 100755 index 0000000..6697a36 --- /dev/null +++ b/cron/polaris_pm-gpu_cron.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +HERE=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) + +# top directory of all Polaris cronjob work +export POLARIS_CRON_ROOT="$PSCRATCH/polaris_scratch/cron/pm-gpu" + +mkdir -p $POLARIS_CRON_ROOT + +if [[ ! -z "${SLURM_MEM_PER_CPU}" ]]; then +unset SLURM_MEM_PER_CPU +unset SLURM_OPEN_MODE +fi + +# launch polaris cronjob +exec bash $HERE/polaris_cron.sh -m pm-gpu