Skip to content

Commit a0d6a89

Browse files
Refactor: Make tutorial language consistent
Replaced instances of "let's do ...", "we will ...", and "the packager can ..." with "you will ..." or passive voice equivalents across the following tutorial files: - tutorial_advanced_packaging.rst - tutorial_basics.rst - tutorial_binary_cache.rst - tutorial_buildsystems.rst This change improves the consistency and clarity of the tutorial documentation.
1 parent 187a295 commit a0d6a89

4 files changed

Lines changed: 133 additions & 133 deletions

File tree

tutorial_advanced_packaging.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ This section is focused on modifying the build-time environment represented by `
9191
:py:func:`setup_dependent_run_environment
9292
<spack.package.PackageBase.setup_dependent_run_environment>` function's ``env`` parameter, are included in Spack's automatically-generated module files.
9393

94-
We can practice by editing the ``mpich`` package to set the ``MPICC`` environment variable in the build-time environment of dependent packages.
94+
You can practice by editing the ``mpich`` package to set the ``MPICC`` environment variable in the build-time environment of dependent packages.
9595

9696
.. code-block:: console
9797
@@ -113,7 +113,7 @@ Once you're finished, the method should look like this:
113113
spack_env.set('MPICH_F90', spack_fc)
114114
spack_env.set('MPICH_FC', spack_fc)
115115
116-
At this point we can, for instance, install ``netlib-scalapack`` with ``mpich``:
116+
At this point you can, for instance, install ``netlib-scalapack`` with ``mpich``:
117117

118118
.. code-block:: console
119119
@@ -177,7 +177,7 @@ To contrast with ``qt``'s :py:func:`setup_dependent_build_environment <spack.pac
177177
178178
It is not necessary to implement a ``setup_dependent_run_environment`` method for ``qt`` so one is not provided.
179179

180-
Let's see how it works by completing the ``elpa`` package:
180+
You can see how it works by completing the ``elpa`` package:
181181

182182
.. code-block:: console
183183
@@ -301,7 +301,7 @@ Packages which don't follow this naming scheme must implement this function them
301301
)
302302
303303
This issue is common for packages which implement an interface (i.e. virtual package providers in Spack).
304-
If we try to build another version of ``armadillo`` tied to ``netlib-lapack`` (``armadillo ^netlib-lapack ^mpich``) we'll notice that this time the installation won't complete:
304+
If you try to build another version of ``armadillo`` tied to ``netlib-lapack`` (``armadillo ^netlib-lapack ^mpich``) you'll notice that this time the installation won't complete:
305305

306306
.. code-block:: console
307307
@@ -331,14 +331,14 @@ If we try to build another version of ``armadillo`` tied to ``netlib-lapack`` (`
331331
/usr/local/var/spack/stage/arpack-ng-3.5.0-bloz7cqirpdxj33pg7uj32zs5likz2un/arpack-ng-3.5.0/spack-build-out.txt
332332
333333
Unlike ``openblas`` which provides a library named ``libopenblas.so``, ``netlib-lapack`` provides ``liblapack.so``, so it needs to implement customized library search logic.
334-
Let's edit it:
334+
You can edit it:
335335

336336
.. code-block:: console
337337
338338
root@advanced-packaging-tutorial:/# spack edit netlib-lapack
339339
340340
and follow the instructions in the ``# TUTORIAL:`` comment as before.
341-
What we need to implement is:
341+
What you need to implement is:
342342

343343
.. code-block:: python
344344
@@ -353,7 +353,7 @@ i.e., a property that returns the correct list of libraries for the LAPACK inter
353353

354354
We use the name ``lapack_libs`` rather than ``libs`` because ``netlib-lapack`` can also provide ``blas``, and when it does it is provided as a separate library file.
355355
Using this name ensures that when dependents ask for ``lapack`` libraries, ``netlib-lapack`` will retrieve only the libraries associated with the ``lapack`` interface.
356-
Now we can finally install ``armadillo ^netlib-lapack ^mpich``:
356+
Now you can finally install ``armadillo ^netlib-lapack ^mpich``:
357357

358358
.. code-block:: console
359359
@@ -407,7 +407,7 @@ Extra query parameters
407407
An advanced feature of the Spec's build-interface protocol is the support for extra parameters after the subscript key.
408408
In fact, any of the keys used in the query can be followed by a comma-separated list of extra parameters which can be inspected by the package receiving the request to fine-tune a response.
409409

410-
Let's look at an example and try to install ``netcdf ^mpich``:
410+
You can look at an example and try to install ``netcdf ^mpich``:
411411

412412
.. code-block:: console
413413
@@ -431,7 +431,7 @@ Let's look at an example and try to install ``netcdf ^mpich``:
431431
/usr/local/var/spack/stage/netcdf-4.4.1.1-gk2xxhbqijnrdwicawawcll4t3c7dvoj/netcdf-4.4.1.1/spack-build-out.txt
432432
433433
We can see from the error that ``netcdf`` needs to know how to link the *high-level interface* of ``hdf5``, and thus passes the extra parameter ``hl`` after the request to retrieve it.
434-
Clearly the implementation in the ``hdf5`` package is not complete, and we need to fix it:
434+
Clearly the implementation in the ``hdf5`` package is not complete, and you need to fix it:
435435

436436
.. code-block:: console
437437
@@ -450,8 +450,8 @@ If you followed the instructions correctly, the code added to the ``lib`` proper
450450
libraries, root=self.prefix, shared=shared, recurse=True
451451
)
452452
453-
where we highlighted the line retrieving the extra parameters.
454-
Now we can successfully complete the installation of ``netcdf ^mpich``:
453+
where the line retrieving the extra parameters is highlighted.
454+
Now you can successfully complete the installation of ``netcdf ^mpich``:
455455

456456
.. code-block:: console
457457

tutorial_basics.rst

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Basic Installation Tutorial
99
=========================================
1010

1111
This tutorial will guide you through the process of installing software using Spack.
12-
We will first cover the ``spack install`` command, focusing on the power of the spec syntax and the flexibility it gives to users.
13-
We will also cover the ``spack find`` command for viewing installed packages and the ``spack uninstall`` command for uninstalling them.
14-
Finally, we will touch on how Spack manages compilers, especially as it relates to using Spack-built compilers within Spack.
15-
We will include full output from all of the commands demonstrated, although we will frequently call attention to only small portions of that output (or merely to the fact that it succeeded).
12+
You will first cover the ``spack install`` command, focusing on the power of the spec syntax and the flexibility it gives to users.
13+
You will also cover the ``spack find`` command for viewing installed packages and the ``spack uninstall`` command for uninstalling them.
14+
Finally, you will touch on how Spack manages compilers, especially as it relates to using Spack-built compilers within Spack.
15+
Full output from all of the commands demonstrated will be included, although attention will frequently be called to only small portions of that output (or merely to the fact that it succeeded).
1616
The provided output is all from an Ubuntu 22.04 Docker image.
1717

1818
.. _basics-tutorial-install:
@@ -23,7 +23,7 @@ Installing Spack
2323

2424
Spack works out of the box.
2525
Simply clone Spack to get going.
26-
We will clone Spack and immediately check out the most recent release, v0.23.
26+
You will clone Spack and immediately check out the most recent release, v0.23.
2727

2828
.. literalinclude:: outputs/basics/clone.out
2929
:language: console
@@ -50,7 +50,7 @@ The ``spack list`` command shows available packages.
5050

5151
The ``spack list`` command can also take a query string.
5252
Spack automatically adds wildcards to both ends of the string, or you can add your own wildcards.
53-
For example, we can view all available Python packages.
53+
For example, you can view all available Python packages.
5454

5555
.. literalinclude:: outputs/basics/list-py.out
5656
:language: console
@@ -67,20 +67,20 @@ To install a piece of software simply type,
6767
6868
$ spack install <package_name>
6969
70-
Let's go ahead and install ``gmake``,
70+
You can go ahead and install ``gmake``,
7171

7272
.. literalinclude:: outputs/basics/gmake.out
7373
:language: console
7474

7575
You will see Spack installed ``gmake``, ``gcc-runtime``, and ``glibc``.
7676
The ``glibc`` and ``gcc-runtime`` packages are automatically tracked by Spack to manage consistency requirements among compiler runtimes.
7777
They do not represent separate software builds from source, but are records of the system's compiler runtime components Spack used for the install.
78-
For the rest of this section, we will ignore these components and focus on the packages explicitly installed.
78+
For the rest of this section, you will ignore these components and focus on the packages explicitly installed.
7979

8080
Spack can install software either from source or from a binary cache.
8181
Packages in the binary cache are signed with GPG for security.
8282
For the tutorial we have prepared a binary cache so you don't have to wait on slow compilation from source.
83-
To be able to install from the binary cache, we will need to configure Spack with the location of the binary cache and trust the GPG key that the binary cache was signed with.
83+
To be able to install from the binary cache, you will need to configure Spack with the location of the binary cache and trust the GPG key that the binary cache was signed with.
8484

8585
.. literalinclude:: outputs/basics/mirror.out
8686
:language: console
@@ -95,10 +95,10 @@ The ``%`` sigil is used to specify compilers.
9595
:language: console
9696

9797
Note that this installation is located separately from the previous one.
98-
We will discuss this in more detail later, but this is part of what allows Spack to support many versions of software packages.
98+
This will be discussed in more detail later, but this is part of what allows Spack to support many versions of software packages.
9999

100100
You can check for particular versions before requesting them.
101-
We will use the ``spack versions`` command to see the available versions, and then install a different version of ``zlib-ng``.
101+
You will use the ``spack versions`` command to see the available versions, and then install a different version of ``zlib-ng``.
102102

103103
.. literalinclude:: outputs/basics/versions-zlib.out
104104
:language: console
@@ -132,7 +132,7 @@ The ``-l`` flag shows the hash of each package, and the ``-f`` flag shows any no
132132
Spack generates a hash for each spec.
133133
This hash is a function of the full provenance of the package, so any change to the spec affects the hash.
134134
Spack uses this value to compare specs and to generate unique installation directories for every combinatorial version.
135-
As we move into more complicated packages with software dependencies, we can see that Spack reuses existing packages to satisfy a dependency.
135+
As you move into more complicated packages with software dependencies, you can see that Spack reuses existing packages to satisfy a dependency.
136136
By default, Spack tries hard to reuse existing installations as dependencies, either from a local store or from configured remote binary caches.
137137
This minimizes unwanted rebuilds of common dependencies, in particular if you update Spack frequently.
138138

@@ -141,14 +141,14 @@ This minimizes unwanted rebuilds of common dependencies, in particular if you up
141141

142142
Dependencies can be explicitly requested using the ``^`` sigil.
143143
Note that the spec syntax is recursive.
144-
Anything we could specify about the top-level package, we can also specify about a dependency using ``^``.
144+
Anything you could specify about the top-level package, you can also specify about a dependency using ``^``.
145145

146146
.. literalinclude:: outputs/basics/tcl-zlib-clang.out
147147
:language: console
148148

149149
Packages can also be referred to from the command line by their package hash.
150-
Using the ``spack find -lf`` command earlier we saw that the hash of our optimized installation of zlib-ng (``cflags="-O3"``) began with ``umrbkwv``.
151-
We can now explicitly build with that package without typing the entire spec, by using the ``/`` sigil to refer to it by hash.
150+
Using the ``spack find -lf`` command earlier you saw that the hash of our optimized installation of zlib-ng (``cflags="-O3"``) began with ``umrbkwv``.
151+
You can now explicitly build with that package without typing the entire spec, by using the ``/`` sigil to refer to it by hash.
152152
As with other tools like Git, you do not need to specify an *entire* hash on the command line.
153153
You can specify just enough digits to identify a hash uniquely.
154154
If a hash prefix is ambiguous (i.e., two or more installed packages share the prefix) then Spack will report an error.
@@ -162,9 +162,9 @@ Note that each package has a top-level entry, even if it also appears as a depen
162162
.. literalinclude:: outputs/basics/find-ldf.out
163163
:language: console
164164

165-
Let's move on to slightly more complicated packages.
165+
You can now move on to slightly more complicated packages.
166166
HDF5 is a good example of a more complicated package, with an MPI dependency.
167-
If we install it with default settings it will build with OpenMPI.
167+
If you install it with default settings it will build with OpenMPI.
168168

169169
.. literalinclude:: outputs/basics/hdf5.out
170170
:language: console
@@ -174,60 +174,60 @@ Boolean variants can be specified using the ``+`` (enable) and ``~`` or ``-``
174174
(disable) sigils. There are two sigils for "disable" to avoid conflicts
175175
with shell parsing in different situations.
176176
Variants (boolean or otherwise) can also be specified using the same syntax as compiler flags.
177-
Here we can install HDF5 without MPI support.
177+
Here you can install HDF5 without MPI support.
178178

179179
.. literalinclude:: outputs/basics/hdf5-no-mpi.out
180180
:language: console
181181

182-
We might also want to install HDF5 with a different MPI implementation.
182+
You might also want to install HDF5 with a different MPI implementation.
183183
While ``mpi`` itself is a virtual package representing an interface, other packages can depend on such abstract interfaces.
184184
Spack handles these through "virtual dependencies." A package, such as HDF5, can depend on the ``mpi`` virtual package (the interface).
185185
Actual MPI implementation packages (like ``openmpi``, ``mpich``, ``mvapich2``, etc.) provide the MPI interface.
186186
Any of these providers can be requested to satisfy an MPI dependency.
187-
For example, we can build HDF5 with MPI support provided by MPICH by specifying a dependency on ``mpich`` (e.g., ``hdf5 ^mpich``).
187+
For example, you can build HDF5 with MPI support provided by MPICH by specifying a dependency on ``mpich`` (e.g., ``hdf5 ^mpich``).
188188
Spack also supports versioning of virtual dependencies.
189189
A package can depend on the MPI interface at version 3 (e.g., ``hdf5 ^mpi@3``), and provider packages specify what version of the interface *they* provide.
190190
The partial spec ``^mpi@3`` can be satisfied by any of several MPI implementation packages that provide MPI version 3.
191191

192192
.. literalinclude:: outputs/basics/hdf5-hl-mpi.out
193193
:language: console
194194

195-
We'll do a quick check in on what we have installed so far.
195+
You can do a quick check in on what you have installed so far.
196196

197197
.. literalinclude:: outputs/basics/find-ldf-2.out
198198
:language: console
199199

200200
Spack models the dependencies of packages as a directed acyclic graph (DAG).
201201
The ``spack find -d`` command shows the tree representation of that graph.
202-
We can also use the ``spack graph`` command to view the entire DAG as a graph.
202+
You can also use the ``spack graph`` command to view the entire DAG as a graph.
203203

204204
.. literalinclude:: outputs/basics/graph-hdf5.out
205205
:language: console
206206

207207
HDF5 is more complicated than our basic example of zlib-ng and Tcl, but it's still within the realm of software that an experienced HPC user could reasonably expect to manually install given a bit of time.
208-
Now let's look at an even more complicated package.
208+
Now you can look at an even more complicated package.
209209

210210
.. literalinclude:: outputs/basics/trilinos.out
211211
:language: console
212212

213213
Now we're starting to see the power of Spack.
214214
Trilinos in its default configuration has 23 direct dependencies, many of which have dependencies of their own.
215215
Installing more complex packages can take days or weeks even for an experienced user.
216-
Although we've done a binary installation for the tutorial, a source installation of Trilinos using Spack takes about 3 hours (depending on the system), but only 20 seconds of programmer time.
216+
Although a binary installation has been done for the tutorial, a source installation of Trilinos using Spack takes about 3 hours (depending on the system), but only 20 seconds of programmer time.
217217

218218
Spack manages consistency of the entire DAG.
219219
Every MPI dependency will be satisfied by the same configuration of MPI, etc.
220-
If we install Trilinos again specifying a dependency on our previous HDF5 built with MPICH:
220+
If you install Trilinos again specifying a dependency on your previous HDF5 built with MPICH:
221221

222222
.. literalinclude:: outputs/basics/trilinos-hdf5.out
223223
:language: console
224224

225-
We see that every package in the Trilinos DAG that depends on MPI now uses MPICH.
225+
You will see that every package in the Trilinos DAG that depends on MPI now uses MPICH.
226226

227227
.. literalinclude:: outputs/basics/find-d-trilinos.out
228228
:language: console
229229

230-
As we discussed before, the ``spack find -d`` command shows the dependency information as a tree.
230+
As discussed before, the ``spack find -d`` command shows the dependency information as a tree.
231231
While that is often sufficient, many complicated packages, including Trilinos, have dependencies that cannot be fully represented as a tree.
232232
Again, the ``spack graph`` command shows the full DAG of the dependency information.
233233

@@ -250,25 +250,25 @@ Uninstalling Packages
250250
---------------------
251251

252252
Earlier we installed many configurations each of zlib-ng and Tcl.
253-
Now we will go through and uninstall some of those packages that we didn't really need.
253+
Now you will go through and uninstall some of those packages that you didn't really need.
254254

255255
.. literalinclude:: outputs/basics/find-d-tcl.out
256256
:language: console
257257

258258
.. literalinclude:: outputs/basics/find-zlib.out
259259
:language: console
260260

261-
We can uninstall packages by spec using the same syntax as install.
261+
You can uninstall packages by spec using the same syntax as install.
262262

263263
.. literalinclude:: outputs/basics/uninstall-zlib.out
264264
:language: console
265265

266266
.. literalinclude:: outputs/basics/find-lf-zlib.out
267267
:language: console
268268

269-
We can also uninstall packages by referring only to their hash.
269+
You can also uninstall packages by referring only to their hash.
270270

271-
We can use either the ``--force`` (or ``-f``) flag or the ``--dependents`` (or ``-R``) flag to remove packages that are required by another installed package.
271+
You can use either the ``--force`` (or ``-f``) flag or the ``--dependents`` (or ``-R``) flag to remove packages that are required by another installed package.
272272
Use ``--force`` to remove just the specified package, leaving dependents broken.
273273
Use ``--dependents`` to remove the specified package and all of its dependents.
274274

@@ -291,10 +291,10 @@ The ``--all`` (or ``-a``) flag can be used to uninstall all packages matching an
291291
Advanced ``spack find`` Usage
292292
-----------------------------
293293

294-
We will go over some additional uses for the ``spack find`` command not already covered in the :ref:`basics-tutorial-install` and
294+
You will go over some additional uses for the ``spack find`` command not already covered in the :ref:`basics-tutorial-install` and
295295
:ref:`basics-tutorial-uninstall` sections.
296296

297-
The ``spack find`` command can accept what we call "anonymous specs." These are expressions in spec syntax that do not contain a package name.
297+
The ``spack find`` command can accept what are called "anonymous specs." These are expressions in spec syntax that do not contain a package name.
298298
For example, ``spack find ^mpich`` will return every installed package that depends on MPICH, and ``spack find cflags="-O3"`` will return every package which was built with ``cflags="-O3"``.
299299

300300
.. literalinclude:: outputs/basics/find-dep-mpich.out
@@ -330,14 +330,14 @@ Spack also has tools to add compilers, and compilers built with Spack can be add
330330
.. literalinclude:: outputs/basics/find-p-gcc.out
331331
:language: console
332332

333-
We can add GCC to Spack as an available compiler using the ``spack compiler add`` command.
333+
You can add GCC to Spack as an available compiler using the ``spack compiler add`` command.
334334
This will allow future packages to build with ``gcc@12.3.0``.
335-
To avoid having to copy and paste GCC's path, we can use ``spack location -i`` to get the installation prefix.
335+
To avoid having to copy and paste GCC's path, you can use ``spack location -i`` to get the installation prefix.
336336

337337
.. literalinclude:: outputs/basics/compiler-add-location.out
338338
:language: console
339339

340-
We can also remove compilers from our configuration using ``spack compiler remove <compiler_spec>``
340+
You can also remove compilers from your configuration using ``spack compiler remove <compiler_spec>``
341341

342342
.. literalinclude:: outputs/basics/compiler-remove.out
343343
:language: console

0 commit comments

Comments
 (0)