|
1 |
| -.. Copyright 2022-2024 Google LLC |
| 1 | +.. Copyright 2022-2024 The Ramble Authors |
2 | 2 |
|
3 | 3 | Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
4 | 4 | https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
@@ -54,31 +54,31 @@ Ramble provides several configuration scopes, which are used to denote
|
54 | 54 | precedence of configuration options. In precedence order (from lowest to
|
55 | 55 | highest) Ramble contains the following scopes:
|
56 | 56 |
|
57 |
| -(1) **default**: Stored in ``$(prefix)/etc/ramble/defaults/``. These are the |
58 |
| -default settings provided with Ramble. Users should generally not modify these |
59 |
| -settings, and instead use a higher precedence configuration scope. These |
60 |
| -defaults will change from version to version of Ramble. |
61 |
| -(2) **system**: Store in ``/etc/ramble/``. These are Ramble settings for an |
62 |
| -entire machine. These settings are typically managed by a systems |
63 |
| -administrator, or something with root access on the machine. Settings defined |
64 |
| -in this scope override settings in the **default** scope. |
65 |
| -(3) **site**: Stored in ``$(prefix)/etc/ramble/``. Settings here only affect |
66 |
| -*this instance* of Ramble, and they override both the **default** and |
67 |
| -**system** scopes. |
68 |
| -(4) **user**: Stored in ``~/.ramble/``. Settings here only affect a specific |
69 |
| -user, and override **default**, **system**, and **site** scopes. |
70 |
| -(5) **custom**: Stored in a custom directory, specified by ``--config-scope``. |
71 |
| -If multiple scopes are listed on the command line, they are ordered from lowest |
72 |
| -to highest precedence. Settings here override all previously defined scoped. |
73 |
| -(6) **workspace configs dir**: Stored in ``$(workspace_root)/configs`` |
74 |
| -generally as a ``<config_section>.yaml`` file (i.e. ``variables.yaml``). These |
75 |
| -settings apply to a specific workspace, and override all previous configuration |
76 |
| -scopes. |
77 |
| -(7) **workspace configuration file**: Stored in |
78 |
| -``$(workspace_root)/configs/ramble.yaml``. Configuration scopes defined within |
79 |
| -this config file override all previously defined configuration scopes. |
80 |
| -(8) **command line**: Configuration options defined on the command line take |
81 |
| -precedence over all other scopes. |
| 57 | +1. **default**: Stored in ``$(prefix)/etc/ramble/defaults/``. These are the |
| 58 | + default settings provided with Ramble. Users should generally not modify these |
| 59 | + settings, and instead use a higher precedence configuration scope. These |
| 60 | + defaults will change from version to version of Ramble. |
| 61 | +2. **system**: Store in ``/etc/ramble/``. These are Ramble settings for an |
| 62 | + entire machine. These settings are typically managed by a systems |
| 63 | + administrator, or something with root access on the machine. Settings defined |
| 64 | + in this scope override settings in the **default** scope. |
| 65 | +3. **site**: Stored in ``$(prefix)/etc/ramble/``. Settings here only affect |
| 66 | + *this instance* of Ramble, and they override both the **default** and |
| 67 | + **system** scopes. |
| 68 | +4. **user**: Stored in ``~/.ramble/``. Settings here only affect a specific |
| 69 | + user, and override **default**, **system**, and **site** scopes. |
| 70 | +5. **custom**: Stored in a custom directory, specified by ``--config-scope``. |
| 71 | + If multiple scopes are listed on the command line, they are ordered from lowest |
| 72 | + to highest precedence. Settings here override all previously defined scoped. |
| 73 | +6. **workspace configs dir**: Stored in ``$(workspace_root)/configs`` |
| 74 | + generally as a ``<config_section>.yaml`` file (i.e. ``variables.yaml``). These |
| 75 | + settings apply to a specific workspace, and override all previous configuration |
| 76 | + scopes. |
| 77 | +7. **workspace configuration file**: Stored in |
| 78 | + ``$(workspace_root)/configs/ramble.yaml``. Configuration scopes defined within |
| 79 | + this config file override all previously defined configuration scopes. |
| 80 | +8. **command line**: Configuration options defined on the command line take |
| 81 | + precedence over all other scopes. |
82 | 82 |
|
83 | 83 | Each configuration directory may contain several configuration files, such as
|
84 | 84 | ``config.yaml``, ``variables.yaml``, or ``modifiers.yaml``. When configurations
|
@@ -262,9 +262,14 @@ The format of this config section is as follows:
|
262 | 262 | The above example is general, and intended to show the available functionality
|
263 | 263 | of configuring environment variables. Below the ``env_vars`` level, one of four
|
264 | 264 | actions is available. These actions are:
|
265 |
| -* ``set`` - Define a variable equal to a given value. Overwrites previously configured values |
266 |
| -* ``append`` - Append the given value to the end of a previous variable definition. Delimited for vars is defined by ``var_separator``, ``paths`` uses ``:`` |
267 |
| -* ``prepend`` - Prepent the given value to the beginning of a previous variable definition. Only supports paths, delimiter is ``:`` |
| 265 | + |
| 266 | +* ``set`` - Define a variable equal to a given value. Overwrites previously |
| 267 | + configured values |
| 268 | +* ``append`` - Append the given value to the end of a previous variable |
| 269 | + definition. Delimited for vars is defined by ``var_separator``, ``paths`` |
| 270 | + uses ``:`` |
| 271 | +* ``prepend`` - Prepent the given value to the beginning of a previous variable |
| 272 | + definition. Only supports paths, delimiter is ``:`` |
268 | 273 | * ``unset`` - Remove a variable definition, if it is set.
|
269 | 274 |
|
270 | 275 | .. _formatted-execs-config:
|
@@ -471,7 +476,6 @@ environments created from those packages. Its format is as follows:
|
471 | 476 | .. code-block:: yaml
|
472 | 477 |
|
473 | 478 | spack:
|
474 |
| - concretized: [True/False] # Should be false unless defined in a concretized workspace |
475 | 479 | [variables: {}]
|
476 | 480 | packages:
|
477 | 481 | <package_name>:
|
@@ -517,70 +521,21 @@ Below is an annotated example of the spack dictionary.
|
517 | 521 | gcc9: # Abstract name to refer to this package
|
518 | 522 | spack_spec: [email protected] target=x86_64 # Spack spec for this package
|
519 | 523 | compiler_spec: [email protected] # Spack compiler spec for this package
|
520 |
| - impi2018: |
521 |
| - spack_spec: intel-mpi@2018.4.274 target=x86_64 |
| 524 | + impi2021: |
| 525 | + spack_spec: intel-oneapi-mpi@2021.11.0 target=x86_64 |
522 | 526 | compiler: gcc9 # Other package name to use as compiler for this package
|
523 | 527 | gromacs:
|
524 | 528 |
|
525 | 529 | compiler: gcc9
|
526 | 530 | environments:
|
527 | 531 | gromacs:
|
528 | 532 | packages: # List of packages to include in this environment
|
529 |
| - - impi2018 |
| 533 | + - impi2021 |
530 | 534 | - gromacs
|
531 | 535 |
|
532 |
| -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
533 |
| -Vector and Matrix Packages and Environments: |
534 |
| -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
535 |
| - |
536 |
| -Package and environment definitions can generate many packages and environments |
537 |
| -following Ramble's |
538 |
| -:ref:`vector<ramble-vector-logic>` / :ref:`matrix<ramble-matrix-logic>` logic. |
539 |
| - |
540 |
| -Below is an example of using this logic within the spack dictionary: |
541 |
| - |
542 |
| -.. code-block:: yaml |
543 |
| -
|
544 |
| - spack: |
545 |
| - packages: |
546 |
| - gcc-{ver}: |
547 |
| - variables: |
548 |
| - ver: ['9.3.0', '10.3.0', '12.2.0'] |
549 |
| - spack_spec: gcc@{ver} target=x86_64 |
550 |
| - compiler_spec: gcc@{ver} |
551 |
| - intel-mpi-{comp}: |
552 |
| - variables: |
553 |
| - comp: gcc-{ver} |
554 |
| - ver: ['9.3.0', '10.3.0', '12.2.0'] |
555 |
| - |
556 |
| - compiler: {comp} |
557 |
| - openmpi-{comp}: |
558 |
| - variables: |
559 |
| - comp: gcc-{ver} |
560 |
| - ver: ['9.3.0', '10.3.0', '12.2.0'] |
561 |
| - |
562 |
| - compiler: {comp} |
563 |
| - wrf-{comp}: |
564 |
| - variables: |
565 |
| - comp: gcc-{ver} |
566 |
| - ver: ['9.3.0', '10.3.0', '12.2.0'] |
567 |
| - |
568 |
| - compiler: {comp} |
569 |
| - environments: |
570 |
| - wrf-{comp}-{mpi}: |
571 |
| - variables: |
572 |
| - comp: gcc-{ver} |
573 |
| - ver: ['9.3.0', '10.3.0', '12.2.0'] |
574 |
| - mpi: [intel-mpi-{comp}, openmpi-{comp}'] |
575 |
| - matrix: |
576 |
| - - mpi |
577 |
| - packages: |
578 |
| - - {mpi} |
579 |
| - - wrf-{comp} |
580 |
| -
|
581 |
| -The above file will generate 3 versions of ``gcc``, 3 versions each of ``wrf``, |
582 |
| -``intel-mpi`` and ``openmpi`` built with each ``gcc`` version, and 6 spack |
583 |
| -environments, with each combination of the 2 ``mpi`` libraries and 3 compilers. |
| 536 | +Packages and environments defined inside the ``spack`` config section are |
| 537 | +merely templates. They will be rendered into explicit environments and packages |
| 538 | +by each individual experiment. |
584 | 539 |
|
585 | 540 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
586 | 541 | External Spack Environment Support:
|
|
0 commit comments