Comments (25)
Not true: https://github.com/ESMCI/cime/blob/master/CIME/data/config/config_tests.xml#L270
from cime.
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)
from cime.
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?
from cime.
It may be E3SM-only. I've assigned @jasonb5
from cime.
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 run_drv_history
, while STOP_N is in run_begin_stop_restart
. Removing the subgroup arg from the get_value
call, makes things work. However, that means that the referenced var must be unique across the XML file, which may be a restriction.
from cime.
I just tried ./xmlquery HIST_N on latest e3sm master with a case built back on May 14 and it works for me.
from cime.
@rljacob , try this case: SMS.ne256pg2_ne256pg2.F2010-SCREAMv1
from cime.
Still works. See /home/jacob/E3SM/cime/scripts/Fscream on Chrysalis.
from cime.
Now I'm really confused.
from cime.
Is it an old case you're trying to query? If you're doing that with a newer CIME, it may not work.
from cime.
I just tried again, making sure i was on lastest master with subs updated, same error. This is on mappy.
from cime.
Oh weird. I tried actually doing "create_test" and going to the casedir and now I see the error.
Try making your case with: ./create_newcase --case Fscream --compset F2010-SCREAMv1 --res ne256pg2_ne256pg2 and going to the casedir it creates.
from cime.
It will only occur with create_test and not with create_newcase since the setting of
HIST_N=$STOP_N happens in config_tests.xml
from cime.
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.
from cime.
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
from cime.
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?
from cime.
Oh I see what you're saying. Its always the case that HIST_N is set as <HIST_N>$STOP_N</HIST_N>
in a test. But ./xmlquery is working in at least one testdir I tried.
from cime.
To be clear, all the basics are running fine. It's only xmlquery for specific items that's the problem.
from cime.
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.
from cime.
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..
from cime.
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?
from cime.
By default, STOP_N is 5 for SMS and 11 for ERS.
from cime.
I can confirm that also on my laptop ./xmlquery HIST_N
works with an ERP test, but fails with an SMS one. My theory above regarding HIST_N and STOP_N being in different groups must be wrong (or incomplete).
from cime.
@bartgol The issues is with HIST_N
and STOP_N
being in different groups. The reason ERS
, ERP
, IRT
, etc continue work is due to it having STOP_N
defined in env_test.xml
. Any test with <HIST_N>$STOP_N</HIST_N>
and <STOP_N>...</STOP_N>
defined in config_tests.xml will work still. But anything relying on $STOP_N
being populated from somewhere else will fail, e.g. PEA, PEM, PET, etc.
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 subgroup
from
Lines 553 to 557 in 67ade4a
from cime.
What if we allowed to specify indirect parameters via "scoping"? I'm thinking something like setting HIST_N
to $run_begin_stop_restart::STOP_N
. We'd still process $-containing strings as params to be resolved, but we'd add an extra step:
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 ::
token since I'm thinking about C++ scopes, but any other "safe" string would do (double underscore, @, ...)
from cime.
Related Issues (20)
- case.build for test fails if TestStatus file is removed HOT 2
- You can't work from a directory that has tests in the name, it confuses CIME. HOT 12
- what does e3sm build still use? HOT 2
- tag head of maint-5.8_5.8.32 HOT 1
- Set mpirun to None when a single MPI task is being used (similar to handling of mpi-serial) HOT 4
- 'use --append' is not a valid value of the atomic type 'xs:NCName' for the cime w/t e3sm/maint-2.1 (2.0) HOT 3
- query_config --grids needs grid longname.
- query_config --components is broken
- Increase standard_name length in entry_id_pg.xsd HOT 5
- Where did one-letter case names come from? HOT 1
- list_e3sm_tests is partly broken
- regression test test_d_create_clone_new_user FAILS HOT 2
- testlist hangs when it should exit
- Special characters in SRCROOT sometimes lead to build failures
- Enhancement request: Use realpath when comparing namelists
- error in timing makefile HOT 4
- --xml-test-list not working? HOT 1
- pelayout changes no longer working HOT 2
- Create a set of helper functions for running customized functional tests/heuristics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cime.