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

Add libraries required to build UFS-Aerosols #252

Merged
merged 18 commits into from
Jun 24, 2021

Conversation

rmontuoro
Copy link
Contributor

This PR adds a set of new libraries required to build the UFS aerosol component based on the NASA GOCART model.

Note that the following libraries are also added for convenience to create modules used to build MAPL. These libraries, however, are not required to build UFS-Aerosols.

  • ESMA_cmake, v3.4.3
  • CMakeModules

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

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

Please see inline comments.

libs/build_esma_cmake.sh Outdated Show resolved Hide resolved
libs/build_gftl_shared.sh Outdated Show resolved Hide resolved
libs/build_mapl.sh Outdated Show resolved Hide resolved
libs/build_mapl.sh Outdated Show resolved Hide resolved
libs/build_mapl.sh Outdated Show resolved Hide resolved
stack/stack_noaa.yaml Outdated Show resolved Hide resolved
stack/stack_noaa.yaml Outdated Show resolved Hide resolved
stack/stack_noaa.yaml Outdated Show resolved Hide resolved
stack/stack_noaa.yaml Show resolved Hide resolved
@aerorahul
Copy link
Contributor

Also, please add the newly added components to stack_custom.yaml and stack_mac.yaml for CI.

@rmontuoro
Copy link
Contributor Author

Also, please add the newly added components to stack_custom.yaml and stack_mac.yaml for CI.

Done in c75b290.

@rmontuoro rmontuoro requested a review from aerorahul June 17, 2021 00:19
@kgerheiser
Copy link
Contributor

The CI is failing because MAPL can't find ESMF when built without modules. I think you need to set ESMFMKFILE in build_mapl.sh

@rmontuoro
Copy link
Contributor Author

The CI is failing because MAPL can't find ESMF when built without modules. I think you need to set ESMFMKFILE in build_mapl.sh

Would it be better to set ESMFMKFILE in the ESMF modulefile?

@kgerheiser
Copy link
Contributor

kgerheiser commented Jun 17, 2021

This is when building without modules. On the else side of if $MODULES.

I think $ESMF_ROOT/lib/esmf.mk should do the trick.

@rmontuoro
Copy link
Contributor Author

This is when building without modules. On the else side of if $MODULES.

I think $ESMF_ROOT/lib/esmf.mk should do the trick.

Done. Thank you!

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

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

Some more comments regarding the use of official repositories.

libs/build_cmakemodules.sh Outdated Show resolved Hide resolved
libs/build_esma_cmake.sh Outdated Show resolved Hide resolved
libs/build_esma_cmake.sh Outdated Show resolved Hide resolved
libs/build_esma_cmake.sh Outdated Show resolved Hide resolved
libs/build_cmakemodules.sh Outdated Show resolved Hide resolved
libs/build_cmakemodules.sh Outdated Show resolved Hide resolved
libs/build_gftl_shared.sh Outdated Show resolved Hide resolved
libs/build_mapl.sh Outdated Show resolved Hide resolved
libs/build_yafyaml.sh Outdated Show resolved Hide resolved
ESMA_cmake, gFTL-shared, yaFyaml, and MAPL.
@kgerheiser
Copy link
Contributor

I can't figure out why the build is failing on Ubuntu. HDF5 has an error linking to pthreads, but I'm not sure why. I'm pretty sure pthreads is a built-in library. It was working previously.

@kgerheiser
Copy link
Contributor

Looks like everything is resolved. I am trying to figure out the CI failure, and then this can be merged.

@kgerheiser
Copy link
Contributor

Changing the OS to Ubuntu 18.04 works

stack/stack_custom.yaml Outdated Show resolved Hide resolved
stack/stack_mac.yaml Outdated Show resolved Hide resolved
@kgerheiser
Copy link
Contributor

Thanks @rmontuoro. I anticipate the builds will pass now.

@kgerheiser
Copy link
Contributor

kgerheiser commented Jun 21, 2021

The build gets a lot further on Ubuntu now, and fails in MAPL.

/home/runner/work/hpc-stack/hpc-stack/mpich/pkg/mapl-v2.7.1/shared/Interp/Interp_implementation.F90:1:25:
1 | submodule (MAPL_InterpMod) Interp_implementation
|                         1
2 |   use, intrinsic :: iso_fortran_env, only: REAL32
 |                                                 2
Error: Symbol ‘real32’ at (1) conflicts with the symbol at (2)
/home/runner/work/hpc-stack/hpc-stack/mpich/pkg/mapl-v2.7.1/shared/Interp/Interp_implementation.F90:1:25:
1 | submodule (MAPL_InterpMod) Interp_implementation
|                         1
2 |   use, intrinsic :: iso_fortran_env, only: REAL32
3 |   use, intrinsic :: iso_fortran_env, only: REAL64
|                                                 2
Error: Symbol ‘real64’ at (1) conflicts with the symbol at (2)

Seems like a compiler error. It works on macOS which is using gfortran 9.4.0, but Ubuntu is using gfortran 9.3.0. I suspect that's the difference.

@rmontuoro
Copy link
Contributor Author

/home/runner/work/hpc-stack/hpc-stack/mpich/pkg/mapl-v2.7.1/shared/Interp/Interp_implementation.F90:1:25:
1 | submodule (MAPL_InterpMod) Interp_implementation
| 1
2 | use, intrinsic :: iso_fortran_env, only: REAL32
| 2
Error: Symbol ‘real32’ at (1) conflicts with the symbol at (2)
/home/runner/work/hpc-stack/hpc-stack/mpich/pkg/mapl-v2.7.1/shared/Interp/Interp_implementation.F90:1:25:
1 | submodule (MAPL_InterpMod) Interp_implementation
| 1
2 | use, intrinsic :: iso_fortran_env, only: REAL32
3 | use, intrinsic :: iso_fortran_env, only: REAL64
| 2
Error: Symbol ‘real64’ at (1) conflicts with the symbol at (2)

I've opened an issue with NASA.

@kgerheiser
Copy link
Contributor

I think I just need to update GCC. I found a bug on the GCC forums from this year that seems related.

@climbfuji
Copy link
Contributor

I think I just need to update GCC. I found a bug on the GCC forums from this year that seems related.

From which version to which? We need to be able to support GNU 9.x for the moment.

@kgerheiser
Copy link
Contributor

It appears MAPL doesn't build with gfortran 9.3.0, but works with 9.4.0. I couldn't find a way to install 9.4.0 in the CI, so I'm trying 10.2.0.

@climbfuji
Copy link
Contributor

It appears MAPL doesn't build with gfortran 9.3.0, but works with 9.4.0. I couldn't find a way to install 9.4.0 in the CI, so I'm trying 10.2.0.

Means we need a patch so that it works with 9.1.0+, otherwise it's a showstopper or at least will cause a longer delay, because we would need to update the GNU compilers on Hera and Cheyenne and possibly for the CI tests.

@kgerheiser
Copy link
Contributor

I'll investigate a little more and let you know

@rmontuoro
Copy link
Contributor Author

@kgerheiser - see comment in MAPL issue #892

@kgerheiser
Copy link
Contributor

@climbfuji we have a fix that allows MAPL to build with gfortran 9.x

@climbfuji
Copy link
Contributor

@climbfuji we have a fix that allows MAPL to build with gfortran 9.x

Thanks, that's great news.

@rmontuoro
Copy link
Contributor Author

A new MAPL release including the fix is being assembled and should be available soon.

@rmontuoro
Copy link
Contributor Author

@kgerheiser - Could you please look into the openmpi build failure? We may need to specify proper linking flags for C++ bindings.

@kgerheiser
Copy link
Contributor

I thought that might happen. I have a fix.

@kgerheiser
Copy link
Contributor

I put in a PR to your branch. If you build OpenMPI yourself then the C++ library is linked in properly when using the Fortran wrapper.

Build OpenMPI for correct C++ linking
@kgerheiser
Copy link
Contributor

All builds pass now. @aerorahul any more comments?

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

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

Looks good.
Thanks @rmontuoro for addressing all the comments.

@kgerheiser kgerheiser merged commit d37fb9e into NOAA-EMC:develop Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants