Skip to content

Commit

Permalink
Skeleton of sbatch script
Browse files Browse the repository at this point in the history
Not fleshed out at all, but at least contains the main sections that
will need to be filled in. Now includes dynamic modules and $PATH
modifications that mirror the objects returned from `get_cluster_info`.
  • Loading branch information
TimothyWillard committed Nov 4, 2024
1 parent 1e89ca6 commit 412b7a0
Showing 1 changed file with 33 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,40 @@
set -x
{% endif %}

# Set script variables
FLEPI_SLOT_INDEX=${SLURM_ARRAY_TASK_ID}

# Load modules
module purge
{% if load_slurm -%}
{% if slurm_version is defined and slurm_version is not none -%}
module load slurm/{{ slurm_version }}
{%- else -%}
module load slurm
{%- endif %}
{%- endif %}
{% if load_gcc -%}
{% if gcc_version is defined and gcc_version is not none -%}
module load gcc/{{ gcc_version }}
{%- else -%}
module load gcc
{%- endif %}
{%- endif %}
{% if load_anaconda -%}
{% if anaconda_version is defined and anaconda_version is not none -%}
module load anaconda/{{ anaconda_version }}
{%- else -%}
module load anaconda
{%- endif %}
{%- endif %}
{% if load_git -%}
{% if git_version is defined and git_version is not none -%}
module load git/{{ git_version }}
{% for module in cluster.modules -%}
{% if module.version is defined and module.version is not none -%}
module load {{ module.name }}/{{ module.version }}
{%- else -%}
module load git
{%- endif %}
module load {{ module.name }}
{%- endif %}
{%- endfor %}

# Path modifications
{% for path_export in cluster.path_exports -%}
if [ -r "{{ path_export.path }}" ]; then
{% if path_export.prepend -%}
export PATH={{ path_export.path }}:$PATH
{%- else -%}
export PATH=$PATH:{{ path_export.path }}
{%- endif %}
elif [ "{{ path_export.error_if_missing }}" = "True" ]; then
echo "The path '{{ path_export.path }}' does not exist but is required."
exit 1
fi
{%- endfor %}

# Load conda env
conda activate {{ conda_env }}

# AWS setup

# Fetch/setup resume files

# Run inference

# Upload/move results

0 comments on commit 412b7a0

Please sign in to comment.