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

mom5: add new variant "type" #72

Merged
merged 1 commit into from
Mar 8, 2024
Merged

mom5: add new variant "type" #72

merged 1 commit into from
Mar 8, 2024

Conversation

harshula
Copy link
Collaborator

@harshula harshula commented Mar 4, 2024

  • "type" will have options ACCESS-CM, ACCESS-OM, ACCESS-ESM, ACCESS-OM-BGC and MOM_solo.

* "type" will have options ACCESS-CM, ACCESS-OM, ACCESS-ESM, ACCESS-OM-BGC
  and MOM_solo.
@harshula harshula requested a review from aidanheerdegen March 4, 2024 12:31
@harshula harshula self-assigned this Mar 4, 2024
@harshula
Copy link
Collaborator Author

harshula commented Mar 4, 2024

Successfully built, in a docker image, type variants:

# spack install mom5 %[email protected]
# spack install mom5 type=MOM_solo %[email protected]
# spack install mom5 type=ACCESS-OM-BGC %[email protected]

Please note the following warning:

==> Warning: Module file /opt/release/modules/linux-rocky8-x86_64/mom5/master exists and will not be overwritten

We may need to include non-default variant names in the module name.

@harshula
Copy link
Collaborator Author

harshula commented Mar 4, 2024

Fixes #71

@harshula
Copy link
Collaborator Author

harshula commented Mar 4, 2024

On a Gadi login node:

$ spack install mom5 type=MOM_solo ^[email protected] ^[email protected]  ^[email protected] %[email protected]
...
ifort: error #10106: Fatal error in /apps/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64/fortcom, terminated by kill signal
compilation aborted for /scratch/tm70/hj1810/tmp/spack-stage/spack-stage-mom5-master-c4myjhoeotsku627d4pfvaurluscrwrr/spack-src/src/ocean_shared/generic_tracers/generic_miniBLING.F90 (code 1)
make: *** [Makefile:107: generic_miniBLING.o] Error 1
make: *** Waiting for unfinished jobs....
Make failed to create lib_ocean.a

This appears to be Gadi killing the process for some reason.

@harshula
Copy link
Collaborator Author

harshula commented Mar 5, 2024

Hi @aidanheerdegen , If you could review this ASAP, then I can merge it. Or do want to use this PR to test the CD? The Gadi build failure with type MOM_solo appears to be a problem with the Gadi login node, not the SPD, and may go away on another node (e.g. compute node) or after a reboot. I would rather keep MOM_solo and note that it is a Gadi problem.

@aidanheerdegen
Copy link
Member

If you could review this ASAP, then I can merge it

Sorry, didn't get a chance today. Will prioritise for tomorrow.

Don't need it for CD testing.

@aidanheerdegen
Copy link
Member

Wasted 40 minutes and got errors like this:

     153    In file included from /usr/include/bits/floatn.h(119),                                                                                             
     154                     from /usr/include/math.h(43),                                                                                                     
     155                     from /apps/intel/compilers_and_libraries_2019.5.281/linux/compiler/include/math.h(177),                                           
     156                     from /scratch/tm70/aph502/tmp/spack-stage/spack-stage-mom5-master-aollz5h3gjqjhb3pkgfkkqqifm75hals/spack-src/src/postprocessing/mp
            pnccombine/mppnccombine.c(108):                                                                                                                    
  >> 157    /usr/include/bits/floatn-common.h(214): error: invalid combination of type specifiers                                                               
     158      typedef float _Float32; 
...

Because I was using the conda environment python and it must have some other include paths set. It was picking up incompatible definitions of float

$ grep 'typedef float' /usr/include/math.h | grep typedef
typedef float float_t;
$ grep 'typedef float'  /usr/include/bits/floatn-common.h
typedef float _Float16 __attribute__ ((__mode__ (__HF__)));
typedef float _Float32;

This is just FYI for anyone else in the future, or me when I forget this.

@aidanheerdegen
Copy link
Member

aidanheerdegen commented Mar 8, 2024

So BGC build works for me on gadi

$ spack install mom5 type=ACCESS-OM-BGC ^[email protected] ^[email protected]  ^[email protected] %[email protected]
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/datetime-fortran-1.7.0-aretozixwsdz42owabgzeiuxooyxrspg                       
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/json-fortran-8.3.0-nyxvikkez6fu64xtbeqqz2a4wngikfgi
==> [email protected] : has external module in ['openmpi/4.0.2']                                                      
[+] /apps/openmpi/4.0.2 (external openmpi-4.0.2-4jwtg3nt7p3zsod4rvn3i3jyyop3arpe)                                    
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/pkgconf-1.9.5-uyq7tvpnuuo3gosnplkvuxktaeeipuqk                                
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/zlib-1.2.13-arj4bfz33zf63gvfionhorrrveci6kb4
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/hdf5-1.14.1-2-a6mpuk7tw5e4pyukxwalooc7jfldalcf
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/netcdf-c-4.7.4-i3inxzaihefr3rqljoovhyevwai6bsff
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/netcdf-fortran-4.5.2-mnx4gghyb5gngsl3fgosud6k72yu2u6a                         
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/oasis3-mct-master-kv5jbt5qltp2kymqka5joksqbatdzspp
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/libaccessom2-master-ajlvl3kyjim4eccn3onqvfp2dvjgyupv
==> Installing mom5-master-aollz5h3gjqjhb3pkgfkkqqifm75hals                           
==> No binary for mom5-master-aollz5h3gjqjhb3pkgfkkqqifm75hals found: installing from source                                                                   
==> No patches needed for mom5                                                                         
==> mom5: Executing phase: 'edit'                                                                                
==> mom5: Executing phase: 'build'                                                               
==> mom5: Executing phase: 'install'                                                                                                                            
==> Warning: Module file /g/data/tm70/aph502/spack-build/release/modules/linux-rocky8-x86_64/mom5/master exists and will not be overwritten                    
==> mom5: Successfully installed mom5-master-aollz5h3gjqjhb3pkgfkkqqifm75hals                                                                                  
  Stage: 7.56s.  Edit: 0.08s.  Build: 4m 38.26s.  Install: 0.19s.  Post-install: 0.32s.  Total: 4m 48.39s
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/mom5-master-aollz5h3gjqjhb3pkgfkkqqifm75hals

The build time seems very fast, even though it is just building MOM.

It produces a binary with the type correctly included in the name

$ ls spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/mom5-master-aollz5h3gjqjhb3pkgfkkqqifm75hals/bin/
fms_ACCESS-OM-BGC.x  mppnccombine.spack

Neat!

Copy link
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

LGTM. Sorry it has taken to long for me to review it.

@harshula harshula merged commit a2a4887 into main Mar 8, 2024
1 check failed
@aidanheerdegen
Copy link
Member

Weird. Couldn't reproduce the MOM_solo error. Let's call that a weird aberration as you suggested it might be.

$ spack install mom5 type=MOM_solo ^[email protected] ^[email protected]  ^[email protected] %[email protected]
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/datetime-fortran-1.7.0-aretozixwsdz42owabgzeiuxooyxrspg
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/json-fortran-8.3.0-nyxvikkez6fu64xtbeqqz2a4wngikfgi
==> [email protected] : has external module in ['openmpi/4.0.2']
[+] /apps/openmpi/4.0.2 (external openmpi-4.0.2-4jwtg3nt7p3zsod4rvn3i3jyyop3arpe)
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/pkgconf-1.9.5-uyq7tvpnuuo3gosnplkvuxktaeeipuqk
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/zlib-1.2.13-arj4bfz33zf63gvfionhorrrveci6kb4
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/hdf5-1.14.1-2-a6mpuk7tw5e4pyukxwalooc7jfldalcf
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/netcdf-c-4.7.4-i3inxzaihefr3rqljoovhyevwai6bsff
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/netcdf-fortran-4.5.2-mnx4gghyb5gngsl3fgosud6k72yu2u6a
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/oasis3-mct-master-kv5jbt5qltp2kymqka5joksqbatdzspp
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/libaccessom2-master-ajlvl3kyjim4eccn3onqvfp2dvjgyupv
==> Installing mom5-master-4jfyunr427g3rk667hcyir7xrfytlqoo
==> No binary for mom5-master-4jfyunr427g3rk667hcyir7xrfytlqoo found: installing from source
==> No patches needed for mom5
==> mom5: Executing phase: 'edit'
==> mom5: Executing phase: 'build'
==> mom5: Executing phase: 'install'
==> Warning: Module file /g/data/tm70/aph502/spack-build/release/modules/linux-rocky8-x86_64/mom5/master exists and will not be overwritten
==> mom5: Successfully installed mom5-master-4jfyunr427g3rk667hcyir7xrfytlqoo
  Stage: 6.55s.  Edit: 0.06s.  Build: 8m 4.44s.  Install: 0.50s.  Post-install: 0.53s.  Total: 8m 13.89s
[+] /g/data/tm70/aph502/spack-build/release/linux-rocky8-x86_64/intel-19.0.5.281/mom5-master-4jfyunr427g3rk667hcyir7xrfytlqoo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants