Skip to content

Commit dd6740b

Browse files
authored
Updates for spack-stack: gsibec, fms, pfunit (#1908)
This PR has updates for spack-stack v2.1. It's mainly involved with: * Add pFUnit 4.15.0 ([INSTALL]: pfunit 4.15.0 #1840) * Add FMS 2025.03 ([INSTALL]: for spack-stack-2.0, update to fms@2025.03 #1547) * Add gsibec 1.4.2 ([INSTALL]: for spack-stack-2.1, update to gsibec@1.4.2 #1648) * Remove sp library (Remove sp library in spack-stack-1.9.0 --> spack-stack-2.1.0 #1330) I've also added a new ifx testing stack/setup for NAS as well as my testing for NAS-TOSS5 (see #1905 and #1907 )
1 parent 9da3419 commit dd6740b

37 files changed

+739
-160
lines changed

configs/common/packages.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,12 @@ packages:
158158
- '@2.6.4'
159159
fms:
160160
require:
161-
- '@2024.02'
161+
- '@2025.03'
162162
- precision=32,64
163163
- +quad_precision
164164
- +openmp
165165
- +pic
166166
- build_type=Release
167-
- +deprecated_io
168167
- any_of:
169168
- +gfs_phys constants=GFS
170169
- ~gfs_phys constants=GEOS
@@ -199,7 +198,7 @@ packages:
199198
- '@1.4.0'
200199
gsibec:
201200
require:
202-
- '@1.2.1'
201+
- '@1.4.2'
203202
gsi-ncdiag:
204203
require:
205204
- '@1.1.2'
@@ -349,6 +348,10 @@ packages:
349348
pflogger:
350349
require:
351350
- +mpi
351+
pfunit:
352+
require:
353+
- +mpi
354+
- +fhamcrest
352355
pixman:
353356
require:
354357
- +pic
@@ -480,10 +483,6 @@ packages:
480483
snappy:
481484
require:
482485
- +shared
483-
sp:
484-
require:
485-
- '@2.5.0'
486-
- precision=4,d,8
487486
udunits:
488487
require:
489488
- '@2.2.28'

configs/containers/specs/jedi-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
fms@2024.02,
2222
g2@3.5.1,
2323
g2tmpl@1.17.0,
24-
gsibec@1.2.1,
24+
gsibec@1.4.2,
2525
hdf@4.2.15,
2626
hdf5@1.14.5,
2727
ip@5.4.0,

configs/sites/tier1/acorn/packages_intel-19.1.3.304.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ packages:
9191
go:
9292
require: ['%gcc']
9393
gsibec:
94-
require: ['@1.2.1']
94+
require: ['@1.4.2']
9595
harfbuzz:
9696
require: ['%gcc']
9797
libffi:

configs/sites/tier1/acorn/packages_oneapi-2024.2.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ packages:
7676
glib:
7777
require: ['%gcc']
7878
gsibec:
79-
require: ['@1.2.1']
79+
require: ['@1.4.2']
8080
libtiff:
8181
require: ['build_system=cmake']
8282
nco:

configs/sites/tier1/aws-pcluster/packages_intel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ packages:
2828
- '@1.2.0 ~mkl +fftw'
2929
gsibec:
3030
require::
31-
- '@1.2.1 ~mkl'
31+
- '@1.4.2 ~mkl'
3232
py-numpy:
3333
require::
3434
- '^openblas'

configs/sites/tier1/hera/packages_intel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ packages:
2727
- '@1.2.0 ~mkl +fftw'
2828
gsibec:
2929
require::
30-
- '@1.2.1 ~mkl'
30+
- '@1.4.2 ~mkl'
3131
py-numpy:
3232
require::
3333
- '^openblas'

configs/sites/tier1/hera/packages_oneapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ packages:
2929
- '@1.2.0 ~mkl +fftw'
3030
gsibec:
3131
require::
32-
- '@1.2.1 ~mkl'
32+
- '@1.4.2 ~mkl'
3333
py-numpy:
3434
require::
3535
- '@1.26'
Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
# How to Build **spack-stack** at NAS on TOSS5
2+
3+
This guide documents how to build **spack-stack** on NASA NAS TOSS5 systems. The previous install process used three stages across compute and login nodes, but recent testing shows installation can now be done directly on a compute node.
4+
5+
---
6+
7+
## Table of Contents
8+
9+
- [Overview](#overview)
10+
- [Machines Required](#machines-required)
11+
- [Clone spack-stack](#clone-spack-stack)
12+
- [Obtain an Interactive Compute Node](#obtain-an-interactive-compute-node)
13+
- [Setup spack-stack](#setup-spack-stack)
14+
- [Create Environments](#create-environments)
15+
- [oneAPI - ifx Environment](#oneapi---ifx-environment)
16+
- [oneAPI - ifort Environment](#oneapi---ifort-environment)
17+
- [GCC Environment](#gcc-environment)
18+
- [Activate the Environment](#activate-the-environment)
19+
- [Concretize the Environment](#concretize-the-environment)
20+
- [Create Source Cache (LOGIN NODE ONLY)](#create-source-cache-login-node-only)
21+
- [Pre-Fetch Cargo Dependencies (LOGIN NODE ONLY)](#pre-fetch-cargo-dependencies-login-node-only)
22+
- [Install Packages (COMPUTE NODE)](#install-packages-compute-node)
23+
- [Update Module Files](#update-module-files)
24+
- [Deactivate the Environment](#deactivate-the-environment)
25+
- [Debugging Package Builds](#debugging-package-builds)
26+
- [Deprecated: Legacy Three-Step Install](#deprecated-legacy-three-step-install)
27+
28+
---
29+
30+
## Overview
31+
32+
NAS login nodes and compute nodes have different constraints:
33+
34+
- **Login nodes**:
35+
- Have internet access
36+
- Limited to **2 processes**
37+
38+
- **Compute nodes** (Turin):
39+
- No internet access
40+
- Allow parallel builds
41+
42+
Use login nodes for setup steps that require internet access (e.g., concretization, mirroring sources, pre-fetching Cargo dependencies), then run installation on a compute node.
43+
44+
The install step itself is now a single compute-node command.
45+
46+
---
47+
48+
## Machines Required
49+
50+
You will need:
51+
52+
- **A login node**
53+
Used for setup steps that require internet access.
54+
55+
- **A Turin compute node**
56+
Used for package installation with higher parallelism.
57+
58+
---
59+
60+
## Clone spack-stack
61+
62+
Use the appropriate branch or tag:
63+
64+
```bash
65+
git clone --recurse-submodules https://github.com/JCSDA/spack-stack.git -b spack-stack-2.1.0 spack-stack-2.1.0
66+
```
67+
68+
---
69+
70+
## Obtain an Interactive Compute Node
71+
72+
NAS login nodes allow only **2 processes**, so use:
73+
74+
```bash
75+
qsub -I -V -X -l select=1:ncpus=128:mpiprocs=128:model=tur_ath -l walltime=12:00:00 -W group_list=s1873 -m b -N Interactive
76+
```
77+
78+
This gives a **Turin** compute node for up to 12 hours.
79+
80+
---
81+
82+
## Setup spack-stack
83+
84+
Run on a **login node with internet**:
85+
86+
```bash
87+
cd spack-stack-2.1.0
88+
. setup.sh
89+
```
90+
91+
---
92+
93+
## Create Environments
94+
95+
You only need to create each environment once.
96+
97+
### oneAPI - ifx Environment
98+
99+
```bash
100+
spack stack create env --name ue-oneapi-2025.3.0 --template unified-dev --site nas-toss5 --compiler=oneapi-2025.3.0
101+
cd envs/ue-oneapi-2025.3.0
102+
```
103+
104+
### oneAPI - ifort Environment
105+
106+
```bash
107+
spack stack create env --name ue-oneapi-2024.2.0 --template unified-dev --site nas-toss5 --compiler=oneapi-2024.2.0
108+
cd envs/ue-oneapi-2024.2.0
109+
```
110+
111+
### GCC Environment
112+
113+
```bash
114+
spack stack create env --name ue-gcc-14.2.1 --template unified-dev --site nas-toss5 --compiler=gcc-14.2.1
115+
cd envs/ue-gcc-14.2.1
116+
```
117+
118+
---
119+
120+
## Activate the Environment
121+
122+
```bash
123+
spack env activate .
124+
```
125+
126+
> **Important:** Run this in *every* terminal where you plan to run Spack commands.
127+
128+
---
129+
130+
## Concretize the Environment
131+
132+
Run on a **login node** (internet required for bootstrapping Clingo and other tools):
133+
134+
```bash
135+
spack concretize 2>&1 | tee log.concretize ; bell
136+
```
137+
138+
### Optional `bell` helper
139+
140+
```bash
141+
bell() { tput bel ; printf "\nFinished at: " ; date; }
142+
```
143+
144+
---
145+
146+
## Create Source Cache (LOGIN NODE ONLY)
147+
148+
This downloads all source tarballs for your environment:
149+
150+
```bash
151+
spack mirror create -a -d /swbuild/gmao_SIteam/spack-stack/source-cache
152+
```
153+
154+
> ⚠️ **Do not run this outside an activated environment.**
155+
> Otherwise Spack will attempt to mirror **every** known package/version.
156+
157+
---
158+
159+
## Pre-Fetch Cargo Dependencies (LOGIN NODE ONLY)
160+
161+
Rust packages frequently require network access during build. Pre-fetch their dependencies:
162+
163+
```bash
164+
export CARGO_HOME=/swbuild/gmao_SIteam/spack-stack/cargo-cache
165+
../../util/fetch_cargo_deps.py
166+
```
167+
168+
> ⚠️ **Set `CARGO_HOME` on compute nodes** before running `spack install`.
169+
170+
---
171+
172+
## Install Packages (COMPUTE NODE)
173+
174+
Run installation on a **compute node**:
175+
176+
```bash
177+
export CARGO_HOME=/swbuild/gmao_SIteam/spack-stack/cargo-cache
178+
spack install -j 16 --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install ; bell
179+
```
180+
181+
This replaces the former compute → login → compute install sequence.
182+
183+
> **Note:** You may need to re-run this command multiple times. Some builds fail intermittently but succeed on retry.
184+
185+
---
186+
187+
## Update Module Files
188+
189+
After installation completes, run:
190+
191+
```bash
192+
spack module tcl refresh -y --delete-tree ; bell
193+
spack stack setup-meta-modules
194+
```
195+
196+
---
197+
198+
## Deactivate the Environment
199+
200+
```bash
201+
spack env deactivate
202+
```
203+
204+
---
205+
206+
## Debugging Package Builds
207+
208+
```bash
209+
spack clean
210+
spack stage <package>
211+
spack build-env <package> -- bash --norc --noprofile
212+
```
213+
214+
This drops you into a clean build environment with the package’s full compiler/runtime environment loaded.
215+
216+
---
217+
218+
## Deprecated: Legacy Three-Step Install
219+
220+
> ⚠️ **Deprecated:** Keep this only as historical reference. Prefer the single compute-node install above.
221+
222+
Older workflows used three stages:
223+
224+
1. Compute node: build dependencies for Rust-related Python packages and ecFlow.
225+
2. `athfe` login node: build `py-cryptography`, `py-maturin`, `py-rpds-py`, and `ecflow` with `-j 2`.
226+
3. Compute node: run full `spack install` to finish remaining packages.
227+
228+
Typical commands were:
229+
230+
```bash
231+
# Step 1 (compute node)
232+
export CARGO_HOME=/swbuild/gmao_SIteam/spack-stack/cargo-cache
233+
spack install -j 16 --verbose --fail-fast --show-log-on-error --no-check-signature \
234+
--only dependencies py-cryptography py-maturin py-rpds-py ecflow 2>&1 | tee log.install.deps-for-rust-and-ecflow ; bell
235+
236+
# Step 2 (athfe login node)
237+
export CARGO_HOME=/swbuild/gmao_SIteam/spack-stack/cargo-cache
238+
spack install -j 2 -p 1 --verbose --fail-fast --show-log-on-error --no-check-signature \
239+
py-cryptography py-maturin py-rpds-py ecflow 2>&1 | tee log.install.rust-and-ecflow ; bell
240+
241+
# Step 3 (compute node)
242+
export CARGO_HOME=/swbuild/gmao_SIteam/spack-stack/cargo-cache
243+
spack install -j 16 --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install.after-cargo ; bell
244+
```
245+
246+
---
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
config:
2+
build_jobs: 6
3+
4+
# Overrides for spack build and staging areas to speed up builds
5+
# and avoid errors with Lustre file locking and xattr issues
6+
build_stage: /swbuild/gmao_SIteam/spack-stack/cache/build_stage
7+
test_stage: /swbuild/gmao_SIteam/spack-stack/cache/test_stage
8+
source_cache: /swbuild/gmao_SIteam/spack-stack/cache/source_cache
9+
misc_cache: /swbuild/gmao_SIteam/spack-stack/cache/misc_cache
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
mirrors:
2+
local-source:
3+
url: file:///swbuild/gmao_SIteam/spack-stack/source-cache
4+
binary: false
5+
local-binary:
6+
url: file:///swbuild/gmao_SIteam/spack-stack/build-cache
7+
binary: true
8+

0 commit comments

Comments
 (0)