-
Notifications
You must be signed in to change notification settings - Fork 344
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 cmake nvhpc support #1286
base: develop
Are you sure you want to change the base?
Add cmake nvhpc support #1286
Conversation
This includes conditionally setting the MPI_Fortran_COMPILER prior to searching for the MPI package. This also includes adding a number of defines and compiler switches when the nvhpc toolchain is detected. For simplification the NetCDF dependencies were removed (only the parallel netcdf packages are needed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the FindNetCDF.cmake file is no longer used, you may want to delete it. Other than that, I was able to build this branch on my personal Linux desktop and on Aspire2a (both use GNU and OpenMPI) without any problems.
It's possible that PIO would require netCDF, however. So perhaps the |
I will test that and respond accordingly. Thanks for the heads up about that possibility. @mgduda I noticed that Perhaps |
Given that the PIO version of mpas_atmosphere (what atmosphere_model is named when building with cmake) builds successfully without using Other than that, are there other issues I need to address before we can consider merging this PR? (I have two downstream PR's in the mpas-bundle repository which depend on this PR.) |
@jim-p-w I think it might be getting away with building if you are linking against a dynamic library of PIO. If it is static, it does require netCDF : MPAS-Model/cmake/Modules/FindPIO.cmake Line 116 in b669db1
I would also think if it needs it, it should call |
@islas @amstokely @michalakes In that case I will add back the call to find the netcdf package if building PIO. Thanks for the info Anthony! The netcdf package is now required when building with PIO. |
This PR adds support for using the nvhpc toolchain when building with cmake.
The primary changes include the following when the nvhpc toolchain is detected:
MPI_Fortran_COMPILER
variable tompifort
prior to searching for the MPI package.For simplicity, the dependencies on netcdf are removed. MPAS-Model only depends on the parallel netcdf packages.
To test the nvhpc toolchain, a regional test case was submitted to gpu nodes, and the output
was compared to the output from running it against an nvhpc build built with make.
The test output was the same.
To ensure the removal of the netcdf dependencies is backward compatible, the mpas-bundle software was built with the gnu toolchain. Everything built properly.
The result of the build was used to run the panda-c cylc test suite, all tests passed.