Skip to content

Commit

Permalink
ENH Launch wrapper accounts for partition and account without hard co…
Browse files Browse the repository at this point in the history
…ding
  • Loading branch information
gadorlhiac committed Apr 15, 2024
1 parent e664c43 commit 7b32d5e
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion launch_scripts/submit_launch_airflow.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
#!/bin/bash

# Need to capture partition and account for SLURM
while [[ $# -gt 0 ]]
do
case "$1" in
--partition=*)
PARTITION="${1#*=}"
shift
;;
--account=*)
ACCOUNT="${1#*=}"
shift
;;
*)
POS+=("$1")
shift
;;
esac
done
set -- "${POS[@]}"

CMD="${@}"
CMD="${CMD} --partition=${PARTITION} --account=${ACCOUNT}"
echo $CMD
CMD="/sdf/group/lcls/ds/tools/lute/lute_launcher ${CMD}"
SLURM_ARGS="--partition=milano --account=lcls:data --ntasks=1"
SLURM_ARGS="--partition=${PARTITION} --account=${ACCOUNT} --ntasks=1"
echo "Running ${CMD} with ${SLURM_ARGS}"
sbatch $SLURM_ARGS --wrap "${CMD}"

0 comments on commit 7b32d5e

Please sign in to comment.