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
Fix spelling and grammar in tutorial documents (#435)
Corrected various distinct spelling and grammatical errors
across the following tutorial files:
- tutorial_configuration.rst
- tutorial_developer_workflows.rst
- tutorial_environments.rst
- tutorial_modules.rst
No subjective style changes were made, and rst formatting
conventions (e.g., double backticks) were preserved.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: tutorial_configuration.rst
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,26 +24,26 @@ A partial list of some key configuration sections is provided below.
24
24
* - config
25
25
- General settings (install location, number of build jobs, etc)
26
26
* - concretizer
27
-
- Specializaiton of the concretizer behavior (reuse, unification, etc)
27
+
- Specialization of the concretizer behavior (reuse, unification, etc)
28
28
* - compilers
29
29
- Define the compilers that Spack can use (required and system specific)
30
-
* - mirrors
30
+
* - Mirrors
31
31
- Locations where spack can look for stashed source or binary distributions
32
-
* - packages
32
+
* - Packages
33
33
- Specific settings and rules for packages
34
-
* - modules
34
+
* - Modules
35
35
- Naming, location and additional configuration of Spack generated modules
36
36
37
37
The full list of sections can be viewed with ``spack config list``.
38
-
For further education we encourage you to explore the spack `documentation on configuration files <https://spack.readthedocs.io/en/latest/configuration.html#configuration-files>`_.
38
+
For further education, we encourage you to explore the spack `documentation on configuration files <https://spack.readthedocs.io/en/latest/configuration.html#configuration-files>`_.
39
39
40
40
The principle goals of this section of the tutorial are:
41
41
42
42
1. Introduce the configuration sections and scope hierarchy
43
43
2. Demonstrate how to manipulate configurations
44
44
3. Show how to configure system assets with spack (compilers and packages)
45
45
46
-
As such we will primarily focus on the ``compilers`` and ``packages`` configuration sections in this portion of the tutorial.
46
+
As such, we will primarily focus on the ``compilers`` and ``packages`` configuration sections in this portion of the tutorial.
47
47
48
48
We will explain this by first covering how to manipulate configurations from the command line and then show how this impacts the configuration file hierarchy.
49
49
We will then move into compiler and package configurations to help you develop skills for getting the builds you want on your system.
@@ -58,7 +58,7 @@ Configuration from the command line
58
58
-----------------------------------
59
59
60
60
You can run ``spack config blame [section]`` at any point in time to see what your current configuration is.
61
-
If you omit the section then spack will dump all the configurations settings to your screen.
61
+
If you omit the section, then spack will dump all the configurations settings to your screen.
62
62
Let's go ahead and run this for the ``concretizer`` section.
63
63
64
64
.. code-block:: console
@@ -80,10 +80,10 @@ If we rerun ``spack config blame concretizer`` we can see that the change was ap
80
80
81
81
$ spack config blame concretizer
82
82
83
-
Notice that the reference file on for this option is now different.
83
+
Notice that the reference file for this option is now different.
84
84
This indicates the scope where the configuration was set in, and we will discuss how spack chooses the default scope shortly.
85
85
For now, it is important to note that the ``spack config`` command accepts an optional ``--scope`` flag so we can be more precise in the configuration process.
86
-
This will make more sense after the next section which provides the definition of spack's configuration scopes and their hierarchy.
86
+
This will make more sense after the next section which provides the definition of Spack's configuration scopes and their hierarchy.
87
87
88
88
.. _configs-tutorial-scopes:
89
89
@@ -210,7 +210,7 @@ Compiler Configuration
210
210
211
211
For most tasks, we can use Spack with the compilers auto-detected the first time Spack runs on a system.
212
212
As discussed in the basic installation tutorial, we can also tell Spack where compilers are located using the ``spack compiler add`` command.
213
-
However, in some circumstances we want even more fine-grained control over the compilers available.
213
+
However, in some circumstances, we want even more fine-grained control over the compilers available.
214
214
This section will teach you how to exercise that control using the compilers configuration file.
215
215
216
216
We will start by opening the compilers configuration file:
@@ -243,8 +243,8 @@ We start with no active environment, so this will open a ``compilers.yaml`` file
243
243
paths:
244
244
cc: /usr/bin/gcc-10
245
245
cxx: /usr/bin/g++-10
246
-
f77: usr/bin/gfortran-10
247
-
fc: usr/bin/gfortran-10
246
+
f77: /usr/bin/gfortran-10
247
+
fc: /usr/bin/gfortran-10
248
248
flags: {}
249
249
operating_system: ubuntu22.04
250
250
target: x86_64
@@ -308,7 +308,7 @@ We can verify that our new compiler works by invoking it now:
308
308
309
309
310
310
This new compiler also works on Fortran codes.
311
-
We'll show it by compiling a small package using as a build dependency ``cmake%gcc@11.4.0`` since it is already available in our binary cache:
311
+
We'll show this by compiling a small package using ``cmake%gcc@11.4.0`` as a build dependency, since it is already available in our binary cache:
312
312
313
313
.. code-block:: console
314
314
@@ -521,7 +521,7 @@ The packages configuration file also controls when Spack will build against an e
521
521
Spack has a ``spack external find`` command that can automatically discover and register externally installed packages.
522
522
This works for many common build dependencies, but it's also important to know how to do this manually for packages that Spack cannot yet detect.
523
523
524
-
On these systems we have a pre-installed curl.
524
+
On these systems, we have a pre-installed curl.
525
525
Let's tell Spack about this package and where it can be found:
526
526
527
527
.. code-block:: yaml
@@ -591,15 +591,15 @@ Now Spack will be forced to choose the external Curl.
591
591
592
592
This gets slightly more complicated with virtual dependencies.
593
593
Suppose we don't want to build our own MPI, but we now want a parallel version of HDF5.
594
-
Well, fortunately we have MPICH installed on these systems.
594
+
Well, fortunately, we have MPICH installed on these systems.
595
595
596
596
Instead of manually configuring an external for MPICH like we did for Curl we will use the ``spack external find`` command.
597
597
For packages that support this option, this is a useful way to avoid typos and get more accurate external specs.
Copy file name to clipboardExpand all lines: tutorial_developer_workflows.rst
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Developer Workflows Tutorial
12
12
============================
13
13
14
14
This tutorial will guide you through the process of using the ``spack develop`` command to develop software from local source code within a spack environment.
15
-
With this command spack will manage your dependencies while you focus on testing changes to your library and/or application.
15
+
With this command, Spack will manage your dependencies while you focus on testing changes to your library and/or application.
16
16
17
17
18
18
-----------------------------
@@ -22,13 +22,13 @@ Installing from local source
22
22
The ``spack install`` command, as you know, fetches source code from a mirror or the internet before building and installing your package.
23
23
As developers, we want to build from local source, which we will constantly change, build, and test.
24
24
25
-
Let's imagine for a second we're working on ``scr``. ``scr`` is a library used to implement scalable checkpointing in application codes.
25
+
Let's imagine, for a second, we're working on ``scr``. ``scr`` is a library used to implement scalable checkpointing in application codes.
26
26
It supports writing/reading checkpoints quickly and efficiently using MPI and high-bandwidth file I/O.
27
-
We'd like to test changes to scr within an actual application so we'll test with ``macsio``, a proxy application written to mimic typical HPC I/O workloads.
27
+
We'd like to test changes to ``scr`` within an actual application, so we'll test with ``macsio``, a proxy application written to mimic typical HPC I/O workloads.
28
28
We've chosen ``scr`` and ``macsio`` because together they are quick to build.
29
29
30
30
We'll start by making an environment for our development.
31
-
We need to build ``macsio`` with ``scr`` support, and we'd like everything to be built without fortran support for the time being.
31
+
We need to build ``macsio`` with ``scr`` support, and we'd like everything to be built without Fortran support for the time being.
32
32
Let's set up that development workflow.
33
33
34
34
.. literalinclude:: outputs/dev/setup-scr.out
@@ -145,8 +145,8 @@ In this case, it will be the 3.1.0 release that we want to write a patch for:
145
145
.. literalinclude:: outputs/dev/develop-1.out
146
146
:language: console
147
147
148
-
The spack develop command marks the package as being a "development" package in the spack.yaml.
149
-
This adds a special ``dev_path=`` attribute to the spec for the package, so spack remembers where the source code for this package is located.
148
+
The spack develop command marks the package as being a "development" package in the ``spack.yaml``.
149
+
This adds a special ``dev_path=`` attribute to the spec for the package, so Spack remembers where the source code for this package is located.
150
150
The develop command also downloads/checks out the source code for the package.
151
151
By default, the source code is downloaded into a subdirectory of the environment.
152
152
You can change the location of this source directory by modifying the ``path:`` attribute of the develop configuration in the environment.
@@ -156,13 +156,13 @@ There are a few gotchas with the spack develop command
156
156
* You often specify the package version manually when specifying a
157
157
package as a dev package. Spack needs to know the version of the dev
158
158
package so it can supply the correct flags for the package's build
159
-
system. If a version is not supplied then spack will take the maximum version
160
-
defined in the package where where `infinity versions <https://spack.readthedocs.io/en/latest/packaging_guide.html#version-comparison>`_ like ``develop`` and ``main``
159
+
system. If a version is not supplied, then Spack will take the maximum version
160
+
defined in the package where `infinity versions <https://spack.readthedocs.io/en/latest/packaging_guide.html#version-comparison>`_ like ``develop`` and ``main``
161
161
have a higher value than the numeric versions.
162
162
* You should ensure a spec for the package you are developing appears in the DAG of at least one of the roots of the environment with the same version that you are developing.
163
163
``spack add <package>`` with the matching version you want to develop is a way to ensure
164
-
the develop spec is satisfied.the ``spack.yaml`` environments file. This is because
165
-
develop specs are not concretization constraints but rather a criteria for adding
164
+
the develop spec is satisfied in the ``spack.yaml`` environments file. This is because
165
+
develop specs are not concretization constraints but rather criteria for adding
166
166
the ``dev_path=`` variant to existing spec.
167
167
* You'll need to re-concretize the environment so that the version
168
168
number and the ``dev_path=`` attributes are properly added to the
@@ -171,13 +171,13 @@ There are a few gotchas with the spack develop command
171
171
.. literalinclude:: outputs/dev/develop-conc.out
172
172
:language: console
173
173
174
-
Now that we have this done, we tell spack to rebuild both ``scr`` and ``macsio`` by running ``spack install``.
174
+
Now that we have this done, we tell Spack to rebuild both ``scr`` and ``macsio`` by running ``spack install``.
175
175
176
176
.. literalinclude:: outputs/dev/develop-2.out
177
177
:language: console
178
178
179
179
This rebuilds ``scr`` from the subdirectory we specified.
180
-
If your package uses cmake, spack will build the package in a build directory that matches the hash for your package.
180
+
If your package uses CMake, Spack will build the package in a build directory that matches the hash for your package.
181
181
From here you can change into the appropriate directory and perform your own build/test cycles.
182
182
183
183
Now, we can develop our code.
@@ -188,7 +188,7 @@ Let's edit a file and remove the first semi-colon we find.
188
188
:language: console
189
189
190
190
Once you have a development package, ``spack install`` also works much like "make".
191
-
Since spack knows the source code directory of the package, it checks the filetimes on the source directory to see if we've made recent changes.
191
+
Since Spack knows the source code directory of the package, it checks the filetimes on the source directory to see if we've made recent changes.
192
192
If the file times are newer, it will rebuild ``scr`` and any other package that depends on ``scr``.
193
193
194
194
.. literalinclude:: outputs/dev/develop-3.out
@@ -202,17 +202,17 @@ Now let's fix it and rebuild directly.
202
202
.. literalinclude:: outputs/dev/develop-4.out
203
203
:language: console
204
204
205
-
You'll notice here that spack rebuilt both ``scr`` and ``macsio``, as expected.
205
+
You'll notice here that Spack rebuilt both ``scr`` and ``macsio``, as expected.
206
206
207
-
Taking advantage of iterative builds with spack requires cooperation from your build system.
208
-
When spack performs a rebuild on a development package, it reruns all the build stages for your package without cleaning the source and build directories to a pristine state.
207
+
Taking advantage of iterative builds with Spack requires cooperation from your build system.
208
+
When Spack performs a rebuild on a development package, it reruns all the build stages for your package without cleaning the source and build directories to a pristine state.
209
209
If your build system can take advantage of the previously compiled object files then you'll end up with an iterative build.
210
210
211
211
- If your package just uses make, you also should get iterative builds
212
212
for free when running ``spack develop``.
213
-
- If your package uses cmake with the typical ``cmake`` / ``build`` /
213
+
- If your package uses CMake with the typical ``cmake`` / ``build`` /
214
214
``install`` build stages, you'll get iterative builds for free with
215
-
spack because cmake doesn’t modify the filetime on the
215
+
Spack because CMake doesn’t modify the filetime on the
216
216
``CMakeCache.txt`` file if your cmake flags haven't changed.
217
217
- If your package uses autoconf, then rerunning the typical
218
218
``autoreconf`` stage typically modifies the filetime of
@@ -244,7 +244,7 @@ Workflow Summary
244
244
245
245
Use the ``spack develop`` command with an environment to make a reproducible build environment for your development workflow.
246
246
Spack will set up all the dependencies for you and link all your packages together.
247
-
Within a development environment, ``spack install`` works similar to ``make`` in that it will check file times to rebuild the minimum number of spack packages necessary to reflect the changes to your build.
247
+
Within a development environment, ``spack install`` works similarly to ``make`` in that it will check file times to rebuild the minimum number of Spack packages necessary to reflect the changes to your build.
248
248
249
249
-------------------
250
250
Optional: Tips and Tricks
@@ -261,7 +261,7 @@ A list of the options for the ``spack develop`` can be viewed below:
261
261
Source Code Management
262
262
----------
263
263
264
-
``spack develop`` allows users to manipulate the source code locations The default behavior is to let spack manage its location and cloning operations, but software developers often want more control over these.
264
+
``spack develop`` allows users to manipulate the source code locations The default behavior is to let Spack manage its location and cloning operations, but software developers often want more control over these.
265
265
266
266
The source directory can be set with the ``--path`` argument when calling ``spack develop``.
267
267
If this directory already exists then ``spack develop`` will not attempt to fetch the code for you.
@@ -282,7 +282,7 @@ Navigation and the Build Environment
282
282
Diving into the build environment was introduced previously in the packaging section with the ``spack build-env scr -- bash`` command.
283
283
This is a helpful function because it allows you to run commands inside the build environment.
284
284
In the packages section of the tutorial this was combined with ``spack cd`` to produce a manual build outside of Spack's automated Process.
285
-
This command is particularly useful in developer environments -- it allows developers a streamlined workflow when iterating on a single package without the overhead of the ``spack install`` command.
285
+
This command is particularly useful in developer environments—it allows developers a streamlined workflow when iterating on a single package without the overhead of the ``spack install`` command.
286
286
The additional features of the install command are unnecessary when tightly iterating between building and testing a particular package.
287
287
For example, the workflow modifying ``scr`` that we just went through can be simplified to:
288
288
@@ -303,7 +303,7 @@ For example, the workflow modifying ``scr`` that we just went through can be sim
303
303
$ make test
304
304
$ exit
305
305
306
-
Working with the build environment and along with spack navigation features provides a nice way to iterate quickly and navigate through the hashheavy spack directory structures.
306
+
Working with the build environment and along with Spack navigation features provides a nice way to iterate quickly and navigate through the hash-heavy Spack directory structures.
307
307
308
308
Combinatorics
309
309
------------
@@ -327,4 +327,4 @@ While we won't build out this example it illustrates how the ``dev_path`` for ``
327
327
328
328
Now if we want to do most of our incremental builds using the ``Release`` build and periodically check the results using the ``Debug`` build we can combine the workflow from the previous example: dive into the ``Release`` versions build environment using ``spack build-env scr build_type=Release -- bash`` and navigate with ``spack cd -b scr build_type=Release``.
329
329
Note that since there are two ``scr`` specs in the environment we must distinguish which one we want for these commands.
330
-
When we are ready to check our changes for the debug build we can exit out of the build environment subshell, rerun ``spack install`` to rebuild everything, and then inspect the debug build through our method of choice.
330
+
When we are ready to check our changes for the debug build, we can exit out of the build environment subshell, rerun ``spack install`` to rebuild everything, and then inspect the debug build through our method of choice.
0 commit comments