-
Notifications
You must be signed in to change notification settings - Fork 207
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
xmlquery issue when values are set to match another variable #4646
Comments
This should work and recursively give you the value of STOP_N. I just tried in the latest cime master and it works as expected. (cime6.0.250) |
Ok, then maybe it's simply time to update the cime submodule in our fork. Thanks for checking! Edit: uhm, I tried to checkout cime6.0.250, and still got the same error. @jgfouca could there be something funky in e3sm? |
It may be E3SM-only. I've assigned @jasonb5 |
I may have a suspect. In generic_xml.py, we have for m in reference_re.finditer(item_data):
var = m.groups()[0]
print (f"found m={m}, var={var}")
logger.debug("find: {}".format(var))
# The overridden versions of this method do not simply return None
# so the pylint should not be flagging this
# pylint: disable=assignment-from-none
ref = self.get_value(var, subgroup=subgroup)
... However, the referenced var may be in a different subgroup. E.g., in my case, HIST_N is in the group |
I just tried ./xmlquery HIST_N on latest e3sm master with a case built back on May 14 and it works for me. |
@rljacob , try this case: SMS.ne256pg2_ne256pg2.F2010-SCREAMv1 |
Still works. See /home/jacob/E3SM/cime/scripts/Fscream on Chrysalis. |
Now I'm really confused. |
Is it an old case you're trying to query? If you're doing that with a newer CIME, it may not work. |
I just tried again, making sure i was on lastest master with subs updated, same error. This is on mappy. |
Oh weird. I tried actually doing "create_test" and going to the casedir and now I see the error. |
It will only occur with create_test and not with create_newcase since the setting of |
I went to a test directory created in our overnight testing and it was fine. If it wasn't, all the tests would fail since there would be no coupler history output without changing HIST_N from its default. |
I don't think that's the case - you can set the value of HIST_N - the reported problem is that you cannot query the value after setting HIST_N=$STOP_IN |
Is that overnight test directory on mappy - where they are apparently having problems? If so can you try ./xmlquery HIST_N in one of those ERS tests? |
Oh I see what you're saying. Its always the case that HIST_N is set as |
To be clear, all the basics are running fine. It's only xmlquery for specific items that's the problem. |
No I'm trying Chrysalis. I've seen ./xmlquery HIST_N give an error on a test dir I just created but it works fine in a test dir created by the overnight testing. On the same machine. |
It must be something about that case and the SMS test. I tried ./create_test --no-build ERP.ne256pg2_ne256pg2.F2010-SCREAMv1 and ./xmlquery HIST_N worked.. |
For ERS/ERP tests, I suspect HIST_N is set to an integer, and not $STOP_N? |
By default, STOP_N is 5 for SMS and 11 for ERS. |
I can confirm that also on my laptop |
@bartgol The issues is with I'm thinking the fix is probably making sure values not provided in config_tests.xml are given a default when the file is generated. Changing the grouping could work too, might be simpler than the first. I don't think we could remove the Lines 553 to 557 in 67ade4a
|
What if we allowed to specify indirect parameters via "scoping"? I'm thinking something like setting for m in reference_re.finditer(item_data):
var = m.groups()[0]
logger.debug("find: {}".format(var))
# The overridden versions of this method do not simply return None
# so the pylint should not be flagging this
# pylint: disable=assignment-from-none
tokens = var.split('::')
if len(tokens)==2:
ref = self.get_value(tokens[0], subgroup=tokens[1])
else:
ref = self.get_value(var, subgroup=subgroup) I used the |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I'm getting this error with --listall (or when query the HIST_N variable):
Did something change in CIME related to xmlquery? I don't think we recently changed the default for HIST_N, so I'm guessing this is a new thing? I'm using the tag cime6.0.226 (4388509).
The text was updated successfully, but these errors were encountered: