Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ansible/roles/compiled/templates/cromwell_slurm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ backend {
# pull the image once into the user's Singularity cache, then run the task
# inside it. Bash variables are written bare ($IMAGE), never with braces:
# Cromwell interpolates the braced form itself before bash sees the script.
# Cromwell also wraps this string in a WDL command block, which the first
# closing brace that does not end one of its own references terminates
# ("Unrecognized token: sbatch"). So no bash brace groups or brace expansion
# anywhere in the string, shell comments included: use if/fi instead.
submit-docker = """
# Cache pulled images per user, on scratch rather than quota-limited $HOME.
if [ -z "$SINGULARITY_CACHEDIR" ]; then
Expand Down Expand Up @@ -67,7 +71,11 @@ backend {
&& mv $IMAGE.tmp $IMAGE \
&& echo "successfully pulled ${docker}!"
fi
) 9>$LOCK_FILE || { echo "Failed to pull ${docker}" >&2; exit 1; }
) 9>$LOCK_FILE
if [ $? -ne 0 ]; then
echo "Failed to pull ${docker}" >&2
exit 1
fi

# Submit the script to SLURM. `singularity` here and above comes from the
# unversioned `singularity` module that cromwell.lua loads; sbatch exports
Expand Down
Loading