-
Notifications
You must be signed in to change notification settings - Fork 53
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
Clarification of use of various (external) libraries for cesm-coupling #456
Comments
Perhaps a bit of more explanation of what I am after; I would like to see the path from pre-built libraries in the mizuRoute Makefile, sth like:
in case the user sets the flags to |
Hi Erik (@ekluzek), any comments on this?? maybe we will need to talk to Brian (Dobbin)?? |
More information on what I am currently trying to achieve. I am trying to create a dockerfile with a spack environment inside it. I managed to clone and build the mizuRoute main branch with some minor modifications to the makefile, however, I am not successful with the cesm-coupling branch. I highly suspect this is because of the interconnected path for the libraries that are populated by checkout_extrenals and need to be built during the compilation of mizuRoute. The dockerfile looks like this:
after building the image and run the container:
or restart existing container after running the target container in docker desktop
after running the docker container, activating the spack env
and try to see where the packages are installed
inside the library can be check by cd to the path of spack build location
I believe if the path are separated in the makefile I should be able to first manually link each of the built packages to the makefile and hopefully compile mizuRoute inside the container (similar to the step I took for compiling the main branch). |
Ok, I tested compiling with system installed parallelio, and get it compiled. The timing functions used in mizuRoute does not directly use the GPTL timing functions, but use the module built in parallelio that wrap GPTL functions (the module called perf_mod, and functions like t_prf, t_finalizedf). So If I try to use the system installed gptl, the syntax is not matched and is not be compiled. So gptl library needs to be built with parallelio, then mizuRoute should be compiled. For me, I cannot re-build parallelio with gptl on NCAR HPC (or maybe I could ask if it exists), so I commented out all the timing functions from perf_mod, and excluded gptl, then compiled. So I changed the makefile this portion (and removed yes from isGPTL =)
I am not sure what the best way to handle gptl so it works for both stand-alone and cesm (cesm use gptl from parallelio) |
#461 removed uneeded externals (mpi-serial, mct, cime), so it clarifies a lot of this. So only PIO is needed now. The GPTL library is still an issue though because the PIO build needs to have it built with GPTL enabled in order to use it. So building it within the mizuRoute build always works, but using a pre-built library requires that library to have GPTL enabled, and that isn't always the case. |
Below is based on my non-expert understanding, apologize in advance if not accurate.
Currently, the Makefile for
cesm-coupling
branch assumes the structure libraries that are prepared by./manage_externals/checkout_externals
. This perhaps results in mizuRoute Makefile, or the Makefile for libraries, assuming a relative path to each of the needed files during compilation. Tracking each of the libraries also gets very complex across many existing Makefiles.A way forward can be to specify all the packages, similar to netcdf for example, in mizuRoute Makefile. This link can be for
gptl
orparallelio
. The Makefile can be directly pointed at the location of the libraries if they are built prior to the compilation of mizuRoute. This also makes it perhaps easier to link the Makefile to libraries prepared by./manage_externals/checkout_externals
.The text was updated successfully, but these errors were encountered: