-
Notifications
You must be signed in to change notification settings - Fork 318
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
mksurfdat toolchain: portability across platforms #645
Comments
Part of this can be accomplished by using the package manager for OCGIS as the requirements for the mapping step is the most difficult part of the toolchain. I was going to make a separate issue for just mkmapdata, but I think it's fine to use this for that purpose. @slevisconsulting is going to make sure the OCGIS package manager allows him to easily work on different platforms. |
@bekozi here may be a better place to send me the initial instructions that we discussed, instead of by email. |
Installation instructions for ocgis and conda-forge:
Ideally, this should work unless we have platform-specific install issues...which are not necessarily uncommon. We should note that this installs a serial FYI, the documentation for an ocgis installation is here: https://ocgis.readthedocs.io/en/latest/install.html#using-the-package-manager |
First followed advice from here: On izumi: Then followed advice from here: Next I tried the command that you gave in step (2) @bekozi: Tried this next @bekozi could you give me advice at this point. I don't want to mess anything up... |
@bekozi pls ignore the request for help in my previous post. I made progress as follows: |
Next at github.com/NCPP/ocgis: I also tried the same at github.com/NESII/esmpy-feedstock: |
Modified PYTHONPATH in script. |
|
Submitted my script |
@bekozi let me know if you have any ideas or if we should set up a time to debug together... |
I tried various tests found here and all gave errors. Can't say if I'm using the tests correctly though... |
|
Forgot to ask - could you please attach the error output from the testing you tried? There should not be extensive test failures. |
I repeated this with I tried repeating the above with |
Also here are the test failures:
|
@slevisconsulting Thanks for the additional info. I think it's best we have a debug meeting to discuss. It looks like the environment paths are off and python is having difficulty finding basic packages. |
Started over from
BUT changed |
Next, trying to run my ocgis script interactively on izumi: |
Hmmm. I'd have to play around with it to see if I could get it to work. I can't see a reason why it would work interactively, but not inside the script. I'm only guessing that the call to ocgis, is starting up a new shell and isn't passing the environment down. |
Aha! I added the next two lines: |
I pulled @bekozi 's latest updates and now my test scripts generate weight files successfully on izumi. These are my test scripts: |
@ekluzek now that we have cheyenne and izumi working, do you have other machines in mind that I should try? |
@slevisconsulting cheyenne and izumi are our main test machines. But, I'd like to hear that things work for the type of machines that @barlage thinks WRF users might use. So it would be good to hear that it would be easy to run on a desktop and/or laptop (at least for say a single-point). I'm thinking you could try hobart and it should probably just run out of the box. But, I'd be interested in hearing if it runs on the CGD machines such as thorodin. That might take a little more work. And then if it's possible to run on my mac laptop that would be interesting as well. But, if any of this takes a ton of time, to port to, it's not worth it. It would just be good to know. |
You are correct: I ran the test script on hobart and got identical results as from izumi. I will look into thorodin next. We can talk about trying on your mac laptop and see if we need help from Ben. Let me know. |
The same sequence was successful on thorodin, too. |
@billsacks suggested that I get ocgis working in mkmapdata.sh on izumi (as I have done on cheyenne) if I first found that mkmapdata.sh worked on izumi. I have found that mkmapdata.sh gives this error on izumi: ...although I made this change: |
This is being accomplished in a different manner. We won't be using OCGIS. PR #1663 provides for this by making mksurfdata a MPI program that inputs mesh files for the different grids directly. It then can be run on multiple processors. It does then require MPI and a parallel cluster to run on. Currently, our build and run is only setup for cheyenne, but we can extend it for other machines. Possibly the way to do that might be to use the cime configure capability so that any cime machine could be used to do the build. Possibly the batch ability in cime could be used as well. But, this would need to be looked into. |
In #1663 there are two issues now. The build is hardcoded to only work on cheyenne, and the batch submission is setup only for cheyenne. For generality both of these need to be made to work on more systems. The build is using CMake, but has hardcoded paths for the libraries: MPI, ESMF, NetCDF, and PIO. This is mostly accomplished through the ESMF makefile esmf.mk fragment. If this is pointed to correctly the build will work anywhere. See this note from ESMF
Currently we do have a hardcoded path for ESMFMKFILE, but a more general mechanism using an env variable for ESMFMKFILE could easily be added. Since, batch systems are widely varied, it might be OK to expect the user to customize the batch script that gen_mksurfdata_jobscript_single.py and gen_mksurfdata_jobscript_multi.py create. |
@ekluzek - I am aware of the hardwiring that is in place. This Makefile was only a temporary placeholder until we got a new ESMF library in place (which is the case now - given the latest beta snapshot that ESMF has created). This library was needed in order to be able to read in very high resolution mesh files without a corresponding memory bottleneck being encountered. I am planning on working with @jedwards4b - to move the entire build to CMake - but have not had a chance to do this until now. |
@mvertens yes, sounds good. I'm adding to this issue so we document the path forward. I actually don't think the build is that bad, it's using cime configure, and it's reliant on the ESMF build, which is required. I think it's good to be reliant on cime configure, since to run the model you have to port to cime anyway. And because the ESMF build is going to already bring: MPI, NetCDF, and PIO all together in one build, it's really not bad to be dependent on it. The ESMF team has also invested lots of effort at making ESMF reasonable to build on HPC systems. And many HPC systems are already building a version for users on their systems. The main thing I see to improve it is to document to users how to build/find the ESMF build on their system and include it in the build of mksurfdata_esmf. Of course if you have plans to make this even more automated, that sounds great. But, just putting a little bit of effort to make the current system a little more general would really go really far. I suspect for example that it wouldn't be hard to get the current build to work on izumi, since we have ESMF built there and it's ported to cime. Showing that we could do that would give us a lot of confidence that the new mksurfdata_esmf could easily be ported to any HPC system. |
I think this is all handled in the new mksurfdata_esmf at this point, so I'm closing. |
Make sure the tool build can work on a wide range of systems.
The text was updated successfully, but these errors were encountered: