-
Notifications
You must be signed in to change notification settings - Fork 159
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
Fix writing min/max variables using PFIO #1673
base: eis-freshwater2
Are you sure you want to change the base?
Conversation
This fixes writing min/max fields using PFIO.
Note that support for writing routing varibles using PFIO is still broken.
I compiled this with comp/intel/2023.2.1 and found now errors. However, strict checks identified a number of unused local variables. I took the liberty of removing them to slightly trim the memory usage. There is an unused argument (local_var2d) with subroutine PFIO_write_single_routingvar, but I elected not to remove it to avoid breaking code. |
Note that this PR still requires a review by @dmocko |
I am trying to compile the code with the "-2" configure option on the Milan nodes using lisf_7.5_intel_2023.2.1_mapl (using "strict-checks"). However, I am receiving this error:
My make/user.cfg is:
The above error happens after trying to compile: If I add this to my make/user.cfg as well:
..then the error happens when trying to compile: Any advice on what's happening? |
Ugh - my bad. I forgot to consult: #1642 Trying again, and will update if I still am unable to compile. Sheesh - first I post on the wrong thread, and now this. |
Hi @dmocko: You need to edit the configure.lis file and change the flags per the error message. The underlying cause is the latest Intel C compiler (icx) is a complete replacement of icc, and some of the compiler flags have changed. Since LISF 7.5 is old, the flags have not been changed. (Note that in master, those icc flags have been commented out. That's not a perfect solution either, but since most LIS code is Fortran it's reasonable to focus on debugging the Fortran code instead of C. And the user can always add them manually.) |
ADDENDUM: We probably need to edit arch/Config.pl to check the exact name of the Intel compiler being used, and provide the appropriate flags. Current practice is to simply check if "linux_ifc" is used, which assumes icc and ifort. |
Update - the code compiles with "strict-check"s configured, but crashed during the model run. It seems unrelated to this PR, however. Here is the error message:
Line 968 of Indeed, this variable is not defined above unless set to ".TRUE." for a conditional. This subroutine was added by the LIS team to be able to provide Potential ET output from Noah-MP-4.0.1 LSM. As we need this variable for NLDAS-3 and HydroGlobe outputs, I will fix it by adding this line:
..around Line 910 of this subroutine. Will re-compile and re-run today. |
Good catch. Yes, that is unrelated to this pull request. We should open a new pull request with the bug fix. Thanks. |
I will open a separate pull request for the FRZGRA undefined variable into the public-7.5 branch. |
I compiled successfully with "strick-checks" turned on, but the model crashed again.
Line 520 of LIS_coreMod.F90 is here: I'm not sure why the model is crashing here. It may be a memory issue triggered due to "strick-checks" being on. I will try again with the default "2" optimization option during configure. |
The code ran with optimization "2" and produced output.
|
Description
Fix writing min/max variables using PFIO.
Please note that support for writing routing variables using PFIO is still broken.