You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've updated the tutorial language for consistency.
I replaced instances of "you will", "you can", "you are", "you should", "your", and "let's" with "we will", "we can", "we are", "we should", "our", and "let us" respectively in the following files:
- tutorial_packaging.rst
- tutorial_scripting.rst
- tutorial_stacks.rst
This change makes the language more consistent throughout the tutorials.
Copy file name to clipboardExpand all lines: tutorial_advanced_packaging.rst
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ This section is focused on modifying the build-time environment represented by `
91
91
:py:func:`setup_dependent_run_environment
92
92
<spack.package.PackageBase.setup_dependent_run_environment>` function's ``env`` parameter, are included in Spack's automatically-generated module files.
93
93
94
-
You can practice by editing the ``mpich`` package to set the ``MPICC`` environment variable in the build-time environment of dependent packages.
94
+
We can practice by editing the ``mpich`` package to set the ``MPICC`` environment variable in the build-time environment of dependent packages.
95
95
96
96
.. code-block:: console
97
97
@@ -113,7 +113,7 @@ Once you're finished, the method should look like this:
113
113
spack_env.set('MPICH_F90', spack_fc)
114
114
spack_env.set('MPICH_FC', spack_fc)
115
115
116
-
At this point you can, for instance, install ``netlib-scalapack`` with ``mpich``:
116
+
At this point we can, for instance, install ``netlib-scalapack`` with ``mpich``:
117
117
118
118
.. code-block:: console
119
119
@@ -177,7 +177,7 @@ To contrast with ``qt``'s :py:func:`setup_dependent_build_environment <spack.pac
177
177
178
178
It is not necessary to implement a ``setup_dependent_run_environment`` method for ``qt`` so one is not provided.
179
179
180
-
You can see how it works by completing the ``elpa`` package:
180
+
Let's see how it works by completing the ``elpa`` package:
181
181
182
182
.. code-block:: console
183
183
@@ -301,7 +301,7 @@ Packages which don't follow this naming scheme must implement this function them
301
301
)
302
302
303
303
This issue is common for packages which implement an interface (i.e. virtual package providers in Spack).
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:
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:
305
305
306
306
.. code-block:: console
307
307
@@ -331,14 +331,14 @@ If you try to build another version of ``armadillo`` tied to ``netlib-lapack`` (
Unlike ``openblas`` which provides a library named ``libopenblas.so``, ``netlib-lapack`` provides ``liblapack.so``, so it needs to implement customized library search logic.
and follow the instructions in the ``# TUTORIAL:`` comment as before.
341
-
What you need to implement is:
341
+
What we need to implement is:
342
342
343
343
.. code-block:: python
344
344
@@ -353,7 +353,7 @@ i.e., a property that returns the correct list of libraries for the LAPACK inter
353
353
354
354
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.
355
355
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 you can finally install ``armadillo ^netlib-lapack ^mpich``:
356
+
Now we can finally install ``armadillo ^netlib-lapack ^mpich``:
357
357
358
358
.. code-block:: console
359
359
@@ -407,7 +407,7 @@ Extra query parameters
407
407
An advanced feature of the Spec's build-interface protocol is the support for extra parameters after the subscript key.
408
408
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.
409
409
410
-
You can look at an example and try to install ``netcdf ^mpich``:
410
+
Let's look at an example and try to install ``netcdf ^mpich``:
411
411
412
412
.. code-block:: console
413
413
@@ -431,7 +431,7 @@ You can look at an example and try to install ``netcdf ^mpich``:
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 you need to fix it:
434
+
Clearly the implementation in the ``hdf5`` package is not complete, and we need to fix it:
435
435
436
436
.. code-block:: console
437
437
@@ -450,8 +450,8 @@ If you followed the instructions correctly, the code added to the ``lib`` proper
Copy file name to clipboardExpand all lines: tutorial_basics.rst
+36-36Lines changed: 36 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,10 @@ Basic Installation Tutorial
9
9
=========================================
10
10
11
11
This tutorial will guide you through the process of installing software using Spack.
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).
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).
16
16
The provided output is all from an Ubuntu 22.04 Docker image.
17
17
18
18
.. _basics-tutorial-install:
@@ -23,7 +23,7 @@ Installing Spack
23
23
24
24
Spack works out of the box.
25
25
Simply clone Spack to get going.
26
-
You will clone Spack and immediately check out the most recent release, v0.23.
26
+
We will clone Spack and immediately check out the most recent release, v0.23.
27
27
28
28
.. literalinclude:: outputs/basics/clone.out
29
29
:language: console
@@ -50,7 +50,7 @@ The ``spack list`` command shows available packages.
50
50
51
51
The ``spack list`` command can also take a query string.
52
52
Spack automatically adds wildcards to both ends of the string, or you can add your own wildcards.
53
-
For example, you can view all available Python packages.
53
+
For example, we can view all available Python packages.
54
54
55
55
.. literalinclude:: outputs/basics/list-py.out
56
56
:language: console
@@ -67,20 +67,20 @@ To install a piece of software simply type,
67
67
68
68
$ spack install <package_name>
69
69
70
-
You can go ahead and install ``gmake``,
70
+
Let's go ahead and install ``gmake``,
71
71
72
72
.. literalinclude:: outputs/basics/gmake.out
73
73
:language: console
74
74
75
75
You will see Spack installed ``gmake``, ``gcc-runtime``, and ``glibc``.
76
76
The ``glibc`` and ``gcc-runtime`` packages are automatically tracked by Spack to manage consistency requirements among compiler runtimes.
77
77
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, you will ignore these components and focus on the packages explicitly installed.
78
+
For the rest of this section, we will ignore these components and focus on the packages explicitly installed.
79
79
80
80
Spack can install software either from source or from a binary cache.
81
81
Packages in the binary cache are signed with GPG for security.
82
82
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, 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.
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.
84
84
85
85
.. literalinclude:: outputs/basics/mirror.out
86
86
:language: console
@@ -95,10 +95,10 @@ The ``%`` sigil is used to specify compilers.
95
95
:language: console
96
96
97
97
Note that this installation is located separately from the previous one.
98
-
This will be discussed in more detail later, but this is part of what allows Spack to support many versions of software packages.
98
+
We will discuss this in more detail later, but this is part of what allows Spack to support many versions of software packages.
99
99
100
100
You can check for particular versions before requesting them.
101
-
You will use the ``spack versions`` command to see the available versions, and then install a different version of ``zlib-ng``.
101
+
We will use the ``spack versions`` command to see the available versions, and then install a different version of ``zlib-ng``.
You might also want to install HDF5 with a different MPI implementation.
182
+
We might also want to install HDF5 with a different MPI implementation.
183
183
While ``mpi`` itself is a virtual package representing an interface, other packages can depend on such abstract interfaces.
184
184
Spack handles these through "virtual dependencies." A package, such as HDF5, can depend on the ``mpi`` virtual package (the interface).
185
185
Actual MPI implementation packages (like ``openmpi``, ``mpich``, ``mvapich2``, etc.) provide the MPI interface.
186
186
Any of these providers can be requested to satisfy an MPI dependency.
187
-
For example, you can build HDF5 with MPI support provided by MPICH by specifying a dependency on ``mpich`` (e.g., ``hdf5 ^mpich``).
187
+
For example, we can build HDF5 with MPI support provided by MPICH by specifying a dependency on ``mpich`` (e.g., ``hdf5 ^mpich``).
188
188
Spack also supports versioning of virtual dependencies.
189
189
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.
190
190
The partial spec ``^mpi@3`` can be satisfied by any of several MPI implementation packages that provide MPI version 3.
You can do a quick check in on what you have installed so far.
195
+
We'll do a quick check in on what we have installed so far.
196
196
197
197
.. literalinclude:: outputs/basics/find-ldf-2.out
198
198
:language: console
199
199
200
200
Spack models the dependencies of packages as a directed acyclic graph (DAG).
201
201
The ``spack find -d`` command shows the tree representation of that graph.
202
-
You can also use the ``spack graph`` command to view the entire DAG as a graph.
202
+
We can also use the ``spack graph`` command to view the entire DAG as a graph.
203
203
204
204
.. literalinclude:: outputs/basics/graph-hdf5.out
205
205
:language: console
206
206
207
207
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 you can look at an even more complicated package.
208
+
Now let's look at an even more complicated package.
209
209
210
210
.. literalinclude:: outputs/basics/trilinos.out
211
211
:language: console
212
212
213
213
Now we're starting to see the power of Spack.
214
214
Trilinos in its default configuration has 23 direct dependencies, many of which have dependencies of their own.
215
215
Installing more complex packages can take days or weeks even for an experienced user.
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.
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.
217
217
218
218
Spack manages consistency of the entire DAG.
219
219
Every MPI dependency will be satisfied by the same configuration of MPI, etc.
220
-
If you install Trilinos again specifying a dependency on your previous HDF5 built with MPICH:
220
+
If we install Trilinos again specifying a dependency on our previous HDF5 built with MPICH:
You can also uninstall packages by referring only to their hash.
269
+
We can also uninstall packages by referring only to their hash.
270
270
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.
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.
272
272
Use ``--force`` to remove just the specified package, leaving dependents broken.
273
273
Use ``--dependents`` to remove the specified package and all of its dependents.
274
274
@@ -291,10 +291,10 @@ The ``--all`` (or ``-a``) flag can be used to uninstall all packages matching an
291
291
Advanced ``spack find`` Usage
292
292
-----------------------------
293
293
294
-
You will go over some additional uses for the ``spack find`` command not already covered in the :ref:`basics-tutorial-install` and
294
+
We will go over some additional uses for the ``spack find`` command not already covered in the :ref:`basics-tutorial-install` and
295
295
:ref:`basics-tutorial-uninstall` sections.
296
296
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.
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.
298
298
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"``.
0 commit comments