Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
e2bb29e2
Commit
e2bb29e2
authored
18 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Complete task plugin programmer guide.
parent
5d299960
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/html/documentation.shtml
+2
-1
2 additions, 1 deletion
doc/html/documentation.shtml
doc/html/taskplugins.shtml
+47
-44
47 additions, 44 deletions
doc/html/taskplugins.shtml
with
49 additions
and
45 deletions
doc/html/documentation.shtml
+
2
−
1
View file @
e2bb29e2
...
@@ -43,9 +43,10 @@ Jobs throuh LSF</a></li>
...
@@ -43,9 +43,10 @@ Jobs throuh LSF</a></li>
<li><a href="selectplugins.shtml">Node Selection Plugin Programmer Guide</a></li>
<li><a href="selectplugins.shtml">Node Selection Plugin Programmer Guide</a></li>
<li><a href="schedplugins.shtml">Scheduler Plugin Programmer Guide</a></li>
<li><a href="schedplugins.shtml">Scheduler Plugin Programmer Guide</a></li>
<li><a href="switchplugins.shtml">Switch (Interconnect) Plugin Programmer Guide</a></li>
<li><a href="switchplugins.shtml">Switch (Interconnect) Plugin Programmer Guide</a></li>
<li><a href="taskplugins.shtml">Task Plugin Programmer Guide</a></li>
<li><a href="mpiplugins.shtml">MPI Plugin Programmer Guide</a></li>
<li><a href="mpiplugins.shtml">MPI Plugin Programmer Guide</a></li>
</ul>
</ul>
<p style="text-align:center;">Last modified
31 January
2007</p>
<p style="text-align:center;">Last modified
27 March
2007</p>
<!--#include virtual="footer.txt"-->
<!--#include virtual="footer.txt"-->
This diff is collapsed.
Click to expand it.
doc/html/taskplugins.shtml
+
47
−
44
View file @
e2bb29e2
<!--#include virtual="header.txt"-->
<!--#include virtual="header.txt"-->
<h1><a name="top">SLURM Task Plugin
API
</a></h1>
<h1><a name="top">SLURM Task Plugin
Programmer Guide
</a></h1>
<h2> Overview</h2>
<h2> Overview</h2>
<p> This document describes SLURM task management plugins and the API
<p> This document describes SLURM task management plugins and the API
...
@@ -36,25 +36,10 @@ Note carefully, however, the versioning discussion below.</p>
...
@@ -36,25 +36,10 @@ Note carefully, however, the versioning discussion below.</p>
<h2>Data Objects</h2>
<h2>Data Objects</h2>
<p>The implementation must maintain (though not necessarily directly export) an
<p>The implementation must maintain (though not necessarily directly export) an
enumerated <span class="commandline">errno</span> to allow SLURM to discover
enumerated <span class="commandline">errno</span> to allow SLURM to discover
as practically as possible the reason for any failed API call. Plugin-specific enumerated
as practically as possible the reason for any failed API call.
integer values should be used when appropriate. It is desirable that these values
These values must not be used as return values in integer-valued functions
be mapped into the range ESLURM_SCHED_MIN and ESLURM_SCHED_MAX
in the API. The proper error return value from integer-valued functions is
as defined in <span class="commandline">slurm/slurm_errno.h</span>.
SLURM_ERROR.</p>
The error number should be returned by the function
<a href="#get_errno"><span class="commandline">slurm_sched_get_errno()</span></a>
and string describing the error's meaning should be returned by the function
<a href="#strerror"><span class="commandline">slurm_sched_strerror()</span></a>
described below.</p>
<p>These values must not be used as return values in integer-valued functions
in the API. The proper error return value from integer-valued functions is SLURM_ERROR.
The implementation should endeavor to provide useful and pertinent information by
whatever means is practical. In some cases this means an errno for each credential,
since plugins must be re-entrant. If a plugin maintains a global errno in place of or in
addition to a per-credential errno, it is not required to enforce mutual exclusion on it.
Successful API calls are not required to reset any errno to a known value. However,
the initial value of any errno, prior to any error condition arising, should be
SLURM_SUCCESS. </p>
<p class="footer"><a href="#top">top</a></p>
<p class="footer"><a href="#top">top</a></p>
<h2>API Functions</h2>
<h2>API Functions</h2>
...
@@ -63,73 +48,91 @@ be stubbed.</p>
...
@@ -63,73 +48,91 @@ be stubbed.</p>
<p class="commandline">int task_slurmd_launch_request (uint32_t job_id,
<p class="commandline">int task_slurmd_launch_request (uint32_t job_id,
launch_tasks_request_msg_t *req, uint32_t node_id);</p>
launch_tasks_request_msg_t *req, uint32_t node_id);</p>
<p style="margin-left:.2in"><b>Description</b>: TBD.</p>
<p style="margin-left:.2in"><b>Description</b>: Prepare to launch a job.
Establish node, socket, and core resource availability for it.
Executed by the <b>slurmd</b> daemon as user root.</p>
<p style="margin-left:.2in"><b>Arguments</b>:<br>
<p style="margin-left:.2in"><b>Arguments</b>:<br>
<span class="commandline">job_id</span> (input)
<span class="commandline">job_id</span> (input)
ID of the<br>
ID of the job to be started.<br>
<span class="commandline">req</span> (input)
<span class="commandline">req</span> (input/output)
ID of the<br>
Task launch request specification including node, socket, and
core specifications.
See <b>src/common/slurm_protocol_defs.h</b> for the
data structure definition.<br>
<span class="commandline">node_id</span> (input)
<span class="commandline">node_id</span> (input)
ID of the</p>
ID of the
node on which resources are being acquired (zero origin).
</p>
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
On fail
ure, the plugin should return SLURM_ERROR and set the errno to an
On failure, the plugin should return SLURM_ERROR and set the errno to an
appropriate value to indicate the reason for failure.</p>
appropriate value to indicate the reason for failure.</p>
<p class="commandline">int task_slurmd_reserve_resources (uint32_t job_id,
<p class="commandline">int task_slurmd_reserve_resources (uint32_t job_id,
aunch_tasks_request_msg_t *req, uint32_t node_id);</p>
launch_tasks_request_msg_t *req, uint32_t node_id);</p>
<p style="margin-left:.2in"><b>Description</b>: TBD.</p>
<p style="margin-left:.2in"><b>Description</b>: Reserve resources for
the initiation of a job. Executed by the <b>slurmd</b> daemon as user root.</p>
<p style="margin-left:.2in"><b>Arguments</b>:<br>
<p style="margin-left:.2in"><b>Arguments</b>:<br>
<span class="commandline">job_id</span> (input)
<span class="commandline">job_id</span> (input)
ID of the<br>
ID of the
job being started.
<br>
<span class="commandline">req</span> (input)
<span class="commandline">req</span> (input)
ID of the<br>
Task launch request specification including node, socket, and
core specifications.
See <b>src/common/slurm_protocol_defs.h</b> for the
data structure definition.<br>
<span class="commandline">node_id</span> (input)
<span class="commandline">node_id</span> (input)
ID of the
</p>
ID of the
node on which the resources are being acquired
<p style="margin-left:.2in"><b>Arguments</b>: None
</p>
(zero origin).
</p>
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
On fail
ure, the plugin should return SLURM_ERROR and set the errno to an
On failure, the plugin should return SLURM_ERROR and set the errno to an
appropriate value to indicate the reason for failure.</p>
appropriate value to indicate the reason for failure.</p>
<p class="commandline">int task_slurmd_release_resources (uint32_t job_id);</p>
<p class="commandline">int task_slurmd_release_resources (uint32_t job_id);</p>
<p style="margin-left:.2in"><b>Description</b>: Establish the initial priority of a new job.</p>
<p style="margin-left:.2in"><b>Description</b>: Release resources previously
reserved for a job. Executed by the <b>slurmd</b> daemon as user root.</p>
<p style="margin-left:.2in"><b>Arguments</b>:
<p style="margin-left:.2in"><b>Arguments</b>:
<span class="commandline">job_id</span> (input)
<span class="commandline">job_id</span> (input)
ID of the</p>
ID of the
job which has completed.
</p>
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
On fail
ure, the plugin should return SLURM_ERROR and set the errno to an
On failure, the plugin should return SLURM_ERROR and set the errno to an
appropriate value to indicate the reason for failure.</p>
appropriate value to indicate the reason for failure.</p>
<p class="commandline">int task_pre_setuid (slurmd_job_t *job);</p>
<p class="commandline">int task_pre_setuid (slurmd_job_t *job);</p>
<p style="margin-left:.2in"><b>Description</b>: task_pre_setuid() is called
<p style="margin-left:.2in"><b>Description</b>: task_pre_setuid() is called
before setting the UID for the user to launch his jobs.
before setting the UID for the user to launch his jobs.
Use this to perform any needed work
as user root.</p>
Executed by the <b>slurmstepd</b> program
as user root.</p>
<p style="margin-left:.2in"><b>Arguments</b>:
<p style="margin-left:.2in"><b>Arguments</b>:
<span class="commandline">job</span> (input)
<span class="commandline">job</span> (input)
pointer to the job to be initiated.</p>
pointer to the job to be initiated.
See <b>src/slurmd/slurmstepd/slurmstepd_job.h</b> for the
data structure definition.</p>
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
On failure, the plugin should return SLURM_ERROR and set the errno to an
On failure, the plugin should return SLURM_ERROR and set the errno to an
appropriate value to indicate the reason for failure.</p>
appropriate value to indicate the reason for failure.</p>
<p class="commandline">int task_pre_launch (slurmd_job_t *job);</p>
<p class="commandline">int task_pre_launch (slurmd_job_t *job);</p>
<p style="margin-left:.2in"><b>Description</b>: task_pre_launch() is called
<p style="margin-left:.2in"><b>Description</b>: task_pre_launch() is called
prior to exec of application task.
prior to exec of application task.
Executed by the <b>slurmstepd</b> program as the job's owner.
It is followed by <b>TaskProlog</b> program (as configured in <b>slurm.conf</b>)
It is followed by <b>TaskProlog</b> program (as configured in <b>slurm.conf</b>)
and <b>--task-prolog</b> (from srun command line).</p>
and <b>--task-prolog</b> (from
<b>
srun
</b>
command line).</p>
<p style="margin-left:.2in"><b>Arguments</b>:
<p style="margin-left:.2in"><b>Arguments</b>:
<span class="commandline">job</span> (input)
<span class="commandline">job</span> (input)
pointer to the job to be initiated.</p>
pointer to the job to be initiated.
See <b>src/slurmd/slurmstepd/slurmstepd_job.h</b> for the
data structure definition.</p>
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
On failure, the plugin should return SLURM_ERROR and set the errno to an
On failure, the plugin should return SLURM_ERROR and set the errno to an
appropriate value to indicate the reason for failure.</p>
appropriate value to indicate the reason for failure.</p>
<a name="get_errno"><p class="commandline">int task_post_term (slurmd_job_t *job);</p></a>
<a name="get_errno"><p class="commandline">int task_post_term (slurmd_job_t *job);</p></a>
<p style="margin-left:.2in"><b>Description</b>: task_term() is called
<p style="margin-left:.2in"><b>Description</b>: task_term() is called
after termination of application task.
after termination of job step.
Executed by the <b>slurmstepd</b> program as the job's owner.
It is preceeded by <b>--task-epilog</b> (from <b>srun</b> command line)
It is preceeded by <b>--task-epilog</b> (from <b>srun</b> command line)
followed by <b>TaskEpilog</b> program
(
(as configured in <b>slurm.conf</b>).</p>
followed by <b>TaskEpilog</b> program (as configured in <b>slurm.conf</b>).</p>
<p style="margin-left:.2in"><b>Arguments</b>:
<p style="margin-left:.2in"><b>Arguments</b>:
<span class="commandline">job</span> (input)
<span class="commandline">job</span> (input)
pointer to the job to be initiated.</p>
pointer to the job which has terminated.
See <b>src/slurmd/slurmstepd/slurmstepd_job.h</b> for the
data structure definition.</p>
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
<p style="margin-left:.2in"><b>Returns</b>: SLURM_SUCCESS if successful.
On failure, the plugin should return SLURM_ERROR and set the errno to an
On failure, the plugin should return SLURM_ERROR and set the errno to an
appropriate value to indicate the reason for failure.</p>
appropriate value to indicate the reason for failure.</p>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment