Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert modulefiles to lua and hpc-stack (v16) #639

Closed
WalterKolczynski-NOAA opened this issue Feb 8, 2022 · 18 comments
Closed

Convert modulefiles to lua and hpc-stack (v16) #639

WalterKolczynski-NOAA opened this issue Feb 8, 2022 · 18 comments
Assignees
Labels
maintenance Regular updates and maintenance work

Comments

@WalterKolczynski-NOAA
Copy link
Contributor

WalterKolczynski-NOAA commented Feb 8, 2022

Description
The remaining (non-WCOSS2) modulefiles need to be converted to from TCL to lua on the v16 branch and accept version numbers. The updated modulefiles also need to load hpc-stack modules.

Requirements

  1. Convert all module files from TCL to lua and allow versions to be set by sourcing a versions file beforehand.
  2. Set modulefiles to load hpc-stack modules.

Acceptance Criteria (Definition of Done)

  1. Workflow builds and works using no non-lua module files anywhere in global-workflow (including components) and accepts a single versions file provided by global-workflow.
  2. Workflow builds and works using no non-hpc-stack modules anywhere in global-workflow (including components).

Companion issues in components:

@GeorgeGayno-NOAA
Copy link
Contributor

FYI - the GFSv16.2.0 tag of UFS_UTILS is already 'lua' compliant on all non-WCOSS2 machines. See:
https://github.com/ufs-community/UFS_UTILS/releases/tag/ops-gfsv16.2.0 and ufs-community/UFS_UTILS#580

@KateFriedman-NOAA
Copy link
Member

FYI - the GFSv16.2.0 tag of UFS_UTILS is already 'lua' compliant on all non-WCOSS2 machines. See: https://github.com/ufs-community/UFS_UTILS/releases/tag/ops-gfsv16.2.0 and ufs-community/UFS_UTILS#580

Thanks for confirming @GeorgeGayno-NOAA ! UFS_UTILS appeared to be the furthest ahead in the LUA game when we took a gander. Will just need the hpc-stack updates for Hera/Orion from you then, I see the issue you just opened, thanks!

@malloryprow
Copy link
Contributor

malloryprow commented Feb 9, 2022

For EMC_verif-global:

On Hera, the anaconda version being loaded is anaconda/anaconda3-5.3.1. For the version of MET I need (/contrib/met/modulefiles/met/9.1 ), the prerequisites is anaconda/latest. Is that okay that I load anaconda/latest instead of anaconda/anaconda3-5.3.1 for EMC_verif-global?

On Orion: The version of MET needed (/apps/contrib/modulefiles/met/9.1 ) has prerequisites of intel/2020 and intelpython3/2020. For the global workflow, I believe intel/2018.4 and python/3.7.5 are the versions being used.

KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 9, 2022
- cleaned out modulefiles that are no longer needed for OznMon/Radmon
- remove errant workflow_utils.orion.lua (wrong branch)

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 9, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 9, 2022
- add "setenv("myFC","ftn")" to the modulefiles for fbwndgfs
and storm_reloc on WCOSS2
- needed to set FC on WCOSS2 now that other platforms have
to set FC differently (e.g. mpiifort on Orion)

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 9, 2022
- update fbwndgfs makefile.GENERIC to use myFC variable
- update build_tropcy_NEMS.sh to use myFC variable
- also update build_tropcy_NEMS.sh to adjust JASPER_LIB variable
and remove wcoss2 check for setting SIGIO_LIB4 and SIGIO_INC4

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 9, 2022
- cleanup Orion, Hera, and Jet blocks to just set target and
do a module purge
- add $target.ver sourcing after build.ver sourcing

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 9, 2022
- update the gfs_bufr build and makefile to use hpc-stack library variables

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 9, 2022
- wrap $target.ver sourcing in block that checks if user is not on
WCOSS2 and source if so
- do not need or have wcoss2.ver file at this time

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 9, 2022
- adjust NETCDF_LDFLAGS_F flags in gaussian_sfcanl.fd/makefile.sh
to flip -lnetcdf/-lnetcdff order, add -lhdf5_hl flag, and add -lz flag

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 9, 2022
- need to now source the target-specific version files before
loading modulebase.$target.lua on Hera and Orion

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 10, 2022
- add NETCDF_LDFLAGS flags to successfully build regrid_nemsio

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 10, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 10, 2022
- under the versions folder create new hera.ver and orion.ver
- new target-specific version files will be used to set hpc-stack
modules and versions, as well potentially override other versions
as needed on the specific platforms

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 10, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 10, 2022
- convert the contents of the newly renamed Hera modules to use LUA format
- convert Hera modulefiles to load hpc-stack modules

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 11, 2022
- remove hdf5 and netcdf module loads from enkf_chgres_recenter modulefiles
- reran builds to confirm

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 11, 2022
- remove nemsio and sigio modules from gfs_fbwndgfs build
- reran builds to confirm

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 11, 2022
- was erroneously removed, added back into module_base.hera.lua
- added companion hpss_ver to hera.ver

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 11, 2022
- create empty wcoss2.ver to go alongside other new machine-specific
version files
- update machine-setup.sh to load $target.ver on all machines now

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 11, 2022
- replace SIGIO_LIB4 with SIGIO_LIB
- replace SIGIO_INC4 with SIGIO_INC
- remove two lines that set "4" variables to non-"4" variables

Refs: NOAA-EMC#639
@MichaelLueken
Copy link

The DA components for GFSv16.2.0 have been updated so that Hera and Orion modulefiles are both lua compliant. Please see the tag:

gfsda.v16.2.1 and issue #298 in the GSI repository.

@KateFriedman-NOAA
Copy link
Member

The DA components for GFSv16.2.0 have been updated so that Hera and Orion modulefiles are both lua compliant. Please see the tag:
gfsda.v16.2.1 and issue #298 in the GSI repository.

Thanks @MichaelLueken-NOAA ! I have run build_gsi.sh successfully via my global-workflow branch on Orion. Please see the following log on Orion and confirm it did indeed build ok:
/work/noaa/global/kfriedma/git/dev_v16/sorc/logs/build_gsi.log

I tried the same build on Hera, it failed because I set the cmake version to be cmake/3.20.0 which comes from hpc-stack instead of the default cmake/3.16.1 available outside of the stack. Since cmake is loaded in the GSI modulefiles before the stack is loaded it didn't know about the cmake/3.20.0 version. See this log:
/scratch1/NCEPDEV/global/Kate.Friedman/git/dev_v16/sorc/logs/build_gsi.log

Can the cmake module load be moved after the stack module loads in the GSI modulefiles?

Also, a note on the new tag name (gfsda.v16.2.1)...since we could potentially have a GFSv16.2.1 in ops down the road could you retag with a different name? It's awkward for this update I understand but let me suggest gfsda.v16.2.0.1? I just wanna keep gfsda.v16.2.1 free for potential ops updates. Other components don't use the GFS version in their tag names so I haven't made similar comments to their new tags. Thanks!

KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 15, 2022
- only available prod_util on Orion is prod_util/1.2.2
- add prod_util_ver=1.2.2 to orion.ver to override WCOSS2 version

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 15, 2022
- add overrides for prod_util and cmake versions to hera.ver
- use available hpc-stack versions to override WCOSS2 defaults

Refs: NOAA-EMC#639
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Feb 15, 2022
- override WCOSS2 default for cmake_ver and use 3.22.1 on Orion

Refs: NOAA-EMC#639
@KateFriedman-NOAA
Copy link
Member

Merged #648 into dev_v16

@KateFriedman-NOAA KateFriedman-NOAA changed the title Convert modulefiles to lua (v16) Convert modulefiles to lua and hpc-stack (v16) Feb 15, 2022
@MichaelLueken
Copy link

The DA components for GFSv16.2.0 have been updated so that Hera and Orion modulefiles are both lua compliant. Please see the tag:
gfsda.v16.2.1 and issue #298 in the GSI repository.

Thanks @MichaelLueken-NOAA ! I have run build_gsi.sh successfully via my global-workflow branch on Orion. Please see the following log on Orion and confirm it did indeed build ok: /work/noaa/global/kfriedma/git/dev_v16/sorc/logs/build_gsi.log

I tried the same build on Hera, it failed because I set the cmake version to be cmake/3.20.0 which comes from hpc-stack instead of the default cmake/3.16.1 available outside of the stack. Since cmake is loaded in the GSI modulefiles before the stack is loaded it didn't know about the cmake/3.20.0 version. See this log: /scratch1/NCEPDEV/global/Kate.Friedman/git/dev_v16/sorc/logs/build_gsi.log

Can the cmake module load be moved after the stack module loads in the GSI modulefiles?

Also, a note on the new tag name (gfsda.v16.2.1)...since we could potentially have a GFSv16.2.1 in ops down the road could you retag with a different name? It's awkward for this update I understand but let me suggest gfsda.v16.2.0.1? I just wanna keep gfsda.v16.2.1 free for potential ops updates. Other components don't use the GFS version in their tag names so I haven't made similar comments to their new tags. Thanks!

@KateFriedman-NOAA Thanks for bringing these issues to my attention! I have updated modulefiles/modulefile.ProdGSI.hera.lua so that the cmake entry comes directly after setting up hpc-stack. I have tested that both cmake/3.16.1 and cmake/3.20.0 both successfully compile the DA components. After this, I removed the gfsda.v16.2.1 tag and created the gfsda.v16.2.0.1 tag.

Please let me know if you encounter any additional issues!

@KateFriedman-NOAA
Copy link
Member

Thanks for bringing these issues to my attention! I have updated modulefiles/modulefile.ProdGSI.hera.lua so that the cmake entry comes directly after setting up hpc-stack. I have tested that both cmake/3.16.1 and cmake/3.20.0 both successfully compile the DA components. After this, I removed the gfsda.v16.2.1 tag and created the gfsda.v16.2.0.1 tag.

Thanks @MichaelLueken-NOAA ! It built ok on Hera, please see this log to confirm:

/scratch1/NCEPDEV/global/Kate.Friedman/git/dev_v16/sorc/logs/build_gsi.log_2

A few notes:

  1. NCO asked us to move to w3emc/2.9.2 (which I am getting hpc-stack folks to install on Hera/Orion). I ran the build on Hera with export w3emc_ver=2.9.0 set via g-w versions/hera.ver since 2.9.2 isn't available yet. I see the GSI default is 2.7.3. Can you update that to 2.9.2?
  2. Also, can you do the same cmake and w3emc updates to the Orion modulefile? I still see cmake and python loading before the stack modules. Best to load everything after the stack modules now, thanks!
  3. Might need to update the same cmake and w3emc version for the WCOSS2 modulefile too.

@MichaelLueken
Copy link

Thanks @MichaelLueken-NOAA ! It built ok on Hera, please see this log to confirm:

/scratch1/NCEPDEV/global/Kate.Friedman/git/dev_v16/sorc/logs/build_gsi.log_2

A few notes:

  1. NCO asked us to move to w3emc/2.9.2 (which I am getting hpc-stack folks to install on Hera/Orion). I ran the build on Hera with export w3emc_ver=2.9.0 set via g-w versions/hera.ver since 2.9.2 isn't available yet. I see the GSI default is 2.7.3. Can you update that to 2.9.2?
  2. Also, can you do the same cmake and w3emc updates to the Orion modulefile? I still see cmake and python loading before the stack modules. Best to load everything after the stack modules now, thanks!
  3. Might need to update the same cmake and w3emc version for the WCOSS2 modulefile too.

Thanks @KateFriedman-NOAA! I have updated the modulefiles for Hera, Orion, and WCOSS2 so that all modulel oads come after hpc-stack entries. I have also changed the w3emc default from 2.7.3 to 2.9.2. The tag is gfsda.v16.2.0.1.

@KateFriedman-NOAA
Copy link
Member

I have updated the modulefiles for Hera, Orion, and WCOSS2 so that all modulel oads come after hpc-stack entries. I have also changed the w3emc default from 2.7.3 to 2.9.2. The tag is gfsda.v16.2.0.1.

Thanks @MichaelLueken-NOAA ! I recloned the updated gfsda.v16.2.0.1 tag on Hera, Orion, and WCOSS2. I ran the build on Orion and Hera with w3emc/2.9.1 (waiting on 2.9.2 install still). I built it on WCOSS2 as is. Please see the following build logs and confirm they indeed built ok:

Orion: /work/noaa/global/kfriedma/git/dev_v16/sorc/logs/build_gsi.log_2
Hera: /scratch1/NCEPDEV/global/Kate.Friedman/git/dev_v16/sorc/logs/build_gsi.log_3
WCOSS2: /lfs/h2/emc/global/noscrub/Kate.Friedman/git/dev_v16/sorc/logs/build_gsi.log

Assuming those built ok I will use the resulting execs when I start tests with the dev_v16 branch on Hera/Orion. Will report any runtime issues. Still waiting on library/module installs and other component updates (which are waiting on the same module installs).

@MichaelLueken
Copy link

Thanks @KateFriedman-NOAA! I have checked the build logs and there is one issue that I noted. For Hera, the version of anaconda that is being used is the default from the GSI's modulefile.ProdGSI.hera.lua file - anaconda/2.3.0. Since Hera uses anaconda instead of python, should the hera.ver file in dev_v16 include:

export anaconda_ver=anaconda3-5.3.1

@KateFriedman-NOAA
Copy link
Member

Since Hera uses anaconda instead of python, should the hera.ver file in dev_v16 include:
export anaconda_ver=anaconda3-5.3.1

@MichaelLueken-NOAA Yes, good catch! I have added export anaconda_ver=anaconda3-5.3.1 to hera.ver and rerun the GSI build. Please see this log:
/scratch1/NCEPDEV/global/Kate.Friedman/git/dev_v16/sorc/logs/build_gsi.log_4

@MichaelLueken
Copy link

@KateFriedman-NOAA The new build log looks good!

@KateFriedman-NOAA
Copy link
Member

@KateFriedman-NOAA The new build log looks good!

Awesome, thanks for confirming @MichaelLueken-NOAA ! I'll let you know how it goes when I start running tests on Hera/Orion with this updated tag. Waiting for modules and other components still.

@KateFriedman-NOAA
Copy link
Member

For EMC_verif-global:
On Hera, the anaconda version being loaded is anaconda/anaconda3-5.3.1. For the version of MET I need (/contrib/met/modulefiles/met/9.1 ), the prerequisites is anaconda/latest. Is that okay that I load anaconda/latest instead of anaconda/anaconda3-5.3.1 for EMC_verif-global?

Using anaconda/latest would require at least the GSI and workflow to update (maybe others) and test with that version. I don't know how different they are.

On Orion: The version of MET needed (/apps/contrib/modulefiles/met/9.1 ) has prerequisites of intel/2020 and intelpython3/2020. For the global workflow, I believe intel/2018.4 and python/3.7.5 are the versions being used.

We're not using the 2020 versions yet and need to stick with the 2018 versions...at least regarding what we set via global-workflow. Is this a blocker for supporting METplus on Orion? Can we use the existing METplus versions we're using on Orion or has EMC_verif-global updated beyond that version too much now?

I'd prefer to avoid another layer of overrides for specific jobs but we may not have an option. :-/

@malloryprow
Copy link
Contributor

@KateFriedman-NOAA I'd say this is a blocker as the MET and METplus module files on Hera and Orion require that the anaconda/latest, and intel/2020 and intelpython3/2020 (respectively) be loaded. These were what were used in the building of them.

I'm not sure why these specific versions were used for the build, but the MET team would need to rebuild on both Hera and Orion if we want them to be using the same versions as the global workflow. I know they are pretty busy right now pushing to get the next minor release out in the next few weeks.

@KateFriedman-NOAA
Copy link
Member

I'd say this is a blocker as the MET and METplus module files on Hera and Orion require that the anaconda/latest, and intel/2020 and intelpython3/2020 (respectively) be loaded. These were what were used in the building of them.

Ok thanks for confirming @malloryprow . I'll need to speak with the workflow team about how we wanna support METplus for v16.2.0 on the R&D machines then. Stay tuned...thanks!

@KateFriedman-NOAA
Copy link
Member

The bulk of the work for this issue is now complete. Remaining work to introduce version files into the develop branch is being tracked in issue #671.

kayeekayee pushed a commit to kayeekayee/global-workflow that referenced this issue May 30, 2024
…AA-EMC#639)

* Make passing of PBL q tendency more general (not dependent on specific PBL scheme) for prog closure
* Bugfix for convection (prog closure) and gravity wave drag (for stochastic perturbations) needed for GFS/GEFS prototypes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Regular updates and maintenance work
Projects
None yet
Development

No branches or pull requests

5 participants