E3SM-Project / E3SM

Energy Exascale Earth System Model source code. NOTE: use "maint" branches for your work. Head of master is not validated.
https://docs.e3sm.org/E3SM
Other
343 stars 352 forks source link

user_nl_mpas* is Ignored #1276

Closed erichlf closed 6 years ago

erichlf commented 7 years ago

When trying to use a graph file which is not in the inputdata one should be able to change config_block_decomp_file_prefix to the desired value and then mpas- should be able to use this data. However, currently changing this value has no affect. I had a work-around whereby I would attempt a setup and build and then change the `Buildconf/mpas-.input_data_listvariable corresponding to the graph file (say graph96). However, this seems to now change when runningcase.submit`. Thus, I am left with no way to specify the location of the graph file.

If more details are needed maybe @jgfouca can fill in the rest.

mt5555 commented 7 years ago

Agreed - perl code in CIME, that somehow is not working for partition files, probably because the full name is autogenerated.

rljacob commented 7 years ago

All of the components have to interface with CIME and provide scripts to build namelists and the library (all components are built as a library). CIME then calls these. CIME calls mpas-o/cime_config/buildnml which calls mpas-o/bld/build-namelist. For the library build, CIME calls mpas-o/cime-config/buildlib. Its possible Doug did not fully integrate the MPAS namelist build with CIME.

jonbob commented 7 years ago

That is possible. I'll look at it when I have some time

gold2718 commented 7 years ago

I think this may be CIME version issue. I see that ACME is still checking input data during build but the CIME master doesn't call it until case.submit. @rljacob, does that make sense? Is this going to be fixed in an ACME CIME update?

rljacob commented 7 years ago

Yes that change (fewer checks of input data) is in CIME5.2, currently on next.

gold2718 commented 7 years ago

@jonbob, I think that will fix your issue, the integrator who merges the CIME 5.2 to master should check and close this issue.

jonbob commented 7 years ago

@gold2718 - sadly, I think it will just fail then during submit instead.

gold2718 commented 7 years ago

@jonbob, if it fails during submit then the necessary file is not present and the run will fail! If the file is present, then the Buildconf/mpas-o.input_data_list file must be in the correct format so that check_input_data will find it.

jonbob commented 7 years ago

@gold2718 - it's not set up that way. The graph files are not explicitly listed in the mpas namelists, and do not get picked up by the create_namelist_infile process. The mpas namelists have a "prefix" that defines the path and general filename, minus the task count. So the necessary file can be present, but check_input_data will still fail.

gold2718 commented 7 years ago

@jonbob, buildnml has the ability and I claim the duty to add required namelist items, even if they are not explicitly listed anywhere. Since the MPAS buildnml scripts have case logic for each grid, that is the natural place to add the required grid file(s) to the appropriate input_data_list file. The other models already do this. This would bring the MPAS buildnml routines up to the standard supported by the other models rather than place the user at risk of having a job die after waiting in the queue for 2 days merely because a required file was missing.

jonbob commented 7 years ago

@gold2718 - I looked, and none of the other components do anything with user_nl in their buildnml scripts except pass them to create_namelist_infile. So it's not obvious to me that we are not living up to any standard for the models.

erichlf commented 7 years ago

@jonbob CAM does the user_nl stuff within build-namelist if I understand things correctly. Right now, from what I can see, the writing of the input file is done directly from if statements within your buildnml, which isn't the standard used by cam either.

gold2718 commented 7 years ago

@erichlf, the separate build-namelist script is historical and not really important as the work could just as easily be done in buildnml. @jonbob, @erichlf is correct in that the user_nl_cam info is passed to build-namelist which adds items to the cam.input_data_list file. The MPAS* buildnml scripts could easily perform this functionality and address this bug without any changes to standard practice.

jonbob commented 7 years ago

@erichlf - I've come up with and tested a solution to this problem. I'll run it by the other MPAS developers tomorrow and try to get it in as soon as the repos are open. Thanks for your patience.

mark-petersen commented 6 years ago

@erichlf and @jgfouca Is this still a problem on the current master?

jgfouca commented 6 years ago

@jonbob is this fixed?

jonbob commented 6 years ago

@mark-petersen , @jgfouca - this is not yet fixed

erichlf commented 6 years ago

I thought it was fixed, but of course, I don't have access to what I had done.

rljacob commented 6 years ago

This came up on the performance call today. Tagging @ndkeen, @philipwjones . This needs to be fixed.

jonbob commented 6 years ago

OK, I have a solution worked out, but it's kind of a patch. We really need to make the scripts more closely match what mpas needs -- meaning separate scripts to build the streams files as well as namelists. But that may be more of a V2 issue, so I'll work on the patch for now.