Skip to content

Commit

Permalink
New lines in emcee_inference template
Browse files Browse the repository at this point in the history
Ensuring the template renders correctly by adding appropriate new lines.
  • Loading branch information
TimothyWillard committed Nov 7, 2024
1 parent 3d3f2cc commit aabc6e4
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env {{ interpreter }}
{% for opt in options -%}
{%- for opt in options %}
#SBATCH {{ opt }}
{%- endfor %}

{% if debug %}
{% if debug -%}
# Debugging
set -x
{% endif %}
{%- endif %}

# Set script variables
if [ -z "$SLURM_ARRAY_TASK_ID" ]; then
Expand All @@ -18,18 +18,19 @@ export FLEPI_PATH={{ flepi_path }}
export PROJECT_PATH={{ project_path }}
export CONFIG_PATH={{ config_out }}

# Load modules
# Purge/load modules
module purge
{% for module in cluster.modules -%}
{% if module.version is defined and module.version is not none -%}
{%- for module in cluster.modules %}
{%- if module.version is defined and module.version is not none %}
module load {{ module.name }}/{{ module.version }}
{%- else -%}
{%- else %}
module load {{ module.name }}
{%- endif %}
{%- endfor %}

{% if cluster.path_exports|length -%}
# Path modifications
{% for path_export in cluster.path_exports -%}
{%- for path_export in cluster.path_exports %}
if [ -r "{{ path_export.path }}" ]; then
{% if path_export.prepend -%}
export PATH={{ path_export.path }}:$PATH
Expand All @@ -41,6 +42,7 @@ elif [ "{{ path_export.error_if_missing }}" = "True" ]; then
exit 1
fi
{%- endfor %}
{%- endif %}

# Load conda env
conda activate {{ conda_env }}
Expand All @@ -57,7 +59,7 @@ flepimop-calibrate --config $CONFIG_PATH \
--nthin {{ nthin }} \
--jobs {{ jobs }} \
--id {{ run_id }} \
{% if prefix is defined and prefix is not none -%}
{%- if prefix is defined and prefix is not none %}
--prefix {{ prefix}} \
{%- endif %}
> out_{{ job_name }}_$FLEPI_SLOT_INDEX.out 2>&1
Expand Down

0 comments on commit aabc6e4

Please sign in to comment.