Skip to content

Commit 6563835

Browse files
authored
Spack install instructions for Building section. (#2602)
Adds instructions for how to install AMReX using Spack to the Building with AMReX section.
1 parent fd6d649 commit 6563835

File tree

3 files changed

+41
-4
lines changed

3 files changed

+41
-4
lines changed

Docs/sphinx_documentation/source/BuildingAMReX.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,3 +743,38 @@ This capability is not supported on Windows.
743743
(3) Memory profiling is an optional feature in AMReX that is not enabled by default. It reads
744744
memory system information from the OS to give us a summary of our memory usage. This is not
745745
supported on Windows.
746+
747+
748+
.. _sec:build:spack:
749+
750+
Spack
751+
=====
752+
753+
AMReX can be installed using the scientific software package manager Spack. Spack
754+
supports multiple versions and configurations of AMReX across a wide variety of platforms
755+
and environments. To learn more about Spack visit http://www.spack.io. For system requirements and
756+
installation instructions please see https://spack.readthedocs.io/.
757+
758+
Once Spack has been downloaded and the Spack environment enabled, AMReX can be
759+
installed with the command,
760+
761+
.. code-block:: bash
762+
763+
spack install amrex
764+
765+
This will install the latest release of AMReX and required dependencies if needed.
766+
767+
AMReX can be built in several combinations of versions and configurations. Available options can
768+
be viewed by typing,
769+
770+
.. code-block:: bash
771+
772+
spack info amrex
773+
774+
For example, suppose we want to install the development version of AMReX for a two dimensional
775+
simulation with Cuda support for Cuda Architecture ``sm_60``. Then we would
776+
use the install commands,
777+
778+
.. code-block:: bash
779+
780+
spack install amrex@develop dimensions=2 +cuda cuda_arch=60

Docs/sphinx_documentation/source/BuildingAMReX_Chapter.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
Building AMReX
44
===================
55

6-
In this chapter, we discuss AMReX's build systems. Additionally, it
7-
is also possible to install AMReX using spack (https://spack.io/).
6+
In this chapter, we discuss AMReX's build systems. Additionally, it
7+
is also possible to install AMReX using Spack (https://spack.io/).
8+
For more information see the :ref:`sec:build:spack` section.
89

910
There are three ways to use AMReX's build systems. Most AMReX
1011
developers use GNU Make. With this approach, there is no installation

Docs/sphinx_documentation/source/GettingStarted.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ on a monthly basis with version number YY.MM (e.g., 17.04). The MM part of the
1212
version is incremented every month, and the YY part every year. Bug fix
1313
releases are tagged with YY.MM.patch (e.g., 17.04.1).
1414

15-
AMReX can also be obtained using spack (https://spack.io/). Assuming
16-
you have spack installed, simply type "spack install amrex".
15+
AMReX can also be obtained using Spack (https://spack.io/). Assuming
16+
you have Spack installed, simply type, ``spack install amrex``. For more
17+
information see the :ref:`sec:build:spack` section in Building AMReX.
1718

1819
Example: Hello World
1920
====================

0 commit comments

Comments
 (0)