Skip to content

Commit 1cb6e45

Browse files
authored
add suggestion about not specifying minor versions for compilers (eth-cscs#219)
1 parent a46de85 commit 1cb6e45

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docs/recipes.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,19 @@ In the following sections, we will explore each of the environment configuration
100100
The `compiler` field describes a list compilers to use to build the software stack.
101101
Each compiler toolchain is specified using toolchain and spec
102102

103-
```yaml title="compile all packages with gcc@11.3"
103+
```yaml title="compile all packages with gcc@11"
104104
compiler:
105105
- toolchain: gcc
106-
spec: gcc@11.3
106+
spec: gcc@11
107107
```
108108

109109
Sometimes two compiler toolchains are required, for example when using the `nvhpc` compilers, there are often dependencies that can't be built using the NVIDIA, or are better being built with GCC (for example `cmake`, `perl` and `netcdf-c`).
110-
The example below uses the `nvhpc` compilers with gcc@11.3.
110+
The example below uses the `nvhpc` compilers with `gcc@11`.
111111

112-
```yaml title="compile all packages with gcc@11.3"
112+
```yaml title="compile all packages with gcc@11"
113113
compiler:
114114
- toolchain: gcc
115-
spec: gcc@11.3
115+
spec: gcc@11
116116
- toolchain: llvm
117117
spec: nvhpc@22.7
118118
```
@@ -123,11 +123,14 @@ The example below uses the `nvhpc` compilers with gcc@11.3.
123123
!!! warning
124124
Stackinator does not test or support using two versions of gcc in the same toolchain.
125125

126+
!!! note
127+
It is generally advisable not to overspecify compiler version, so whenever possible constrain at most the major version.
128+
126129
The order of the compilers is significant. The first compiler is the default, and the other compilers will only be used to build packages when explicitly added to a spec.
127130
For example, in the recipe below, only `netcdf-fortran` will be built with the `nvhpc` toolchain, while the root specs `cmake` and `netcdf-c` and all dependencies will be built using the `gcc` toolchain.
128131

129132

130-
```yaml title="compile all packages with gcc@11.3"
133+
```yaml title="compile all packages with gcc@11"
131134
compiler:
132135
- toolchain: gcc
133136
spec: gcc

0 commit comments

Comments
 (0)