ACCESS-NRI / ACCESS-ESM1.5

The ACCESS Earth System Model (ACCESS-ESM) is a fully-coupled global climate model that includes atmoshpere, land, ocean, sea ice, ocean biogeochemistry and land biogeochemistry components, linked together by a coupler.
Apache License 2.0
0 stars 0 forks source link

Modules created by Spack need Module version 4.7 #8

Open penguian opened 6 days ago

penguian commented 6 days ago

Attempting to load the access-esm1p5/pr5-22 module results in the error Modulefile requires at least Modules version 4.7 as follows:

[pcl851@gadi-login-08 access-esm1.5-configs]$ module use /g/data/vk83/prerelease/apps/spack/0.21/release/modules/linux-rocky8-x86_64_v4
[pcl851@gadi-login-08 access-esm1.5-configs]$ module load access-esm1p5/pr5-22
Loading cice4/2024.05.21-rhp3hnn
  Module ERROR: Modulefile requires at least Modules version 4.7
    In '/g/data/vk83/prerelease/apps/spack/0.21/release/modules/linux-rocky8-x86_64_v4/oasis3-mct/.modulerc'
    Please contact <root@localhost>

Loading access-esm1p5/pr5-22
  Module ERROR: Modulefile requires at least Modules version 4.7
    In '/g/data/vk83/prerelease/apps/spack/0.21/release/modules/linux-rocky8-x86_64_v4/cice4/.modulerc'
    Please contact <root@localhost>
  Module ERROR: Modulefile requires at least Modules version 4.7
    In '/g/data/vk83/prerelease/apps/spack/0.21/release/modules/linux-rocky8-x86_64_v4/mom5/.modulerc'
    Please contact <root@localhost>
  Module ERROR: Modulefile requires at least Modules version 4.7
    In '/g/data/vk83/prerelease/apps/spack/0.21/release/modules/linux-rocky8-x86_64_v4/um7/.modulerc'
    Please contact <root@localhost>
  Loading requirement: oasis3-mct/git.access-esm1.5_2024.05.24_access-esm1.5-z26jkwl cice4/2024.05.21-rhp3hnn mom5/access-esm1.5_2024.05.24-ba7yz2v um7/2024.05.21-igag7xt
[pcl851@gadi-login-08 access-esm1.5-configs]$ module --version
Modules Release 4.3.0 (2019-07-26)
aidanheerdegen commented 4 days ago

This is because the spack.yaml has hide_implicits: true, which tries to hide implicit dependencies.

We don't get these errors with ACCESS-OM2, which has the same settings.

We could trying setting this to false and set autoload: run to minimise the number of module files generated and loaded

https://spack.readthedocs.io/en/latest/module_file_support.html#autoloading-and-hiding-dependencies

CodeGat commented 4 days ago

Hrm. Why does it work for ACCESS-OM2 and not ESM1.5? I'm not sure I understand.

aidanheerdegen commented 4 days ago

Me either, but @CodeGat did mention the old exclude_implicits vs hide_implicits oddness we encountered some time ago. I thought they were largely synonyms, but might be worth doing some tests and regenerating the module files.

CodeGat commented 4 days ago

We could trying setting this to false and set autoload: run to minimise the number of module files generated and loaded

This worked, @aidanheerdegen! See https://github.com/ACCESS-NRI/ACCESS-ESM1.5/pull/5/commits/1edb1aa7d7bf603596481a2ec3016474ffd53ae3

$ module use /g/data/vk83/prerelease/apps/spack/0.22/release/modules/linux-rocky8-x86_64_v4/
$ module load access-esm1p5/pr5-31
penguian commented 4 days ago

Loading the module apparently results in an empty bundle. Is this expected? If so, what is the purpose of this module?

$ module use /g/data/vk83/prerelease/apps/spack/0.22/release/modules/linux-rocky8-x86_64_v4/
$ module load access-esm1p5/pr5-31
$ which cice_access_360x300_12x1_12p.exe
/usr/bin/which: no cice_access_360x300_12x1_12p.exe in (/home/851/pcl851/.local/bin:/g/data/tm70/pcl851/src/ACCESS-NRI/spack/bin:/home/851/pcl851/.local/bin:/home/851/pcl851/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)
$ module show access-esm1p5/pr5-31
-------------------------------------------------------------------
/g/data/vk83/prerelease/apps/spack/0.22/release/modules/linux-rocky8-x86_64_v4/access-esm1p5/pr5-31:

module-whatis   {ACCESS-ESM1.5 bundle contains the coupled UM7, CICE4 and MOM5 models.}
conflict        access-esm1p5
prepend-path    CMAKE_PREFIX_PATH /g/data/vk83/prerelease/apps/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/access-esm1p5-latest-vawzi2p6rhblpvvrhlezwmd4siawp4jk/.
setenv          SPACK_ACCESS_ESM1P5_ROOT /g/data/vk83/prerelease/apps/spack/0.22/restricted/ukmo/release/linux-rocky8-x86_64_v4/intel-19.0.3.199/access-esm1p5-latest-vawzi2p6rhblpvvrhlezwmd4siawp4jk
-------------------------------------------------------------------
$ ls $SPACK_ACCESS_ESM1P5_ROOT
$ 
penguian commented 4 days ago

Try using autoload: direct or even autoload: all instead?

harshula commented 3 days ago

Refer to: https://github.com/spack/spack/issues/40940

Looks like we need to use exclude_implicits because Gadi has an old version of modules:

$ module --version
Modules Release 4.3.0 (2019-07-26)

hide_implicits was added in Spack v0.21, hence not relevant for releases made on Spack v0.20.

harshula commented 3 days ago

Hi @penguian , FYI, we took a wrong turn at: https://github.com/ACCESS-NRI/ACCESS-OM2/issues/65 https://github.com/ACCESS-NRI/ACCESS-OM2/pull/60