-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from LLNL/release/v2.3.0
Release v2.3.0
- Loading branch information
Showing
20 changed files
with
364 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule blt
updated
27 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.. _ci: | ||
|
||
====================== | ||
Continuous Integration | ||
====================== | ||
|
||
Gitlab CI | ||
--------- | ||
|
||
CHAI shares its Gitlab CI workflow with other projects. The documentation is | ||
therefore `shared`_. | ||
|
||
.. shared: <https://radiuss-ci.readthedocs.io/en/latest/uberenv.html#ci) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
.. _developer_guide: | ||
|
||
=============== | ||
Developer Guide | ||
=============== | ||
|
||
CHAI shares its Uberenv workflow with other projects. The documentation is | ||
therefore `shared`_. | ||
|
||
.. shared: <https://radiuss-ci.readthedocs.io/en/latest/uberenv.html#uberenv-guide) | ||
This page will provides some CHAI specific examples to illustrate the | ||
workflow described in the documentation. | ||
|
||
Machine specific configuration | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: bash | ||
$ ls -c1 scripts/uberenv/spack_configs | ||
blueos_3_ppc64le_ib | ||
darwin | ||
toss_3_x86_64_ib | ||
blueos_3_ppc64le_ib_p9 | ||
config.yaml | ||
CHAI has been configured for ``toss_3_x86_64_ib`` and other systems. | ||
|
||
Vetted specs | ||
^^^^^^^^^^^^ | ||
|
||
.. code-block:: bash | ||
$ ls -c1 .gitlab/*jobs.yml | ||
.gitlab/lassen-jobs.yml | ||
.gitlab/quartz-jobs.yml | ||
CI contains jobs for quartz. | ||
|
||
.. code-block:: bash | ||
$ git grep -h "SPEC" .gitlab/quartz-jobs.yml | grep "gcc" | ||
SPEC: "%[email protected]" | ||
SPEC: "%[email protected]" | ||
SPEC: "%[email protected]" | ||
SPEC: "%[email protected]" | ||
SPEC: "%[email protected]" | ||
We now have a list of the specs vetted on ``quartz``/``toss_3_x86_64_ib``. | ||
|
||
.. note:: | ||
In practice, one should check if the job is not *allowed to fail*, or even deactivated. | ||
|
||
MacOS case | ||
^^^^^^^^^^ | ||
|
||
In CHAI, the Spack configuration for MacOS contains the default compilers depending on the OS version (`compilers.yaml`), and a commented section to illustrate how to add `CMake` as an external package. You may install CMake with homebrew, for example. | ||
|
||
|
||
Using Uberenv to generate the host-config file | ||
---------------------------------------------- | ||
|
||
We have seen that we can safely use `[email protected]` on quartz. Let us ask for the default configuration first, and then ask for RAJA support and link to develop version of RAJA: | ||
|
||
.. code-block:: bash | ||
$ python scripts/uberenv/uberenv.py --spec="%[email protected]" | ||
$ python scripts/uberenv/uberenv.py --spec="%[email protected]+raja ^raja@develop" | ||
Each will generate a CMake cache file, e.g.: | ||
|
||
.. code-block:: bash | ||
hc-quartz-toss_3_x86_64_ib-clang@9.0.0-fjcjwd6ec3uen5rh6msdqujydsj74ubf.cmake | ||
Using host-config files to build CHAI | ||
------------------------------------- | ||
|
||
.. code-block:: bash | ||
$ mkdir build && cd build | ||
$ cmake -C <path_to>/<host-config>.cmake .. | ||
$ cmake --build -j . | ||
$ ctest --output-on-failure -T test | ||
It is also possible to use this configuration with the CI script outside of CI: | ||
|
||
.. code-block:: bash | ||
$ HOST_CONFIG=<path_to>/<host-config>.cmake scripts/gitlab/build_and_test.sh | ||
Testing new dependencies versions | ||
--------------------------------- | ||
|
||
CHAI depends on Umpire, and optionally CHAI. Testing with newer versions of both is made straightforward with Uberenv and Spack: | ||
|
||
* ``$ python scripts/uberenv/uberenv.py --spec=%[email protected] ^umpire@develop`` | ||
* ``$ python scripts/uberenv/uberenv.py --spec=%[email protected]+raja ^raja@develop`` | ||
|
||
Those commands will install respectively `umpire@develop` and `raja@develop` locally, and generate host-config files with the corresponding paths. | ||
|
||
Again, the CI script can be used directly to install, build and test in one command: | ||
|
||
.. code-block:: bash | ||
$ SPEC="%[email protected] ^umpire@develop" scripts/gitlab/build_and_test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,93 +4,12 @@ | |
Developer Guide | ||
=============== | ||
|
||
Generating CHAI host-config files | ||
=================================== | ||
This section aims at gathering information useful to the developer. | ||
|
||
.. note:: | ||
This mechanism will generate a cmake configuration file that reproduces the configuration `Spack <https://github.com/spack/spack>` would have generated in the same context. It will contain all the information necessary to build CHAI with the described toolchain. | ||
In particular, the local build scenarios as well as CI testing will be discussed here. | ||
|
||
In particular, the host config file will setup: | ||
* flags corresponding with the target required (Release, Debug). | ||
* compilers path, and other toolkits (cuda if required), etc. | ||
* paths to installed dependencies. | ||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
This provides an easy way to build CHAI based on `Spack <https://github.com/spack/spack>` itself driven by `Uberenv <https://github.com/LLNL/uberenv>`_. | ||
|
||
Uberenv role | ||
------------ | ||
|
||
Uberenv helps by doing the following: | ||
|
||
* Pulls a blessed version of Spack locally | ||
* If you are on a known operating system (like TOSS3), we have defined compilers and system packages so you don't have to rebuild the world (CMake typically in CHAI). | ||
* Overrides CHAI Spack packages with the local one if it exists. (see ``scripts/uberenv/packages``). | ||
* Covers both dependencies and project build in one command. | ||
|
||
Uberenv will create a directory ``uberenv_libs`` containing a Spack instance with the required CHAI dependencies installed. It then generates a host-config file (``<config_dependent_name>.cmake``) at the root of CHAI repository. | ||
|
||
Using Uberenv to generate the host-config file | ||
---------------------------------------------- | ||
|
||
.. code-block:: bash | ||
$ python scripts/uberenv/uberenv.py | ||
.. note:: | ||
On LC machines, it is good practice to do the build step in parallel on a compute node. Here is an example command: ``srun -ppdebug -N1 --exclusive python scripts/uberenv/uberenv.py`` | ||
|
||
Unless otherwise specified Spack will default to a compiler. It is recommended to specify which compiler to use: add the compiler spec to the ``--spec`` Uberenv command line option. | ||
|
||
On blessed systems, compiler specs can be found in the Spack compiler files in our repository: ``scripts/uberenv/spack_configs/<System type>/compilers.yaml``. | ||
|
||
Some examples uberenv options: | ||
|
||
* ``--spec=%[email protected]`` | ||
* ``--spec=%[email protected]+cuda`` | ||
* ``--prefix=<Path to uberenv build directory (defaults to ./uberenv_libs)>`` | ||
|
||
It is also possible to use the CI script outside of CI: | ||
|
||
.. code-block:: bash | ||
$ SPEC="%[email protected] +cuda" scripts/gitlab/build_and_test.sh --deps-only | ||
Building dependencies can take a long time. If you already have a Spack instance you would like to reuse (in supplement of the local one managed by Uberenv), you can do so changing the uberenv command as follow: | ||
|
||
.. code-block:: bash | ||
$ python scripts/uberenv/uberenv.py --upstream=<path_to_my_spack>/opt/spack | ||
Using host-config files to build CHAI | ||
------------------------------------- | ||
|
||
When a host-config file exists for the desired machine and toolchain, it can easily be used in the CMake build process: | ||
|
||
.. code-block:: bash | ||
$ mkdir build && cd build | ||
$ cmake -C <path_to>/[email protected] .. | ||
$ cmake --build -j . | ||
$ ctest --output-on-failure -T test | ||
It is also possible to use the CI script outside of CI: | ||
|
||
.. code-block:: bash | ||
$ HOST_CONFIG=<path_to>/<host-config>.cmake scripts/gitlab/build_and_test.sh | ||
Testing new dependencies versions | ||
--------------------------------- | ||
|
||
CHAI depends on Umpire, and optionally RAJA. Testing with newer versions of both is made straightforward with Uberenv and Spack: | ||
|
||
* ``$ python scripts/uberenv/uberenv.py --spec=%[email protected] ^umpire@develop`` | ||
* ``$ python scripts/uberenv/uberenv.py --spec=%[email protected]+raja ^raja@develop`` | ||
|
||
Those commands will install respectively `umpire@develop` and `raja@develop` locally, and generate host-config files with the corresponding paths. | ||
|
||
Again, the CI script can be used directly to install, build and test in one command: | ||
|
||
.. code-block:: bash | ||
$ SPEC="%[email protected] ^umpire@develop" scripts/gitlab/build_and_test.sh | ||
developer/ci.rst | ||
developer/uberenv.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.