Closed CodeGat closed 1 week ago
@harshula Would we be using a similar spack.modules
section (here in the PR: https://github.com/ACCESS-NRI/ACCESS-OM3/pull/5/files#diff-e8582e74fa156f4e5729a850e52b24f2fde2d815c2c9c360f88c4cf90db851abR73-R78) to the ACCESS-NRI/ACCESS-OM2
one (here in the repo: https://github.com/ACCESS-NRI/ACCESS-OM2/blob/main/spack.yaml#L31-L60)
Hi @CodeGat , I think we will need to do the same for access-om3.
The model version in the spack.yaml
has not been updated.
Either update it manually, or comment the following to have it updated and committed automatically:
!bump major
for feature releases!bump minor
for bugfixesThe model version in the spack.yaml
has not been updated.
Either update it manually, or comment the following to have it updated and committed automatically:
!bump major
for feature releases!bump minor
for bugfixesThis ACCESS-NRI/ACCESS-OM3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-9
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.20/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.04.19
access-nri/spack-config
version 2024.03.22
If this is not what was expected, commit changes to config/versions.json
.
This ACCESS-NRI/ACCESS-OM3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-10
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.20/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.04.19
access-nri/spack-config
version 2024.03.22
If this is not what was expected, commit changes to config/versions.json
.
Note for tomorrow: it is deploying to 0.20
prerelease - we want to deploy to our prerelease fork. We might want to have that be a switch. See https://github.com/ACCESS-NRI/build-cd/issues/21 - it's time has finally come!
This access-om3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-11
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.20/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.04.19
access-nri/spack-config
version 2024.03.22
If this is not what was expected, commit changes to config/versions.json
.
This access-om3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-12
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.20/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.04.20
access-nri/spack-config
version 2024.03.22
If this is not what was expected, commit changes to config/versions.json
.
This access-om3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-13
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.20/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.04.20
access-nri/spack-config
version development
If this is not what was expected, commit changes to config/versions.json
.
This access-om3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-14
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.20/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.04.20
access-nri/spack-config
version 2024.04.22
If this is not what was expected, commit changes to config/versions.json
.
This access-om3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-15
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.20/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.04.20
access-nri/spack-config
version 2024.04.23
If this is not what was expected, commit changes to config/versions.json
.
This should now work given the above merged PRs. Now just need to wait for Gadi to be back up so we can get it into Prerelease
.
1) We should try to keep the spack.yaml and the Spack Bundle Definition in-sync W.R.T enabling/disabling variants, including compiler flags. Currently, they are out-of-sync. e.g. https://github.com/ACCESS-NRI/spack-packages/blob/main/packages/access-om3/package.py 2) We can achieve (1) by moving the enabling/disabling of variants to the Spack Package Definition and keep them out of the spack.yaml and the Spack Bundle Definition.
Hi @micaeljtoliveira , Can you please summarise here what you told us about the variants during our chat?
install_libraries
is currently used to make the OM3 components available to CM3. Not needed if you only want to installs and run OM3.build_type=RelWithDebInfo
), ideally one would set it at the highest level and tell spack to propagate it to all dependencies: build_type==RelWithDebInfo
(see the spack docs about how to specify variants)+deprecated_io
from FMS, but IIRC all the other variants are needed.This access-om3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-17
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.21/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.05.03
access-nri/spack-config
version 2024.04.23
If this is not what was expected, commit changes to config/versions.json
.
This access-om3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-18
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.20/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.05.03
access-nri/spack-config
version 2024.04.23
If this is not what was expected, commit changes to config/versions.json
.
This access-om3
model will be deployed with the following versions:
2024.04.0
as a Release (when merged).pr5-19
as a Prerelease (during this PR). This can be accessed on Gadi
via spack
at /g/data/vk83/prerelease/apps/spack/0.21/spack
once deployed.It will be deployed using:
access-nri/spack-packages
version 2024.05.03
access-nri/spack-config
version 2024.04.23
If this is not what was expected, commit changes to config/versions.json
.
Going to unassign myself from this PR for the moment, since there's nothing further for me to do on it - it is accessible as a prerelease
on Gadi. @dougiesquire et. al., have at it!
This access-om3
model will be deployed as:
2024.04.0
as a Release (when merged).pr5-20
as a Prerelease (during this PR).This Prerelease is accessible on Gadi using module use /g/data/vk83/prerelease/modules/access-models/ && module load access-om3/pr5-20
, where the binaries shall be on your $PATH
.
This Prerelease is also accessible on Gadi via /g/data/vk83/prerelease/apps/spack/0.21/spack
in the access-om3-pr5-20
environment.
It will be deployed using:
access-nri/spack-packages
version 2024.05.03
access-nri/spack-config
version 2024.04.23
If this is not what was expected, commit changes to config/versions.json
.
:rocket: Deploying access-om3 2024.04.0
as prerelease pr5-22
:hammer_and_wrench: Using: spack-packages 2024.07.08
, spack-config 2024.07.05
:rocket: Deploying access-om3 2024.04.0
as prerelease pr5-23
:hammer_and_wrench: Using: spack-packages 2024.07.08
, spack-config 2024.07.05
Builds successfully in a docker container with Spack v0.21 and v0.22.
Found a good issue reproducer on Gadi using Spack v0.22:
$ spack install fms@2023.02 %intel@2021.6.0 target=x86_64
1 error found in build log:
9 -- Detecting C compile features - done
10 -- Detecting Fortran compiler ABI info
11 -- Detecting Fortran compiler ABI info - done
12 -- Check for working Fortran compiler: /[GDATA]/test-v0.2
2-fms/spack/lib/spack/env/intel/ifort - skipped
13 -- Found MPI_C: /apps/openmpi/4.1.5/lib/libmpi.so (found version "3.
1")
14 -- Could NOT find MPI_Fortran (missing: MPI_Fortran_F77_HEADER_DIR M
PI_Fortran_MODULE_DIR) (found version "3.1")
>> 15 CMake Error at /apps/cmake/3.24.2/share/cmake-3.24/Modules/FindPacka
geHandleStandardArgs.cmake:230 (message):
16 Could NOT find MPI (missing: MPI_Fortran_FOUND Fortran) (found ver
sion
17 "3.1")
18 Call Stack (most recent call first):
19 /apps/cmake/3.24.2/share/cmake-3.24/Modules/FindPackageHandleStand
ardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
20 /apps/cmake/3.24.2/share/cmake-3.24/Modules/FindMPI.cmake:1835 (fi
nd_package_handle_standard_args)
21 CMakeLists.txt:84 (find_package)
The issue is probably caused by https://github.com/spack/spack/pull/43726
This commit to our Spack fork fixes the issue: https://github.com/ACCESS-NRI/spack/commit/21da7d7e2b5e2680cd9d2e0a2fb4a7d13d8baa9d
Sorry about the spam. GitHub Actions is currently having an internal error when running workflows that require environments: https://www.githubstatus.com/incidents/m70hk23gx3nx Will rerun when it has resolved itself
Attempting again as they have applied a mitigation.
:rocket: Deploying access-om3 2024.04.0
as prerelease pr5-24
:hammer_and_wrench: Using: spack-packages 2024.07.08
, spack-config 2024.07.05
When I run the build from this it can't find the linked libraries. i.e. the only module installed is 'access-om3' but we need modules for netcdf, parallelio, esmf ... etc (i.e. access-om3-MOM6-CICE6: error while loading shared libraries: libnetcdff.so.7: cannot open shared object file: No such file or directory
)
It looks like we need to explicitly include modules in our install location (e.g. https://github.com/COSIMA/spack-config/blob/7e86415adc33331fffec86cea615e374c4fa9b29/config/system/modules.yaml#L22)
Feel free to make the above modifications as you see fit, by the way! :)
:rocket: Deploying access-om3 2024.04.0
as prerelease pr5-25
:hammer_and_wrench: Using: spack-packages 2024.07.08
, spack-config 2024.07.05
When I run the build from this it can't find the linked libraries. i.e. the only module installed is 'access-om3' but we need modules for netcdf, parallelio, esmf ... etc (i.e.
access-om3-MOM6-CICE6: error while loading shared libraries: libnetcdff.so.7: cannot open shared object file: No such file or directory
)It looks like we need to explicitly include modules in our install location (e.g. https://github.com/COSIMA/spack-config/blob/7e86415adc33331fffec86cea615e374c4fa9b29/config/system/modules.yaml#L22)
@anton-seaice said in a meeting today that this was actually an issue with the config, not the build. I've been using the environment in this PR to build ACCESS-OM3 for a while now and not had any issues.
When I run the build from this it can't find the linked libraries. i.e. the only module installed is 'access-om3' but we need modules for netcdf, parallelio, esmf ... etc (i.e.
access-om3-MOM6-CICE6: error while loading shared libraries: libnetcdff.so.7: cannot open shared object file: No such file or directory
) It looks like we need to explicitly include modules in our install location (e.g. https://github.com/COSIMA/spack-config/blob/7e86415adc33331fffec86cea615e374c4fa9b29/config/system/modules.yaml#L22)@anton-seaice said in a meeting today that this was actually an issue with the config, not the build. I've been using the environment in this PR to build ACCESS-OM3 for a while now and not had any issues.
Oh sorry thats a different issue.
I do think we want to be able to load these modules directly. Loading them directly allows use with say the OM3 build script or using thse library's with a CICE standalone build etc (for development), so I think this or a similar change is worth doing.
I do think we want to be able to load these modules directly. Loading them directly allows use with say the OM3 build script or using thse library's with a CICE standalone build etc (for development), so I think this or a similar change is worth doing.
Okay, would this be a change here though?
Ill take advise on @harshula on that. For example, in COSIMA, they are listed in the "system" modules.yaml
Oh sorry thats a different issue.
@anton-seaice, so are you still having issues with using the environment in this PR? Can you provide more details about what you're trying to do and what the issue is? I've been using this environment to build ACCESS-OM3 for a while and not had any issues.
That said, I do think something has gone wrong with the prerelease environment module @CodeGat:
$ module use /g/data/vk83/prerelease/modules/access-models/
$ module load access-om3/pr5-25
$ which access-om3-MOM6-CICE6
/usr/bin/which: no access-om3-MOM6-CICE6 in (/home/599/ds0092/.linuxbrew/bin:/home/599/ds0092/.linuxbrew/sbin:/g/data/tm70/ds0092/software/mambaforge/bin:/g/data/tm70/ds0092/software/mambaforge/condabin:~/.linuxbrew/bin:/home/599/ds0092/.local/bin:/home/599/ds0092/bin:/opt/pbs/default/bin:/opt/nci/bin:/opt/bin:/opt/Modules/v4.3.0/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/pbs/default/bin)
This should return
/g/data/vk83/prerelease/apps/spack/0.22/release/linux-rocky8-x86_64/intel-2021.10.0/access-om3-nuopc-git.0.3.0_0.3.0-hmfbxxbebqygbnq5jqdmrtstxhtta2ov/bin/access-om3-MOM6-CICE6
Perhaps a clue is that the chatbot comment refers to spack 0.21
when we're using 0.22
Yes I used this successfully.
I want to be able to use the dependencies from the environment without using access-om3.
e.g. to build debug / minimal examples to test the dependency:
#!/bin/bash
module purge
module use /g/data/ik11/spack/0.20.1/modules/access-om3/0.2.0/linux-rocky8-x86_64/
module load intel-compiler/2021.6.0 openmpi/4.1.5 parallelio/2.5.10
echo $PIO_ROOT
# ls -l $PIO_ROOT/lib/libpiof.so
mpifort pio_open.f90 $SPACK_PARALLELIO_ROOT/lib/libpiof.so -o pio_open.exe -L $SPACK_PARALLELIO_ROOT/lib -lpioc -I $SPACK_PARALLELIO_ROOT/include -cpp -fpp
Or to use the dependencies to build cice standalone, for testing and development contributions to cice main. e.g.
https://forum.access-hive.org.au/t/running-cice6-standalone/1692?u=anton
I see with the set up of /g/data/vk83/prerelease/modules/access-models/
maybe this isn't possible ?
Perhaps a clue is that the https://github.com/ACCESS-NRI/ACCESS-OM3/pull/5#issuecomment-2305886797 refers to spack 0.21 when we're using 0.22
Sorry @dougiesquire this is just an issue with the comment, see https://github.com/ACCESS-NRI/build-cd/issues/110
I want to be able to use the dependencies from the environment without using access-om3.
@anton-seaice Would you be able to add entries of the dependencies to the spack.modules.default.tcl.include
section? For each of those dependencies, you would then also need to add entries into the spack.modules.default.tcl.projections
section that have the same versions than in the spack.packages.*.require
section. Happy to help out with this if you want.
As an aside, I am deleting the old 0.20 Prerelease spack
. This contained access-om3-pr5-9
, but I see that we are well past that, now :D
Sorry @dougiesquire this is just an issue with the comment, see https://github.com/ACCESS-NRI/build-cd/issues/110
Okay, so any idea why this fails:
$ module use /g/data/vk83/prerelease/modules
$ module load access-om3/pr5-25
$ which access-om3-MOM6-CICE6
/usr/bin/which: no access-om3-MOM6-CICE6 in (blah)
Possibly because access-om3-nuopc
isn't explicitly included? I'm not 100% sure.
@CodeGat
I added this
tcl:
hash_length: 0
include:
- access-om3
- access-om3-nuopc
- netcdf-c
- netcdf-fortran
- parallelio
- esmf
- fms
- fortranxml
and did a spack install. However I still can't load the access-om3-nuopc module.
$ module use /g/data/tm70/as2285/spack0.22/release/linux-rocky8-x86_64/intel-2021.10.0
$ module avail
----------------------------------------------------------------------- /g/data/tm70/as2285/spack0.22_sep/release/modules/linux-rocky8-x86_64 ------------------------------------------------------------------------
access-om3-nuopc/git.0.3.0_0.3.0 access-om3/2024.04.0 esmf/8.5.0 fms/2023.02 netcdf-c/4.9.2 netcdf-fortran/4.6.1 parallelio/2.6.2
...
$ module load access-om3-nuopc/git.0.3.0_0.3.0
Loading access-om3-nuopc/git.0.3.0_0.3.0
ERROR: Unable to locate a modulefile for 'fortranxml/4.1.2'
ERROR: Load of requirement fortranxml/4.1.2 failed
$ module use /g/data/tm70/as2285/spack0.22/release/linux-rocky8-x86_64/intel-2021.10.0 $ module avail
The permissions on your spack directory don't allow group access (executable bit is not set correctly):
$ ls -ld /g/data/tm70/as2285/spack0.22
drwxrwSr-- 10 as2285 tm70 4096 Sep 16 15:03 /g/data/tm70/as2285/spack0.22
Having said which, why do you want to make the fortranxml
library accessible through module load
?
a. At the moment, it doesn't allow module loading the model i.e. https://github.com/ACCESS-NRI/ACCESS-OM3/pull/5#issuecomment-2313855031 - hence adding access-om3-nuopc
to the tcl: include
b. Having the dependencies avail through module load is useful for development work. i.e. https://github.com/ACCESS-NRI/ACCESS-OM3/pull/5#issuecomment-2306113554
c. So dropping EDIT: doing a fortranxml
from the tcl: include
might allow the module load of access-om3-nuopc
?
spack conretise --fresh
fixed the problem with module load access-om3-nuopc
I added this
tcl: hash_length: 0 include: - access-om3 - access-om3-nuopc - netcdf-c - netcdf-fortran - parallelio - esmf - fms - fortranxml
I did a spack concretise --fresh
and spack install
and the new install allowed a
module load access-om3-nuopc/git...
i.e. it works now
So I think this change needs to be made. Can I push it? How do you want to name the versions of these modules ?
Most of the default names seem ok?
----------------------------------------- /g/data/tm70/as2285/spack0.22_sep/release/modules/linux-rocky8-x86_64 -----------------------------------------
access-om3-nuopc/git.0.3.0_0.3.0 esmf/8.5.0 netcdf-c/4.9.2
access-om3-nuopc/git.96f91599f746b4866bbd3f05ee6eb192ba70d391_0.3.0-git.15 fms/2023.02 netcdf-fortran/4.6.1
access-om3/2024.04.0 fortranxml/4.1.2 parallelio/2.6.2
Hey @anton-seaice I've seen the above checks fail.
For Check spack.yaml
(https://github.com/ACCESS-NRI/ACCESS-OM3/actions/runs/10953784507/job/30414616058?pr=5) we require an entry of access-om3-nuopc: '0.3.0'
in the projections section, near the access-om3
one.
As for the other one CI / CI / Check Config Fields
- that's a infrastructure bug and I'll get onto it now.
:rocket: Deploying access-om3 2024.04.0
as prerelease pr5-27
:hammer_and_wrench: Using: spack-packages 2024.07.08
, spack-config 2024.07.05
:rocket: Deploying access-om3 2024.04.0
as prerelease pr5-28
:hammer_and_wrench: Using: spack-packages 2024.07.08
, spack-config 2024.07.05
:rocket: Deploying access-om3 2024.09.0
as prerelease pr5-29
:hammer_and_wrench: Using: spack-packages 2024.07.08
, spack-config 2024.07.05
Initial changes to the
spack.yaml
to support theaccess-om3
SBD.Closes #3