Skip to content

Commit edbd6d1

Browse files
Merge remote-tracking branch 'origin/main' into feat/modular-sqfs
2 parents a51de61 + 87e3554 commit edbd6d1

26 files changed

Lines changed: 225 additions & 169 deletions

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- feature/docs
7-
- master
7+
- main
88
permissions:
99
contents: write
1010
jobs:

.github/workflows/lint.yaml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
name: lint
22

3-
on:
4-
pull_request:
5-
branches: [master, main]
3+
on: [push, pull_request]
64

75
jobs:
86
lint:
97
runs-on: ubuntu-latest
108
steps:
119
- uses: actions/checkout@v3
12-
- name: Set up Python
13-
uses: actions/setup-python@v4
14-
with:
15-
python-version: "3.10"
16-
- name: Install Tools
10+
- name: Install uv
1711
run: |
18-
python -m pip install --upgrade pip
19-
python -m pip install black flake8 mypy
20-
- name: Black
12+
curl -LsSf https://astral.sh/uv/install.sh | sh
13+
- name: ruff
2114
run: |
22-
black --check --verbose stackinator unittests
23-
- name: flake8
24-
run: |
25-
flake8 --count --show-source --statistics .
15+
uvx ruff format --check
16+
uvx ruff check

.github/workflows/main.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,13 @@ name: Stackinator CI
33
on: [push, pull_request]
44

55
jobs:
6-
unittestpy36:
7-
runs-on: ubuntu-20.04
8-
strategy:
9-
matrix:
10-
python-version: ['3.6']
6+
unittestpy:
7+
runs-on: ubuntu-latest
118
steps:
129
- uses: actions/checkout@v3
13-
- name: Set up Python ${{ matrix.python-version }}
14-
uses: actions/setup-python@v4
15-
with:
16-
python-version: ${{ matrix.python-version }}
17-
- name: Bootstrap
10+
- name: Install uv
1811
run: |
19-
./bootstrap.sh
12+
curl -LsSf https://astral.sh/uv/install.sh | sh
2013
- name: Generic Unittests
2114
run: |
2215
./test_stackinator.py

bin/stack-config

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
#!/usr/bin/env python3
2-
1+
#!/usr/bin/env -S uv run --script
2+
# /// script
3+
# requires-python = ">=3.12"
4+
# dependencies = [
5+
# "jinja2",
6+
# "jsonschema",
7+
# "pyYAML",
8+
# ]
9+
# ///
310

411
import pathlib
512
import sys
613

714
prefix = pathlib.Path(__file__).parent.parent.resolve()
8-
external = prefix / 'external'
9-
sys.path = [prefix.as_posix(), external.as_posix()] + sys.path
15+
sys.path = [prefix.as_posix()] + sys.path
1016

1117
from stackinator.main import main
1218

bootstrap.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ cd stackinator
1616
./bootstrap.sh
1717
```
1818

19+
!!! warning
20+
The `main` branch of Stackinator includes features for Spack v1.0, and may break older recipes.
21+
22+
For existing recipes use Spack v0.23 and earlier, use [version 5](#versions):
23+
24+
```bash
25+
git clone --branch=releases/v5 https://github.com/eth-cscs/stackinator.git
26+
```
27+
1928
The `bootstrap.sh` script will install the necessary dependencies, so that Stackinator can be run as a standalone application.
2029

2130
Once installed, add the `bin` sub-directory to your path:
@@ -36,6 +45,18 @@ pip install stackinator
3645
The PyPi package is only updated for releases, so you will likely be missing the latest and greatest features.
3746
Let us know if you need more regular PyPi updates.
3847

48+
### Versions
49+
50+
Stackinator version 6 will be the first release of Stackinator to support Spack 1.0, when it is released in June 2025.
51+
There will be significant changes introduced in Spack 1.0, which will require making some non-trivial changes to Stackinator, and possibly adding breaking changes to the Stackinator recipe specification.
52+
53+
The git branch `releases/v5` will be maintained to provide support for all versions 0.21, 0.22 and 0.23 of Spack and existing recipes.
54+
55+
The `main` branch of Stackinator will contain
56+
57+
!!! warning
58+
After the release of version 5, the main development branch was changed from `master` to `main`.
59+
3960
## Quick Start
4061

4162
Stackinator generates the make files and spack configurations that build the spack environments that are packaged together in the spack stack.

docs/readme.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
The documentation for Stackinator is built from the markdown files in this path using MkDocs and MkDocs-material.
22
You can view the latest documentation online at [github.io](https://eth-cscs.github.io/stackinator/)
33

4-
To build a copy locally, first install `mkdocs-material`, e.g.:
4+
To view work in progress docs, run the serve script and follow the link it provides to view a local copy of the docs in your browser.
55
```bash
6-
python3 -m venv docs-env
7-
source docs-env/bin/activate
8-
pip install mkdocs-material
6+
./serve
97
```
108

11-
Then in the root of this project, build the docs and view them with your favourite browser:
12-
```bash
13-
mkdocs build
14-
firefox site/index.html
15-
```
9+
> [!IMPORTANT]
10+
> to run the serve script, you need to first install [uv](https://docs.astral.sh/uv/getting-started/installation/).
11+

docs/recipes.md

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,32 @@ spack:
2525
commit: releases/v0.20
2626
modules: true
2727
description: "HPC development tools for building MPI applications with the GNU compiler toolchain"
28+
version: 2
2829
```
2930
3031
* `name`: a plain text name for the environment
3132
* `store`: the location where the environment will be mounted.
3233
* `spack`: which spack repository to use for installation.
3334
* `modules`: _optional_ enable/diasble module file generation (default `true`).
3435
* `description`: _optional_ a string that describes the environment (default empty).
36+
* `version`: _default = 1_ the version of the uenv recipe (see below)
37+
38+
!!! note "uenv recipe versions"
39+
Stackinator 6 introduces breaking changes to the uenv recipe format, introduced to support Spack v1.0.
40+
41+
We have started versioning uenv recipes:
42+
43+
* **version 1**: original uenv recipes for Spack v0.23 and earlier, supported by Stackinator version 5.
44+
* **version 2**: uenv recipes for Spack v1.0 and later, supported by Stackinator version 6.
45+
46+
The default version is 1, so that old recipes that do not set a version are supported.
47+
48+
!!! warning "You must set version 2 explicitly to use Spack v1.0"
49+
50+
!!! warning "Version 1 recipes must be configured using Stackinator v5"
51+
Version 5 of Stackinator is maintained in the `releases/v5` branch of stackinator.
52+
53+
You must also use the `releases/v5` branch of [Alps cluster config](https://github.com/eth-cscs/alps-cluster-config).
3554

3655
## Compilers
3756

@@ -100,19 +119,19 @@ In the following sections, we will explore each of the environment configuration
100119
The `compiler` field describes a list compilers to use to build the software stack.
101120
Each compiler toolchain is specified using toolchain and spec
102121

103-
```yaml title="compile all packages with gcc@11.3"
122+
```yaml title="compile all packages with gcc@11"
104123
compiler:
105124
- toolchain: gcc
106-
spec: gcc@11.3
125+
spec: gcc@11
107126
```
108127

109128
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.
129+
The example below uses the `nvhpc` compilers with `gcc@11`.
111130

112-
```yaml title="compile all packages with gcc@11.3"
131+
```yaml title="compile all packages with gcc@11"
113132
compiler:
114133
- toolchain: gcc
115-
spec: gcc@11.3
134+
spec: gcc@11
116135
- toolchain: llvm
117136
spec: nvhpc@22.7
118137
```
@@ -123,11 +142,14 @@ The example below uses the `nvhpc` compilers with gcc@11.3.
123142
!!! warning
124143
Stackinator does not test or support using two versions of gcc in the same toolchain.
125144

145+
!!! note
146+
It is generally advisable not to overspecify compiler version, so whenever possible constrain at most the major version.
147+
126148
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.
127149
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.
128150

129151

130-
```yaml title="compile all packages with gcc@11.3"
152+
```yaml title="compile all packages with gcc@11"
131153
compiler:
132154
- toolchain: gcc
133155
spec: gcc
@@ -235,7 +257,7 @@ cuda-env:
235257
Use `unify:true` when possible, then `unify:when_possible`, and finally `unify:false`.
236258

237259
!!! warning
238-
Don't provide a spec for MPI or Compilers, which are configured in the [`mpi:`](recipes.md#mpi) and [`compilers`](recipes.compilers) fields respecively.
260+
Don't provide a spec for MPI or Compilers, which are configured in the [`mpi:`](recipes.md#mpi) and [`compilers`](recipes.md#compilers) fields respecively.
239261

240262
!!! warning
241263
Stackinator does not support "spec matrices", and likely won't, because they use multiple compiler toolchains in a manner that is contrary to the Stackinator "keep it simple" principle.
@@ -358,6 +380,22 @@ Additional custom packages can be provided as part of the cluster configuration,
358380
These packages are all optional, and will be installed together in a single Spack package repository that is made available to downstream users of the generated uenv stack.
359381
See the documentation for [cluster configuration](cluster-config.md) for more detail.
360382

383+
!!! note
384+
If you need to backport a spack package from a more recent spack version, you can do it by using an already checked out spack repository like this
385+
386+
(disclaimer: the package might need adjustments due to spack directives changes)
387+
388+
```
389+
# ensure to have the folder for custom packages in your recipe
390+
mkdir -p stackinator-recipe/repo/packages
391+
# switch to the already checked out spack repository
392+
cd $SPACK_ROOT
393+
# use git to extract package files into your "custom packages" section of the stackinator recipe
394+
git archive origin/develop `spack location -p fmt` | tar -x --strip-components=5 -C stackinator-recipe/repo/packages
395+
```
396+
397+
In the above case, the package `fmt` is backported from `origin/develop` into the `stackinator-recipe`.
398+
361399
!!! alps
362400
All packages are installed under a single spack package repository called `alps`.
363401
The CSCS configurations in [github.com/eth-cscs/alps-cluster-config](https://github.com/eth-cscs/alps-cluster-config) provides a site configuration that defines cray-mpich, its dependencies, and the most up to date versions of cuda, nvhpc etc to all clusters on Alps.

lint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
uvx ruff format
4+
uvx ruff check --fix

0 commit comments

Comments
 (0)