Skip to content

Commit 525ec4c

Browse files
authored
Add jinja2 block around memory options (#831)
* Add jinja2 block around memory options This is to enable overriding --mem with --mem-per-gpu or other cluster-specific options. * Add the scoped option See https://jinja.palletsprojects.com/en/3.0.x/templates/#block-nesting-and-scope
1 parent f0837ea commit 525ec4c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flow/templates/slurm.sh

+2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
#!/bin/bash
55
#SBATCH --job-name="{{ id }}"
66
{% set memory_requested = operations | calc_memory(parallel) %}
7+
{% block memory scoped %}
78
{% if memory_requested %}
89
#SBATCH --mem={{ memory_requested|format_memory }}
910
{% endif %}
11+
{% endblock memory %}
1012
{% if partition %}
1113
#SBATCH --partition={{ partition }}
1214
{% endif %}

0 commit comments

Comments
 (0)