Skip to content

Commit 09e4bb4

Browse files
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>
1 parent cb9876f commit 09e4bb4

4 files changed

Lines changed: 68 additions & 68 deletions

File tree

tutorial_configuration.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@ A partial list of some key configuration sections is provided below.
2424
* - config
2525
- General settings (install location, number of build jobs, etc)
2626
* - concretizer
27-
- Specializaiton of the concretizer behavior (reuse, unification, etc)
27+
- Specialization of the concretizer behavior (reuse, unification, etc)
2828
* - compilers
2929
- Define the compilers that Spack can use (required and system specific)
30-
* - mirrors
30+
* - Mirrors
3131
- Locations where spack can look for stashed source or binary distributions
32-
* - packages
32+
* - Packages
3333
- Specific settings and rules for packages
34-
* - modules
34+
* - Modules
3535
- Naming, location and additional configuration of Spack generated modules
3636

3737
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>`_.
3939

4040
The principle goals of this section of the tutorial are:
4141

4242
1. Introduce the configuration sections and scope hierarchy
4343
2. Demonstrate how to manipulate configurations
4444
3. Show how to configure system assets with spack (compilers and packages)
4545

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.
4747

4848
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.
4949
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
5858
-----------------------------------
5959

6060
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.
6262
Let's go ahead and run this for the ``concretizer`` section.
6363

6464
.. code-block:: console
@@ -80,10 +80,10 @@ If we rerun ``spack config blame concretizer`` we can see that the change was ap
8080
8181
$ spack config blame concretizer
8282
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.
8484
This indicates the scope where the configuration was set in, and we will discuss how spack chooses the default scope shortly.
8585
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.
8787

8888
.. _configs-tutorial-scopes:
8989

@@ -210,7 +210,7 @@ Compiler Configuration
210210

211211
For most tasks, we can use Spack with the compilers auto-detected the first time Spack runs on a system.
212212
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.
214214
This section will teach you how to exercise that control using the compilers configuration file.
215215

216216
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
243243
paths:
244244
cc: /usr/bin/gcc-10
245245
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
248248
flags: {}
249249
operating_system: ubuntu22.04
250250
target: x86_64
@@ -308,7 +308,7 @@ We can verify that our new compiler works by invoking it now:
308308
309309
310310
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:
312312

313313
.. code-block:: console
314314
@@ -521,7 +521,7 @@ The packages configuration file also controls when Spack will build against an e
521521
Spack has a ``spack external find`` command that can automatically discover and register externally installed packages.
522522
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.
523523

524-
On these systems we have a pre-installed curl.
524+
On these systems, we have a pre-installed curl.
525525
Let's tell Spack about this package and where it can be found:
526526

527527
.. code-block:: yaml
@@ -591,15 +591,15 @@ Now Spack will be forced to choose the external Curl.
591591

592592
This gets slightly more complicated with virtual dependencies.
593593
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.
595595

596596
Instead of manually configuring an external for MPICH like we did for Curl we will use the ``spack external find`` command.
597597
For packages that support this option, this is a useful way to avoid typos and get more accurate external specs.
598598

599599
.. literalinclude:: outputs/config/0.external_find.out
600600
:language: console
601601

602-
To express that we don't want any other MPI installed we can use the virtual ``mpi`` package as a key.
602+
To express that we don't want any other MPI installed, we can use the virtual ``mpi`` package as a key.
603603
While we're editing the ``spack.yaml`` file, make sure to configure HDF5 to be able to build with MPI again:
604604

605605
.. code-block:: yaml
@@ -793,7 +793,7 @@ If we uninstall and reinstall zlib-ng, we see that it now uses only 2 cores:
793793
794794
Obviously, if you want to build everything in serial for whatever reason, you would set ``build_jobs`` to 1.
795795

796-
Last we'll unset ``concretizer:reuse:false`` since we'll want to enable concretizer reuse for the rest of this tutorial.
796+
Last, we'll unset ``concretizer:reuse:false`` since we'll want to enable concretizer reuse for the rest of this tutorial.
797797

798798
.. code-block:: yaml
799799

tutorial_developer_workflows.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Developer Workflows Tutorial
1212
============================
1313

1414
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.
1616

1717

1818
-----------------------------
@@ -22,13 +22,13 @@ Installing from local source
2222
The ``spack install`` command, as you know, fetches source code from a mirror or the internet before building and installing your package.
2323
As developers, we want to build from local source, which we will constantly change, build, and test.
2424

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.
2626
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.
2828
We've chosen ``scr`` and ``macsio`` because together they are quick to build.
2929

3030
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.
3232
Let's set up that development workflow.
3333

3434
.. 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:
145145
.. literalinclude:: outputs/dev/develop-1.out
146146
:language: console
147147

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.
150150
The develop command also downloads/checks out the source code for the package.
151151
By default, the source code is downloaded into a subdirectory of the environment.
152152
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
156156
* You often specify the package version manually when specifying a
157157
package as a dev package. Spack needs to know the version of the dev
158158
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``
161161
have a higher value than the numeric versions.
162162
* 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.
163163
``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
166166
the ``dev_path=`` variant to existing spec.
167167
* You'll need to re-concretize the environment so that the version
168168
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
171171
.. literalinclude:: outputs/dev/develop-conc.out
172172
:language: console
173173

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``.
175175

176176
.. literalinclude:: outputs/dev/develop-2.out
177177
:language: console
178178

179179
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.
181181
From here you can change into the appropriate directory and perform your own build/test cycles.
182182

183183
Now, we can develop our code.
@@ -188,7 +188,7 @@ Let's edit a file and remove the first semi-colon we find.
188188
:language: console
189189

190190
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.
192192
If the file times are newer, it will rebuild ``scr`` and any other package that depends on ``scr``.
193193

194194
.. literalinclude:: outputs/dev/develop-3.out
@@ -202,17 +202,17 @@ Now let's fix it and rebuild directly.
202202
.. literalinclude:: outputs/dev/develop-4.out
203203
:language: console
204204

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.
206206

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.
209209
If your build system can take advantage of the previously compiled object files then you'll end up with an iterative build.
210210

211211
- If your package just uses make, you also should get iterative builds
212212
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`` /
214214
``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
216216
``CMakeCache.txt`` file if your cmake flags haven't changed.
217217
- If your package uses autoconf, then rerunning the typical
218218
``autoreconf`` stage typically modifies the filetime of
@@ -244,7 +244,7 @@ Workflow Summary
244244

245245
Use the ``spack develop`` command with an environment to make a reproducible build environment for your development workflow.
246246
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.
248248

249249
-------------------
250250
Optional: Tips and Tricks
@@ -261,7 +261,7 @@ A list of the options for the ``spack develop`` can be viewed below:
261261
Source Code Management
262262
----------
263263

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.
265265

266266
The source directory can be set with the ``--path`` argument when calling ``spack develop``.
267267
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
282282
Diving into the build environment was introduced previously in the packaging section with the ``spack build-env scr -- bash`` command.
283283
This is a helpful function because it allows you to run commands inside the build environment.
284284
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 environmentsit allows developers a streamlined workflow when iterating on a single package without the overhead of the ``spack install`` command.
286286
The additional features of the install command are unnecessary when tightly iterating between building and testing a particular package.
287287
For example, the workflow modifying ``scr`` that we just went through can be simplified to:
288288

@@ -303,7 +303,7 @@ For example, the workflow modifying ``scr`` that we just went through can be sim
303303
$ make test
304304
$ exit
305305
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.
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.
307307

308308
Combinatorics
309309
------------
@@ -327,4 +327,4 @@ While we won't build out this example it illustrates how the ``dev_path`` for ``
327327

328328
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``.
329329
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

Comments
 (0)