From ec9aa36a9da4b209e80fd3f027eadb9b12871ce3 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Wed, 26 May 2010 19:40:10 +0000
Subject: [PATCH] Add gres web page

---
 doc/html/Makefile.am         |  1 +
 doc/html/Makefile.in         |  1 +
 doc/html/documentation.shtml |  3 +-
 doc/html/gres.shtml          | 73 ++++++++++++++++++++++++++++++++++++
 doc/html/review_release.html |  1 +
 5 files changed, 78 insertions(+), 1 deletion(-)
 create mode 100644 doc/html/gres.shtml

diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am
index 5206b2510f3..29424bc8842 100644
--- a/doc/html/Makefile.am
+++ b/doc/html/Makefile.am
@@ -18,6 +18,7 @@ generated_html = \
 	download.html \
 	faq.html \
 	gang_scheduling.html \
+	gres.html \
 	help.html \
 	ibm.html \
 	jobacct_gatherplugins.html \
diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in
index 052921c2e02..bf5f0f93ca8 100644
--- a/doc/html/Makefile.in
+++ b/doc/html/Makefile.in
@@ -306,6 +306,7 @@ generated_html = \
 	download.html \
 	faq.html \
 	gang_scheduling.html \
+	gres.html \
 	help.html \
 	ibm.html \
 	jobacct_gatherplugins.html \
diff --git a/doc/html/documentation.shtml b/doc/html/documentation.shtml
index 612427f4000..3ee67d04b6f 100644
--- a/doc/html/documentation.shtml
+++ b/doc/html/documentation.shtml
@@ -30,6 +30,7 @@ Also see <a href="publications.html">Publications and Presentations</a>.
 <ul>
 <li><a href="cons_res.html">Consumable Resources Guide</a></li>
 <li><a href="gang_scheduling.html">Gang Scheduling</a></li>
+<li><a href="gres.html">Generic Resource (Gres) Scheduling</a></li>
 <li><a href="priority_multifactor.html">Multifactor Job Priority</a></li>
 <li><a href="preempt.html">Preemption</a></li>
 <li><a href="qos.html">Quality of Service (QOS)</a></li>
@@ -79,6 +80,6 @@ Also see <a href="publications.html">Publications and Presentations</a>.
 </li>
 </ul>
 
-<p style="text-align:center;">Last modified 13 April 2010</p>
+<p style="text-align:center;">Last modified 25 May 2010</p>
 
 <!--#include virtual="footer.txt"-->
diff --git a/doc/html/gres.shtml b/doc/html/gres.shtml
new file mode 100644
index 00000000000..2781937635e
--- /dev/null
+++ b/doc/html/gres.shtml
@@ -0,0 +1,73 @@
+<!--#include virtual="header.txt"-->
+
+<h1>Generic Resource (Gres) Scheduling</h1>
+
+<P>Beginning in SLURM version 2.2 generic resource (Gres) scheduling is
+supported through a flexible plugin mechanism. Support is initially provided
+for Graphics Processing Units (GPUs), although support for any resources is
+possible though use of a customized plugin.</P>
+
+<!-------------------------------------------------------------------------->
+<h2>Configuration</h2>
+
+<P>SLURM supports no generic resourses in the default configuration.
+One must explicitly specify which resources are to be managed in the
+<I>slurm.conf</I> configuration file. The configuration parameters of
+interest are:</P>
+
+<UL>
+<LI><B>GresPlugins</B> a comma delimited list of generic resource plugins to be
+used (e.g. <I>GresPlugins=gpus,nic</I>).</LI>
+<LI><B>Gres</B> the specific generic resource and their count associated with
+each node (e.g. <I>NodeName=linux[0-999] Gres=gpu:8,nic:2</I>).</LI>
+</UL>
+
+<P>Note that the Gres specification for each node works in the same fashion
+as the other resources managed. Depending upon the value of the
+<I>FastSchedule</I> parameter, nodes which are found to have fewer resources
+than configured will be placed in a DOWN state.</P>
+
+<P>Note that the Gres specification is not supported on BlueGene systems.</P>
+
+<!-------------------------------------------------------------------------->
+<h2>Running Jobs</h2>
+
+<P>Jobs will not be allocated any generic resources unless specifically
+requested at job submit time using the <I>--gres</I> option supported by
+the <I>salloc</I>, <I>sbatch</I> and <I>srun</I> commands. The option
+requires an argument specifying which generic resources are required and
+how many resources. The resource specification is of the form
+<I>name[:count[</I>*cpu<I>]]</I>. The <I>name</I> is the same name as
+specified by the <I>GresPlugins</I> and <I>Gres</I> configuration parameters.
+<I>count</I> specifies how many resources are required and has a default
+value of 1. <I>*cpu</I> indicates that the resource count specified is per
+allocated CPU, otherwise the count is per allocated node. For example:
+<I>sbatch --gres=gpu:2*cpu,nic:1 ...</I>.</P>
+
+<P>Jobs will be allocated specific generic resources as needed to satisfy
+the request. If the job is suspended, those resources typically become available
+for use by other jobs (plugin dependent).</P>
+
+<P>Job steps can be allocated generic resources from those allocated to the
+job using the <I>--gres</I> option with the <I>srun</I> command as described
+above. By default a job step will have access to all generic resources
+allocated to the job, but lower values may be specified if running more than
+one job step concurrently. The job step will be allocated specific generic
+resources and those resources will not be available to other job steps. A
+simple example is shown below.</P>
+
+<PRE>
+#!/bin/bash
+#
+# gres_test.bash
+# Submit as follows: sbatch --gres=gpu:2 -n4 -N1-1 gres_test.bash
+#
+srun --gres=gpu:1 -n2 --exclusive job_1 &
+srun --gres=gpu:1 -n2 --exclusive job_2 &
+wait
+</PRE>
+<!-------------------------------------------------------------------------->
+
+<p style="text-align: center;">Last modified 26 May 2010</p>
+
+</ul></body></html>
diff --git a/doc/html/review_release.html b/doc/html/review_release.html
index fa145da8889..063870585a7 100644
--- a/doc/html/review_release.html
+++ b/doc/html/review_release.html
@@ -27,6 +27,7 @@
 <li><a href="https://computing-pre.llnl.gov/linux/slurm/download.html">download.html</a></li>
 <li><a href="https://computing-pre.llnl.gov/linux/slurm/faq.html">faq.html</a></li>
 <li><a href="https://computing-pre.llnl.gov/linux/slurm/gang_scheduling.html">gang_scheduling.html</a></li>
+<li><a href="https://computing-pre.llnl.gov/linux/slurm/gres.html">gres.html</a></li>
 <li><a href="https://computing-pre.llnl.gov/linux/slurm/help.html">help.html</a></li>
 <li><a href="https://computing-pre.llnl.gov/linux/slurm/ibm.html">ibm.html</a></li>
 <li><a href="https://computing-pre.llnl.gov/linux/slurm/jobacct_gatherplugins.html">jobacct_gatherplugins.html</a></li>
-- 
GitLab