Skip to content

Commit

Permalink
Merge pull request #859 from andrewdnolan/chicoma_debug
Browse files Browse the repository at this point in the history
Chicoma debug
  • Loading branch information
xylar authored Sep 13, 2024
2 parents a7e6d98 + 5fab513 commit 869dafe
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 3 deletions.
8 changes: 7 additions & 1 deletion compass/job/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ def write_job_script(config, machine, target_cores, min_cores, work_dir,
else:
constraint = ''

if config.has_option('job', 'reservation'):
reservation = config.get('job', 'reservation')
else:
reservation = ''

job_name = config.get('job', 'job_name')
if job_name == '<<<default>>>':
if suite == '':
Expand All @@ -96,7 +101,8 @@ def write_job_script(config, machine, target_cores, min_cores, work_dir,
text = template.render(job_name=job_name, account=account,
nodes=f'{nodes}', wall_time=wall_time, qos=qos,
partition=partition, constraint=constraint,
suite=suite, pre_run_commands=pre_run_commands,
reservation=reservation, suite=suite,
pre_run_commands=pre_run_commands,
post_run_commands=post_run_commands)
text = _clean_up_whitespace(text)
if suite == '':
Expand Down
3 changes: 3 additions & 0 deletions compass/job/job_script.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
{% if qos != '' -%}
#SBATCH --qos={{ qos }}
{%- endif %}
{% if reservation != '' -%}
#SBATCH --reservation={{ reservation }}
{%- endif %}
{% if partition != '' -%}
#SBATCH --partition={{ partition }}
{%- endif %}
Expand Down
3 changes: 3 additions & 0 deletions compass/machines/chicoma-cpu.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@ threads_per_core = 1
# The job partition to use
partition = standard

# The job reservation to use (needed for debug jobs)
reservation =

# The job quality of service (QOS) to use
qos = standard
19 changes: 19 additions & 0 deletions docs/developers_guide/machines/chicoma.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,22 @@ Then, you can build the MPAS model with
.. code-block:: bash
make [DEBUG=true] gnu-cray
debug jobs
~~~~~~~~~~

In order to run jobs in the debug queue, you will need to use:

.. code-block:: cfg
# Config options related to creating a job script
[job]
# The job partition to use
partition = debug
# The job reservation to use (needed for debug jobs)
reservation = debug
# The job quality of service (QOS) to use
qos =
7 changes: 5 additions & 2 deletions docs/users_guide/machines/chicoma.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,12 @@ when setting up test cases or a test suite:
# The job partition to use
partition = standard
# The job reservation to use (needed for debug jobs)
reservation =
# The job quality of service (QOS) to use
qos = standard
Additionally, some relevant config options come from the
`mache <https://github.com/E3SM-Project/mache/>`_ package:
Expand Down Expand Up @@ -213,4 +216,4 @@ To build the MPAS model with

.. code-block:: bash
make [DEBUG=true] [OPENMP=true] [ALBANY=true] gnu-cray
make [DEBUG=true] [OPENMP=true] [ALBANY=true] gnu-cray

0 comments on commit 869dafe

Please sign in to comment.