#!/bin/bash
#PBS -S /bin/bash
#PBS -d {{ pwd }}
{%- if not job_name is defined -%}
    {% set job_name=basename %}
{%- endif -%}
{%- if pbs_jobname  %}{{ "\n" }}#PBS -N '{{ job_name }}' {% endif %}
{%- if pbs_group    %}{{ "\n" }}#PBS -A {{ pbs_group }} {% endif %}
{%- if pbs_mem      %}{{ "\n" }}#PBS -l mem={{ pbs_mem }} {% endif %}
{%- if pbs_queue    %}{{ "\n" }}#PBS -q {{ pbs_queue }} {% endif %}
{%- if pbs_walltime %}{{ "\n" }}#PBS -l walltime={{ pbs_walltime }}{% endif %}
{%- if pbs_cpu      %}{{ "\n" }}#PBS -l {{ pbs_cpu }}{% endif %}

cd $PBS_O_WORKDIR

{{ script_header }}

#here comes the real script
{{cl}}

{{ script_annotate }}

{{ script_footer }}
