diff --git a/launch_scripts/submit_launch_airflow.sh b/launch_scripts/submit_launch_airflow.sh index a906ec8e..33fd69f5 100755 --- a/launch_scripts/submit_launch_airflow.sh +++ b/launch_scripts/submit_launch_airflow.sh @@ -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}"