Skip to content

Commit b15369d

Browse files
committed
formatting
1 parent b31ae3e commit b15369d

File tree

1 file changed

+32
-33
lines changed

1 file changed

+32
-33
lines changed

docs/user_guide.rst

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,28 @@ associated with your simulation--for instance, your test suite.
3535
Terminology
3636
-----------
3737

38-
What is a `Job`?
39-
^^^^^^^^^^^^^^^^
38+
What is a Job?
39+
^^^^^^^^^^^^^^
4040

4141
In PSI/J’s terminology, a :class:`Job <psij.job.Job>` represents an underlying
4242
resource manager job. One :class:`Job <psij.job.Job>` instance might represent
4343
a Slurm job running on a LLNL cluster, another a Cobalt job running on ALCF's
4444
Theta, another a Flux job in the cloud, and so on.
4545

46-
A `Job` is described by an executable plus job attributes which specify how
46+
A ``Job`` is described by an executable plus job attributes which specify how
4747
exactly the job is executed. Static job attributes such es resource requiremens
4848
are defined by the :class:`JobSpec <psij.job_spec.JobSpec>` at creation, dynamic
4949
job attributes such as the :class:`JobState <psij.job_state.JobState>` are
5050
updated by PSI/J at runtime.
5151

5252

53-
What is a `JobExecutor`?
54-
^^^^^^^^^^^^^^^^^^^^^^^^
53+
What is a JobExecutor?
54+
^^^^^^^^^^^^^^^^^^^^^^
5555

5656
A :class:`JobExecutor <psij.job_executor.JobExecutor>` represents a specific RM,
57-
e.g. Slurm, on which the `Job` is being executed. Generally, when jobs are
57+
e.g. Slurm, on which the job is being executed. Generally, when jobs are
5858
submitted, they will be queued for a variable period of time, depending on how
59-
busy the target machine is. Once the `Job` is started, its executable is
59+
busy the target machine is. Once the job is started, its executable is
6060
launched and runs to completion, and the job will be marked as completed.
6161

6262
In PSI/J, a job is submitted by passing a :class:`Job <psij.job.Job>` instance
@@ -82,15 +82,15 @@ reference the `developers documentation
8282
<development/tutorial_add_executor.html>`_ for details.
8383

8484

85-
Submit a `Job`
86-
--------------
85+
Submit a Job
86+
------------
8787

8888
The most basic way to use PSI/J looks something like the following:
8989

90-
1. Create a `JobExecutor` instance.
91-
2. Create a `JobSpec` object and populate it with information about your job.
92-
3. Create a `Job` with that `JobSpec`.
93-
4. Submit the `Job` instance to the `JobExecutor`.
90+
1. Create a ``JobExecutor`` instance.
91+
2. Create a ``JobSpec`` object and populate it with information about your job.
92+
3. Create a ``Job`` with that ``JobSpec``.
93+
4. Submit the ``Job`` instance to the ``JobExecutor``.
9494

9595
On a Slurm cluster, this code might look like:
9696

@@ -109,7 +109,7 @@ Slurm // Local // LSF // PBS // Cobalt
109109
And by way of comparison, other backends can be selected with the tabs above.
110110
Note that the only difference is the argument to the get_instance method.
111111

112-
The `JobExecutor` implementation will translate all PSI/J API activities into the
112+
The ``JobExecutor`` implementation will translate all PSI/J API activities into the
113113
respective backend commands and run them on the backend, while at the same time
114114
monitoring the backend jobs for failure, completion or other state updates.
115115

@@ -140,8 +140,8 @@ Every :class:`JobExecutor <psij.job_executor.JobExecutor>` can handle arbitrary
140140
numbers of jobs (tested with up to 64k jobs).
141141

142142

143-
Configuring your `Job`
144-
----------------------
143+
Configuring your Job
144+
--------------------
145145

146146
In the example above, the `executable='/bin/date'` part tells PSI/J that we want
147147
the job to run the `/bin/date` command. But there are other parts to the job
@@ -153,12 +153,12 @@ which can be configured:
153153
- resource requirements for the job's execution
154154
- accounting details to be used
155155

156-
That information is encoded in the `JobSpec` which is used to create the `Job`
157-
instance.
156+
That information is encoded in the ``JobSpec`` which is used to create the
157+
``Job`` instance.
158158

159159

160-
`Job` Arguments
161-
^^^^^^^^^^^^^^^
160+
Job Arguments
161+
^^^^^^^^^^^^^
162162

163163
The executable's command line arguments to be used for a job are specified as
164164
a list of strings in the arguments attribute of the `JobSpec` class. For
@@ -188,10 +188,10 @@ Note: `JobSpec` attributes can also be added incrementally:
188188
spec.arguments = ['-u']
189189
190190
191-
`Job` Environment
192-
^^^^^^^^^^^^^^^^^
191+
Job Environment
192+
^^^^^^^^^^^^^^^
193193

194-
The `Job` environment is provided a environment variables to the executing job
194+
The job environment is provided a environment variables to the executing job
195195
- the are the equivalent of `export FOO=bar` on the shell command line. Those
196196
environment variables are specified as a dictionary of string-type key/value
197197
pairs:
@@ -209,8 +209,8 @@ initialization files (`e.g., ~/.bashrc`), including from any modules loaded in
209209
the default shell environment.
210210

211211

212-
`Job` StdIO
213-
^^^^^^^^^^^
212+
Job StdIO
213+
^^^^^^^^^
214214

215215
Standard output and standard error streams of the job can be individually
216216
redirected to files by setting the `stdout_path` and `stderr_path` attributes:
@@ -228,8 +228,8 @@ The job's standard input stream can also be redirected to read from a file, by
228228
setting the `spec.stdin_path` attribute.
229229

230230

231-
`Job` Resources
232-
^^^^^^^^^^^^^^^
231+
Job Resources
232+
^^^^^^^^^^^^^
233233

234234
A job submitted to a cluster is allocated a specific set of resources to run on.
235235
The amount and type of resources are defined by a resource specification
@@ -277,9 +277,8 @@ All processes of the job will share a single MPI communicator
277277
(`MPI_COMM_WORLD`), independent of their placement, and the term `rank` (which
278278
usually refers to an MPI rank) is thus equivalent. However, jobs started with
279279
a single process instance may, depending on the executor implementation, not get
280-
an MPI communicator.
281-
282-
TODO: reference the launcher section
280+
an MPI communicator. How Jobs are launched can be specified by the `launcher`
281+
attribute of the ``JobSpec``, as documented below.
283282

284283

285284
Launching Methods
@@ -331,7 +330,7 @@ In all the above examples, we have submitted jobs without checking on what
331330
happened to them. Once the job has finished executing (which, for `/bin/date`,
332331
should be almost as soon as the job starts) the resource manager will mark the
333332
job as complete, triggering PSI/J to do the same via the :class:`JobStatus
334-
<psij.job_status.JobStatus>` attribute of the `Job`. PSIJ `Job` state
333+
<psij.job_status.JobStatus>` attribute of the job. ``Job`` state
335334
progressions follow this state model:
336335

337336
.. image:: states.png
@@ -366,8 +365,8 @@ are cancelled, fetch the status of the job after calling
366365
print(str(job.status))
367366
368367
369-
Canceling your `Job`
370-
^^^^^^^^^^^^^^^^^^^^
368+
Canceling your Job
369+
^^^^^^^^^^^^^^^^^^
371370

372371
If supported by the underlying job scheduler, PSI/J jobs can be canceled by
373372
invoking the :meth:`cancel <psij.job.Job.cancel>` method.

0 commit comments

Comments
 (0)