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
Copy file name to clipboardexpand all lines: docs/build_guide/include/appendecies/custom_spack_install_notes.rst.inc
-2
Original file line number
Diff line number
Diff line change
@@ -5,5 +5,3 @@ Building Spheral TPLs with your own Spack installation will require deeper knowl
5
5
6
6
- Point your spack instances `repo <https://spack.readthedocs.io/en/latest/repositories.html?highlight=repo#spack-repo>`_ at the ``scripts/spack/packages/`` dir. This contains all of our changes to spack packages that have not yet made it to upstream Spack.
7
7
- You will want to model your ``compiler.yaml`` and ``packages.yaml`` files off of those found in ``scripts/spack/configs/`` (`Spack Configuration Files <https://spack.readthedocs.io/en/latest/configuration.html#configuration>`_).
8
-
9
-
Further notes on setting up Spack and how it is used with the Spheral dev-tools scripts can be found in `Development Documentation: Spheral Spack / Uberenv <Development_Documentation.html#spheral-spack-uberenv>`_.
Copy file name to clipboardexpand all lines: docs/build_guide/include/cloning.rst.inc
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
----------------------------------------
4
4
5
5
[git_clone-section-start]
6
-
If you use git to clone the Spheral source be aware Spheral includes git submodules: `BLT <https://github.com/LLNL/blt>`_ and `Uberenv <https://github.com/LLNL/uberenv>`_. In order to ensure such submodules are properly downloaded when cloning Spheral be sure to use the ``--recursive`` git option:
This command sequence assumes ``gcc`` is installed and will use the version in your system path. If you wish to use a different compiler (such as ``clang``) ensure it is in your path and replace ``gcc`` with the compiler name of your choice (e.g. ``clang``).
@@ -56,7 +56,7 @@ Build our TPL dependencies from source with the Spheral tpl-management tool (``t
56
56
Build our TPL dependencies from source with the Spheral tpl-management tool (``tpl-manager.py``).
Copy file name to clipboardexpand all lines: docs/build_guide/include/tpls.rst.inc
+18-43
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Spheral provides a tool (``tpl-manager.py``) in an attempt to simplify the spack
17
17
- Set up a local ``Spack`` instance for Spheral.
18
18
- Generate a dependency tree of third party libraries (relative to the provided configuration).
19
19
- Build and install all dependent libraries in the local ``Spack`` instance.
20
-
- Generate a `CMake host-config <https://llnl-blt.readthedocs.io/en/develop/tutorial/host_configs.html>`_ file for configuring Spheral builds.
20
+
- Generate a `CMake host-config <https://llnl-blt.readthedocs.io/en/develop/tutorial/host_configs.html>`_ file for configuring Spheral builds (if a spec is given).
21
21
22
22
``tpl-manager`` is located at ``scripts/devtools/tpl-manager.py``. ``tpl-manager`` can be used in two ways:
23
23
@@ -29,7 +29,7 @@ Spheral provides a tool (``tpl-manager.py``) in an attempt to simplify the spack
29
29
[ex_tpl_manager_notes-start]
30
30
31
31
.. note:
32
-
The External User Guide does not cover building the full range of tpl configurations. Please see the LC User Guide for more informtaion.
32
+
The External User Guide does not cover building the full range of tpl configurations. Please see the LC User Guide for more information.
33
33
34
34
[ex_tpl_manager_notes-end]
35
35
[lc_tpl_manager_notes-start]
@@ -47,56 +47,31 @@ Running tpl-manager
47
47
48
48
``tpl-manager`` requires ``python3`` and should be run from the root Spheral directory.
49
49
50
-
``tpl-manager`` takes a ``--spec`` argument to determine what compiler to use and what configuration we want to build Spheral in.
``tpl-manager`` takes a ``--spec`` argument to determine what compiler to use and what configuration we want to build Spheral in. For example,
55
51
56
-
This will install the local Spheral Spack instance into the adjacent directory of your Spheral root dir. You can use ``--spheral-spack-dir`` if you would like to setup the spack instance somewhere else.
57
-
58
-
Above we are telling ``tpl-manager`` to build our TPLs with the ``gcc`` that is in our path. By default this will build with ``+mpi`` support, however we can disable ``mpi`` support for the TPLs and Spheral by appending ``~mpi`` to our spec.
By default we have ``python`` bindings enabled (``+python``) and docs disabled (``~docs``). Therefore the spec ``gcc+mpi+python~docs`` will build the same TPL set as just ``gcc``.For more information on ``spec`` syntax please see the spack documentation on `specs-dependencies <https://spack.readthedocs.io/en/latest/basic_usage.html#specs-dependencies>`_.
Spheral minimally requires a C++14 compliant compiler.
56
+
This will download a new Spack instance in a directory adjacent to your Spheral root directory called ``spheral-spack-tpls/spack``. You can use ``--spack-dir`` if you would like to setup the Spack instance somewhere else. By default, Spheral is built with MPI support unless the spec is appended with ``~mpi``. The ``%`` symbol denotes the compiler to use.
68
57
69
-
ERROR: invalid spack config dir
70
-
===============================
58
+
When run for the first time, ``tpl-manager`` will do a few things:
71
59
72
-
If you are trying to run ``tpl-manager.py`` on an operating system other than Ubuntu20.04, you will
#. Create and activate a Spack environment in ``spheral/scripts/spack/environments`` based on the output of ``spack arch``. All subsequent Spack commands will modify this environment by adding specs, compilers, and external packages to it.
75
61
76
-
We define configuration files for Ubuntu20.04, as well as our common LLNL operating systems.
77
-
You will need to create a set of files for your own system.
62
+
#. Run ``spack compiler find`` to find system compilers. Spack searches the ``$PATH`` environment variable for compilers and packages. Add any paths to ``$PATH`` to ensure Spack will find them before running the ``tpl-manager``.
78
63
79
-
The configuration files tell spack where the packages installed in :ref:`Required System Packages`
80
-
are located and what version they are. We have provided a ``generic`` set of config files to
81
-
help in setting this up for you.
64
+
#. Run ``spack external find --not-buildable`` It will run Spack commands to try to find existing system installs for things like CMake, Git, Python, and MPICH (when the spec has ``+mpi``).
82
65
83
-
#. Copy the directory ``scripts/spack/configs/generic`` to ``scripts/spack/config/<OperatingSystem><Version>`` (you want to match the name of the directory to the one ``tpl-manager.py`` expects to find).
66
+
#. Add the current spec to the environment with ``spack add <spec>`` and concretize using ``spack concretize -U``.
84
67
68
+
#. Install the TPLs and create the host config file for the given spec with ``spack install -u initconfig <spec>``.
85
69
86
-
#. For each package within the ``packages.py`` file of your new folder edit the version number to be the same as
87
-
what is installed on your system. There are a number of ways to retrieve versions for a given package:
88
-
89
-
* Most version numbers should be searchable through your package manager, there are however, some system libraries that may not be managed by your package manager.
90
-
91
-
* If the package has an executable, often you can run with some form of ``-V`` or ``--version``. e.g. for mpich:``mpiexec --version`` will report the MPI version.
92
-
93
-
* For packages that only provide libraries, often the system library will be symlinked to one with the version as the extension. e.g. ``ls -lha /usr/lib/x86_64_gnu-linux/libreadlines.so`` will show it is symlinked to ``libreadlines.so.8.1``.
94
-
95
-
96
-
#. Each package requires the ``prefix:`` of the installation be provided. In most cases ``/usr`` is sufficient. Typically packages installed with a package manager will place files in: ``/usr/bin``, ``/usr/share``, ``/usr/lib``, ``/usr/lib64``, sometimes ``/usr/lib/x86_64.../``. Here the common prefix is ``/usr``.
97
-
98
-
* If you are building Spheral on a system where you don't have permissions to run package manager and install to ``/usr``, then you might have installed the system packages somewhere else. In that case, replace the ``prefix:`` path for those given packages as necessary.
70
+
.. note::
71
+
By default we have ``python`` bindings enabled (``+python``) and docs disabled (``~docs``). Therefore the spec ``spheral%gcc+mpi+python~docs`` will build the same TPL set as just ``spheral%gcc``.For more information on ``spec`` syntax please see the spack documentation on `specs-dependencies <https://spack.readthedocs.io/en/latest/basic_usage.html#specs-dependencies>`_.
99
72
73
+
.. note::
74
+
Spheral minimally requires a C++14 compliant compiler.
This will install the local Spheral Spack instance into the adjacent directory of your Spheral root dir. You can use ``--spheral-spack-dir`` if you would like to setup the spack instance somewhere else.
90
+
This will install the local Spheral Spack instance into the adjacent directory of your Spheral root dir. You can use ``--spack-dir`` if you would like to setup the spack instance somewhere else.
116
91
117
92
.. warning::
118
93
If running on LC be sure to launch ``tpl-manager`` in a resource allocation, as ``tpl-manager`` will take advantage of parallel builds when compiling libraries. An example appropriate for use on rzgenie would be::
@@ -135,7 +110,7 @@ CUDA Support
135
110
136
111
To build Spheral TPLs and configure Spheral to build with CUDA on LC systems we need to add the spack variant ``+cuda`` to our spec. We also need to define the cuda hardware architecture we are targetting Spheral to run on. This can be done with ``cuda_arch=XX``. On most LC NVIDIA systems we will be targetting ``sm_70`` architecture. Therefore a gcc spec with cuda support will look as such.::
Copy file name to clipboardexpand all lines: docs/build_guide/include/updating.rst.inc
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
----------------------------------------
4
4
5
5
[git_update-section-start]
6
-
When you want/need to update an existing clone of the Spheral GitHub repository, you need to be aware Spheral includes git submodules: `BLT <https://github.com/LLNL/blt>`_ and `Uberenv <https://github.com/LLNL/uberenv>`_. In order to ensure such submodules are properly updated you should update using the following git commands:
Copy file name to clipboardexpand all lines: docs/developer/dev/submodules.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Submodules
2
2
##########
3
3
4
-
Spheral uses submodules to rbing other codes/project directly into our source tree, such as BLT, and Uberenv. This guide explains some of the common practices one might want to perform with submodules during Spheral development.
4
+
Spheral uses submodules to rbing other codes/project directly into our source tree, such as BLT, and PYB11Generator. This guide explains some of the common practices one might want to perform with submodules during Spheral development.
0 commit comments