Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions configs/common/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ packages:
wgrib2:
require:
- '@3.6.0'
- '+ipolates +netcdf'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While building wgrib2 this way "works" (see: JCSDA/spack#561), wgrib2/package.py ought to be properly fixed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, see the CI failure: https://github.com/JCSDA/spack-stack/actions/runs/18286538992/job/52062910954

@AlexanderRichert-NOAA @rickgrubin-noaa What is the permanent fix? Will that be made for spack-packages only i.e. do we bring over the temporary fix from the spack submodule release/1.9.0 branch for the time being?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rickgrubin-noaa I've decided to pull in your temporary fix for the reasons stated in JCSDA/spack#568. I assume this hasn't been fixed yet in the new spack-packages repo?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rickgrubin-noaa I've decided to pull in your temporary fix for the reasons stated in JCSDA/spack#568. I assume this hasn't been fixed yet in the new spack-packages repo?

This has not been fixed in the new spack-packages repo.

As far as I can tell (and @AlexanderRichert-NOAA certainly understand better than I), the temporary fix implemented for v3.6.0 isn't necessarily applicable for other, earlier versions. I have not looked into it further.

wrf-io:
require: '@1.2.0'
zstd:
Expand Down
11 changes: 6 additions & 5 deletions configs/sites/tier1/hera/packages.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
packages:
all:
# https://github.com/JCSDA/spack-stack/issues/1781
# To support hecflow01
target: [haswell]
#target: [haswell]
providers:
zlib-api:: [zlib]
zlib-api:
Expand Down Expand Up @@ -110,10 +111,10 @@ packages:
mysql:
buildable: False
externals:
- spec: mysql@8.0.31
prefix: /scratch1/NCEPDEV/global/spack-stack/apps/mysql-8.0.31
- spec: mysql@8.0.36
prefix: /contrib/spack-stack/installs/mysql/8.0.36
modules:
- mysql/8.0.31
- mysql/8.0.36
ncurses:
externals:
- spec: ncurses@5.9.20130511+termlib abi=5
Expand All @@ -129,7 +130,7 @@ packages:
qt:
externals:
- spec: qt@5.12.6
prefix: /scratch1/NCEPDEV/nems/role.epic/installs/qt-5.12.6/qtbase
prefix: /contrib/spack-stack/installs/qt-5.12.6/qtbase
rsync:
externals:
- spec: rsync@3.1.2
Expand Down
2 changes: 1 addition & 1 deletion configs/sites/tier1/hera/packages_oneapi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
packages:
all:
compiler:: [oneapi@2024.2.1]
compiler:: [oneapi@2024.2.1, gcc@13.3.0]
providers:
mpi:: [intel-oneapi-mpi@2021.13]
# Remove the next three lines to switch to intel-oneapi-mkl
Expand Down
4 changes: 4 additions & 0 deletions configs/sites/tier1/hercules/compilers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ compilers:
operating_system: rocky9
target: x86_64
modules:
- spack-managed-x86-64_v3
- intel-oneapi-compilers/2024.2.1
environment:
set:
# https://github.com/ufs-community/ufs-weather-model/issues/2015#issuecomment-1864438186
I_MPI_EXTRA_FILESYSTEM: 'ON'
# Override system module settings for FC and F77 (they're set to ifx)
F77: '/apps/spack-managed-x86_64_v3-v1.0/gcc-11.3.1/intel-oneapi-compilers-2024.2.1-podbez65l57ms4uba527kg7pomxk5y3m/compiler/2024.2/bin/ifort'
FC: '/apps/spack-managed-x86_64_v3-v1.0/gcc-11.3.1/intel-oneapi-compilers-2024.2.1-podbez65l57ms4uba527kg7pomxk5y3m/compiler/2024.2/bin/ifort'
prepend_path:
PATH: /usr/bin
LD_LIBRARY_PATH: /usr/lib:/usr/lib64
Expand Down
7 changes: 7 additions & 0 deletions configs/sites/tier1/hercules/packages_oneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ packages:
- spec: intel-oneapi-mpi@2021.13%oneapi@2024.2.1
prefix: /apps/spack-managed-x86_64_v3-v1.0/oneapi-2024.2.1/intel-oneapi-mpi-2021.13.1-3pv63eugwmse2xpeglxib4dr2oeb42g2
modules:
- spack-managed-x86-64_v3
- intel-oneapi-compilers/2024.2.1
- intel-oneapi-mpi/2021.13.1

intel-oneapi-mkl:
Expand All @@ -23,13 +25,15 @@ packages:
- spec: intel-oneapi-mkl@2024.2.1
prefix: /apps/spack-managed-x86_64_v3-v1.0/gcc-11.3.1/intel-oneapi-mkl-2024.2.1-aeiool3i5jj4newwifvkhow5almp67rt
modules:
- spack-managed-x86-64_v3
- intel-oneapi-mkl/2024.2.1

intel-oneapi-runtime:
externals:
- spec: intel-oneapi-runtime@2024.2.1%oneapi@2024.2.1
prefix: /apps/spack-managed-x86_64_v3-v1.0/oneapi-2024.2.1/intel-oneapi-runtime-2024.2.1-hl5zgdjaldynq35dq3yotclfy2vblybx
modules:
- spack-managed-x86-64_v3
- intel-oneapi-compilers/2024.2.1
- intel-oneapi-runtime/2024.2.1

Expand All @@ -49,3 +53,6 @@ packages:
py-scipy:
require:
- '%gcc'
zlib-ng:
require:
- '~shared'
118 changes: 100 additions & 18 deletions configs/sites/tier1/nas/README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,131 @@
# How to build spack-stack at NAS

## Generic
In the commands below some will be run on login nodes (with internet access) and some
on compute nodes as, at NAS, you aren't allowed more than 2 processes on a login node.

## Clone spack-stack

```
git clone --recursive https://github.com/JCSDA/spack-stack.git -b release/1.9.0 spack-stack-1.9.3
```

## Grab interactive node

Since NAS limits you to 2 processes on a login node, you'll need to grab an interactive node. For example:
```
git clone --recursive https://github.com/JCSDA/spack-stack.git -b release/1.9.0 spack-stack-1.9.1
qsub -I -V -X -l select=1:ncpus=128:mpiprocs=128:model=mil_ait -l walltime=12:00:00 -W group_list=s1873 -m b -N Interactive
```
will get you a Milan node for 12 hours

## Setup spack-stack on each node

## oneapi
We will start on a login node with internet access. This is mainly needed for the
`spack mirror create` command which downloads all the source code for the packages.

```
cd spack-stack-1.9.1
cd spack-stack-1.9.3
. setup.sh
spack stack create env --name ue-oneapi-2024.2.0 --template unified-dev --site nas --compiler oneapi
cd envs/ue-oneapi-2024.2.0
spack env activate .
spack concretize 2>&1 | tee log.concretize
spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install
```

NOTE: You might need to run the `spack install` command multiple times because sometimes
it just fails. But then you run it more and more and it will eventually succeed.
## Create environments

We create two different environments, one for oneAPI and one for GCC. The commands below
are used to create the environments. You only need to do this once.

### oneAPI

To create the oneAPI environment, do:

```
spack module tcl refresh -y
spack stack setup-meta-modules
spack env deactivate
spack stack create env --name ue-oneapi-2024.2.0 --template unified-dev --site nas --compiler oneapi
cd envs/ue-oneapi-2024.2.0
```

## gcc
### GCC

To create the GCC environment, do:

```
cd spack-stack-1.9.1
. setup.sh
spack stack create env --name ue-gcc-12.3.0 --template unified-dev --site nas --compiler gcc
cd envs/ue-gcc-12.3.0
```

## Activate environment

Now enter the spack environment you just created:

```
spack env activate .
```

NOTE: You need to make sure you do this in *any* terminal where you want to do any commmand
below with this environment.

## Concretize and create source cache

```
spack concretize 2>&1 | tee log.concretize
spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install
```

## Create source cache (LOGIN NODE ONLY)

Because this step downloads all the source code for all packages and all versions, it
should be done on a login node with internet access.

```
spack mirror create -a -d /nobackup/gmao_SIteam/spack-stack/source-cache
```

NOTE: Make sure you are in an environment when you run that `spack mirror create` command. Otherwise,
you will download *EVERY* package and *EVERY* version in spack!

## Install packages

Our install process will actually have (at least) three steps. This is because of the `crtm` package
which requires internet access at build time.

### Install crtm dependencies (COMPUTE NODE)

```
spack install -j 10 --verbose --fail-fast --show-log-on-error --no-check-signature --only dependencies crtm 2>&1 | tee log.install.crtm_dependencies
```

### Install crtm (LOGIN NODE)

```
spack install -j 2 --verbose --fail-fast --show-log-on-error --no-check-signature crtm 2>&1 | tee log.install.crtm
```

Note we are only using 2 processes here because NAS limits you to 2 processes on a login node.

### Install rest of packages (COMPUTE NODE)

```
spack install -j 10 --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install.after_crtm
```

NOTE: You might need to run the `spack install` command multiple times because sometimes
it just fails. But then you run it more and more and it will eventually succeed.

### Packages needing internet access to build

If you encounter other packages that need internet access to build, you can install them with:

```
spack install -j 2 --verbose --fail-fast --show-log-on-error --no-check-signature <package> |& tee log.install.<package>
```

Then, once that package is built, you can go back to the compute node and run the `spack install` command again.

## Update module files and setup meta-modules

```
spack module tcl refresh -y
spack stack setup-meta-modules
```

## Deactivate environment

```
spack env deactivate
```
8 changes: 8 additions & 0 deletions configs/sites/tier1/nas/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,18 @@ packages:
externals:
- spec: gawk@4.2.1
prefix: /usr
gh:
externals:
- spec: gh@2.78.0
prefix: /nobackup/gmao_SIteam/gh/2.78.0
git:
externals:
- spec: git@2.43.5~tcltk
prefix: /usr
git-lfs:
externals:
- spec: git-lfs@3.7.0
prefix: /nobackup/gmao_SIteam/git-lfs/3.7.0
gmake:
externals:
- spec: gmake@4.2.1
Expand Down
24 changes: 8 additions & 16 deletions configs/sites/tier1/noaa-aws/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
# Provisiong ParallelWorks AWS clusters

## Steps to perform before installing spack-stack version 1.9.2
## Steps to perform before installing spack-stack version 1.9.3

sudo su -
chmod 777 /contrib
yum install -y qt5-qtbase-devel
yum install -y qt5-qtsvg-devel


## Steps to install spack-stack version 1.9.2
## Steps to install spack-stack version 1.8.0

sudo su -
chmod 777 /contrib

module purge
module unuse /opt/cray/craype/default/modulefiles
module unuse /opt/cray/modulefiles
### For noaa-aws, run the line below as well:
module unuse /opt/intel/impi/2019.5.281/intel64/modulefiles
module load gnu
module load intel/2024.2.1
module load impi/2024.2.1
module unload gnu

cd /contrib/spack-stack-rocky8/
git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.9.0 spack-stack-1.9.2
cd spack-stack-1.9.2
git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.9.0 spack-stack-1.9.3
cd spack-stack-1.9.3
. setup.sh
spack stack create env --name ue-oneapi-2024.2.1 --template unified-dev --site noaa-aws --compiler oneapi
cd envs/ue-oneapi-2024.2.1
spack env activate .
spack concretize 2>&1 | tee log.concretize
spack install --verbose 2>&1 | tee log.install
spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install
spack module lmod refresh -y
spack stack setup-meta-modules

Expand All @@ -40,12 +32,12 @@ spack stack setup-meta-modules
sudo su -
chmod 777 /contrib

cd /contrib/spack-stack-rocky8/spack-stack-1.9.2
cd /contrib/spack-stack-rocky8/spack-stack-1.9.3
. setup.sh
spack stack create env --name gsi-oneapi-2024.2.1 --template gsi-addon-dev --site noaa-aws --upstream /contrib/spack-stack-rocky8/spack-stack-1.9.2/envs/ue-intel-2024.2.1/install --compiler intel
spack stack create env --name gsi-oneapi-2024.2.1 --template gsi-addon-dev --site noaa-aws --upstream /contrib/spack-stack-rocky8/spack-stack-1.9.3/envs/ue-oneapi-2024.2.1/install --compiler oneapi
cd envs/gsi-oneapi-2024.2.1
spack env activate .
spack concretize 2>&1 | tee log.concretize
spack install --verbose 2>&1 | tee log.install
spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install
spack module lmod refresh --upstream-modules
spack stack setup-meta-modules
24 changes: 9 additions & 15 deletions configs/sites/tier1/noaa-azure/README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
# Provisiong ParallelWorks Azure clusters

## Steps to perform before installing spack-stack version 1.9.2
## Steps to perform before installing spack-stack version 1.9.3

sudo su -
chmod 777 /contrib
yum install -y qt5-qtbase-devel
yum install -y qt5-qtsvg-devel


## Steps to install spack-stack version 1.9.2
## Steps to install spack-stack version 1.8.0

sudo su -
chmod 777 /contrib

module purge
module unuse /opt/cray/craype/default/modulefiles
module unuse /opt/cray/modulefiles
module load gnu
module load intel/2024.2.1
module load impi/2024.2.1
module unload gnu

cd /contrib/spack-stack-rocky8/
git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.9.0 spack-stack-1.9.2
cd spack-stack-1.9.2
git clone --recursive https://github.com/JCSDA/spack-stack -b release/1.9.0 spack-stack-1.9.3
cd spack-stack-1.9.3
. setup.sh
spack stack create env --name ue-oneapi-2024.2.1 --template unified-dev --site noaa-azure --compiler oneapi
cd envs/ue-intel-2024.2.1
cd envs/ue-oneapi-2024.2.1
spack env activate .
spack concretize 2>&1 | tee log.concretize
spack install --verbose 2>&1 | tee log.install
spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install
spack module lmod refresh -y
spack stack setup-meta-modules

Expand All @@ -38,12 +32,12 @@ spack stack setup-meta-modules
sudo su -
chmod 777 /contrib

cd /contrib/spack-stack-rocky8/spack-stack-1.9.2
cd /contrib/spack-stack-rocky8/spack-stack-1.9.3
. setup.sh
spack stack create env --name gsi-oneapi-2024.2.1 --template gsi-addon-dev --site noaa-azure --upstream /contrib/spack-stack-rocky8/spack-stack-1.9.2/envs/ue-oneapi-2024.2.1/install --compiler oneapi
spack stack create env --name gsi-oneapi-2024.2.1 --template gsi-addon-dev --site noaa-azure --upstream /contrib/spack-stack-rocky8/spack-stack-1.9.3/envs/ue-oneapi-2024.2.1/install --compiler oneapi
cd envs/gsi-oneapi-2024.2.1
spack env activate .
spack concretize 2>&1 | tee log.concretize
spack install --verbose 2>&1 | tee log.install
spack install --verbose --fail-fast --show-log-on-error --no-check-signature 2>&1 | tee log.install
spack module lmod refresh --upstream-modules
spack stack setup-meta-modules
Loading