Skip to content

Commit

Permalink
[ci skip] Autodoc commit for 1f067ab.
Browse files Browse the repository at this point in the history
  • Loading branch information
oscwiag committed Dec 1, 2023
1 parent 4b2b233 commit 013d3fa
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 40 deletions.
48 changes: 33 additions & 15 deletions latest/_sources/installation/resource-manager/slurm.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,38 @@ Slurm
A YAML cluster configuration file for a Slurm resource manager on an HPC
cluster looks like:

.. warning::
Open OnDemand's Slurm support defaults to issuing CLI commands with
the ``--export`` flag set to ``NONE``, when Slurms default is ``ALL``.
This can cause issues with jobs that require ``srun``.

Work arounds are currently to ``export SLURM_EXPORT_ENV=ALL``
in a :ref:`script_wrapper <script_wrapper>` before any job scripts run.

Alternatively, you can use ``copy_enviornment`` below with the caveat
that the PUNs environment is very different from regular shell sessions.

.. code-block:: yaml
:emphasize-lines: 8-
# /etc/ood/config/clusters.d/my_cluster.yml
---
v2:
metadata:
title: "My Cluster"
login:
host: "my_cluster.my_center.edu"
job:
adapter: "slurm"
cluster: "my_cluster"
bin: "/path/to/slurm/bin"
conf: "/path/to/slurm.conf"
# bin_overrides:
# sbatch: "/usr/local/bin/sbatch"
# squeue: ""
# scontrol: ""
# scancel: ""
metadata:
title: "My Cluster"
login:
host: "my_cluster.my_center.edu"
job:
adapter: "slurm"
cluster: "my_cluster"
bin: "/path/to/slurm/bin"
conf: "/path/to/slurm.conf"
# bin_overrides:
# sbatch: "/usr/local/bin/sbatch"
# squeue: ""
# scontrol: ""
# scancel: ""
copy_enviornment: false
with the following configuration options:

Expand All @@ -36,7 +48,7 @@ cluster

.. warning::
Using the ``cluster`` option is discouraged. This is because maintenance
outages on the Slurm DB will propogate to Open OnDemand. Instead sites
outages on the Slurm database will propogate to Open OnDemand. Instead sites
should use different ``conf`` files for each cluster to limit maintenance outages.
bin
The path to the Slurm client installation binaries.
Expand All @@ -54,6 +66,12 @@ bin_overrides
- `scontrol`
- `scancel`

copy_enviornment
Copies the enviornment of the PUN when issuing CLI commands. Default behaviour
for Open OnDemand is to use ``--export=NONE`` flag. Setting this to true will
cause Open OnDemand to issue CLI commands with ``--export=ALL``. Though this may
cause issues as the PUN's environment is very different than a regular shell session.

.. note::

If you do not have a multi-cluster Slurm setup you can remove the ``cluster:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,22 @@ Basic Batch Connect Options
header: 'echo "all done at $(date)"'
.. _script_wrapper:

.. describe:: script_wrapper (String, "%s")

wrap the script ('%s' being the script content) with commands before
and after
Wrap the script (``%s`` being the script content) with commands before
and after.

Default
the script has no wrapper
The script has no wrapper.

.. code-block:: yaml
script_wrapper: "%s"
Example
load a module before the script and echo a statement after it
Load a module before the script and echo a statement after it.

.. code-block:: yaml
Expand Down
46 changes: 31 additions & 15 deletions latest/installation/resource-manager/slurm.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,23 +215,34 @@
<span id="resource-manager-slurm"></span><h1>Slurm<a class="headerlink" href="#slurm" title="Permalink to this headline"></a></h1>
<p>A YAML cluster configuration file for a Slurm resource manager on an HPC
cluster looks like:</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Open OnDemand’s Slurm support defaults to issuing CLI commands with
the <code class="docutils literal notranslate"><span class="pre">--export</span></code> flag set to <code class="docutils literal notranslate"><span class="pre">NONE</span></code>, when Slurms default is <code class="docutils literal notranslate"><span class="pre">ALL</span></code>.
This can cause issues with jobs that require <code class="docutils literal notranslate"><span class="pre">srun</span></code>.</p>
<p>Work arounds are currently to <code class="docutils literal notranslate"><span class="pre">export</span> <span class="pre">SLURM_EXPORT_ENV=ALL</span></code>
in a <a class="reference internal" href="../../reference/files/submit-yml/basic-bc-options.html#script-wrapper"><span class="std std-ref">script_wrapper</span></a> before any job scripts run.</p>
<p>Alternatively, you can use <code class="docutils literal notranslate"><span class="pre">copy_enviornment</span></code> below with the caveat
that the PUNs environment is very different from regular shell sessions.</p>
</div>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># /etc/ood/config/clusters.d/my_cluster.yml</span><span class="w"></span>
<span class="nn">---</span><span class="w"></span>
<span class="nt">v2</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="nt">metadata</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="nt">title</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;My</span><span class="nv"> </span><span class="s">Cluster&quot;</span><span class="w"></span>
<span class="w"> </span><span class="nt">login</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;my_cluster.my_center.edu&quot;</span><span class="w"></span>
<span class="hll"><span class="w"> </span><span class="nt">job</span><span class="p">:</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="nt">adapter</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;slurm&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="nt">cluster</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;my_cluster&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="nt">bin</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;/path/to/slurm/bin&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="nt">conf</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;/path/to/slurm.conf&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># bin_overrides:</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># sbatch: &quot;/usr/local/bin/sbatch&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># squeue: &quot;&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># scontrol: &quot;&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># scancel: &quot;&quot;</span><span class="w"></span>
<span class="w"> </span><span class="nt">metadata</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="nt">title</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;My</span><span class="nv"> </span><span class="s">Cluster&quot;</span><span class="w"></span>
<span class="w"> </span><span class="nt">login</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;my_cluster.my_center.edu&quot;</span><span class="w"></span>
<span class="hll"><span class="w"> </span><span class="nt">job</span><span class="p">:</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="nt">adapter</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;slurm&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="nt">cluster</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;my_cluster&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="nt">bin</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;/path/to/slurm/bin&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="nt">conf</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;/path/to/slurm.conf&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># bin_overrides:</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># sbatch: &quot;/usr/local/bin/sbatch&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># squeue: &quot;&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># scontrol: &quot;&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="c1"># scancel: &quot;&quot;</span><span class="w"></span>
</span><span class="hll"><span class="w"> </span><span class="nt">copy_enviornment</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span><span class="w"></span>
</span></pre></div>
</div>
<p>with the following configuration options:</p>
Expand All @@ -242,7 +253,7 @@
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Using the <code class="docutils literal notranslate"><span class="pre">cluster</span></code> option is discouraged. This is because maintenance
outages on the Slurm DB will propogate to Open OnDemand. Instead sites
outages on the Slurm database will propogate to Open OnDemand. Instead sites
should use different <code class="docutils literal notranslate"><span class="pre">conf</span></code> files for each cluster to limit maintenance outages.</p>
</div>
</dd>
Expand All @@ -261,6 +272,11 @@
<li><p><cite>scancel</cite></p></li>
</ul>
</dd>
<dt>copy_enviornment</dt><dd><p>Copies the enviornment of the PUN when issuing CLI commands. Default behaviour
for Open OnDemand is to use <code class="docutils literal notranslate"><span class="pre">--export=NONE</span></code> flag. Setting this to true will
cause Open OnDemand to issue CLI commands with <code class="docutils literal notranslate"><span class="pre">--export=ALL</span></code>. Though this may
cause issues as the PUN’s environment is very different than a regular shell session.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
Expand Down
Binary file modified latest/objects.inv
Binary file not shown.
10 changes: 5 additions & 5 deletions latest/reference/files/submit-yml/basic-bc-options.html
Original file line number Diff line number Diff line change
Expand Up @@ -334,18 +334,18 @@
</dl>
</dd></dl>

<dl class="describe">
<span class="target" id="script-wrapper"></span><dl class="describe">
<dt>
<code class="sig-name descname">script_wrapper (String, &quot;%s&quot;)</code></dt>
<dd><p>wrap the script (‘%s’ being the script content) with commands before
and after</p>
<dd><p>Wrap the script (<code class="docutils literal notranslate"><span class="pre">%s</span></code> being the script content) with commands before
and after.</p>
<dl>
<dt>Default</dt><dd><p>the script has no wrapper</p>
<dt>Default</dt><dd><p>The script has no wrapper.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">script_wrapper</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;%s&quot;</span><span class="w"></span>
</pre></div>
</div>
</dd>
<dt>Example</dt><dd><p>load a module before the script and echo a statement after it</p>
<dt>Example</dt><dd><p>Load a module before the script and echo a statement after it.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">script_wrapper</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">|</span><span class="w"></span>
<span class="w"> </span><span class="no">module load vnc</span><span class="w"></span>
<span class="w"> </span><span class="no">%s</span><span class="w"></span>
Expand Down
2 changes: 1 addition & 1 deletion latest/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 013d3fa

Please sign in to comment.