Closed rljacob closed 8 years ago
Attempt on 6/12/16. Use ESMCI f8417e7b795604bb0 and ACME 3c24d7c37c4f2.
clone latest ACME; make a branch move cime to cime.old: git mv cime cime.old commit above Add new cime: git subtree add --squash --prefix=cime/ f8417e7b795604bb0 Going to try an I-case first so finish creating of cime_config for clm. cd to components/clm/bld git mv clm.buildlib ../cime_config/buildlib git mv clm.buildnml ../cime_config/buildnml git mv user_nl_clm ../cime_config/
Try an I case. (will fail at river if all goes well with land since didn't finish cime_config for the river model). But got an error in create_newcase.
./create_newcase -res f19_f19 -case tryIcase -compset I1850CLM45CN -compiler intel
Compset longname is 1850_DATM%QIA_CLM45%CN_SICE_SOCN_RTM_SGLC_SWAV
Compset specification file is /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/config_compsets.xml
Pes specification file is /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/config_pes.xml
Traceback (most recent call last):
File "./create_newcase", line 180, in <module>
_main_func()
File "./create_newcase", line 165, in _main_func
walltime=walltime)
File "/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../utils/python/CIME/case.py", line 447, in configure
self._get_component_config_data()
File "/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../utils/python/CIME/case.py", line 378, in _get_component_config_data
compobj = Component(comp_config_file)
File "/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../utils/python/CIME/XML/component.py", line 22, in __init__
EntryID.__init__(self,infile)
File "/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../utils/python/CIME/XML/entry_id.py", line 17, in __init__
GenericXML.__init__(self, infile)
File "/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../utils/python/CIME/XML/generic_xml.py", line 29, in __init__
self.read(infile)
File "/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../utils/python/CIME/XML/generic_xml.py", line 52, in read
self.tree = ET.parse(infile)
File "/soft/python/2.7.6/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/soft/python/2.7.6/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
parser.feed(data)
File "/soft/python/2.7.6/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/soft/python/2.7.6/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: mismatched tag: line 215, column 4
Exit 1
@mvertens is there a problem with the config_compsets.xml for clm?
Yes, minor changes will need to be made in all of the component models config_component.xml files
On Tue, Jul 12, 2016 at 5:58 PM, Robert Jacob notifications@github.com wrote:
@mvertens https://github.com/mvertens is there a problem with the config_compsets.xml for clm?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ESMCI/cime/issues/228#issuecomment-232216903, or mute the thread https://github.com/notifications/unsubscribe/AF16GGfafVaDZHTFgy4hgNqH3XKRqKTsks5qVCoegaJpZM4I6LR7 .
Jim Edwards
CESM Software Engineer National Center for Atmospheric Research Boulder, CO
@rjacob i assume you are doing this with alm - not clm? i'm happy to help you sort out the problem with config_compsets.xml for clm - but i have no access to this code
On Tue, Jul 12, 2016 at 5:58 PM, Robert Jacob notifications@github.com wrote:
@mvertens https://github.com/mvertens is there a problem with the config_compsets.xml for clm?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ESMCI/cime/issues/228#issuecomment-232216903, or mute the thread https://github.com/notifications/unsubscribe/AHlxE1kvXbQrBuBpdR7MjJFBC5O0pkVOks5qVCofgaJpZM4I6LR7 .
Yes its "alm" but its clm for all practical purposes. This is the config_compsets.xml from that tar file you made.
Here is a list of differences in the clm cime_config xml files:
Index: config_component.xml
===================================================================
--- config_component.xml (.../trunk_tags/clm4_5_9_r186/components/clm/cime_config) (revision 79491)
+++ config_component.xml (.../branches/clm4_5_8_r174_esmciport/components/clm/cime_config) (revision 79491)
@@ -13,32 +13,6 @@
<desc>Name of land component</desc>
</entry>
- <entry id="LND_PIO_REARRANGER">
- <values>
- <value compset="_CLM40" >2</value>
- <value compset="_CLM45" >1</value>
- <value compset="_CLM50" >1</value>
- </values>
- </entry>
-
- <entry id="BARRIER_N">
- <values>
- <value compset="_DATM" >1</value>
- </values>
- </entry>
-
- <entry id="BARRIER_OPTION">
- <values>
- <value compset="_DATM" >ndays</value>
- </values>
- </entry>
-
- <entry id="ATM_PIO_TYPENAME">
- <values>
- <value compset="DATM.*_CLM" >netcdf</value>
- </values>
- </entry>
-
<entry id="LND_TUNING_MODE">
<type>char</type>
<group>run_component_clm</group>
@@ -58,7 +32,7 @@
<entry id="CLM_CONFIG_OPTS" >
<type>char</type>
<default_value></default_value>
- <values additive='yes'>
+ <values modifier='additive'>
<value compset="_CLM40" >-phys clm4_0</value>
<value compset="_CLM40%[^_]*CN" >-bgc cn</value>
<value compset="_CLM40%[^_]*CNDV" >-bgc cndv</value>
Index: config_compsets.xml
===================================================================
--- config_compsets.xml (.../trunk_tags/clm4_5_9_r186/components/clm/cime_config) (revision 79491)
+++ config_compsets.xml (.../branches/clm4_5_8_r174_esmciport/components/clm/cime_config) (revision 79491)
@@ -13,7 +13,7 @@
TIME_ATM[%phys]_LND[%phys]_ICE[%phys]_OCN[%phys]_ROF[%phys]_GLC[%phys]_WAV[%phys][_BGC%phys]
Where for the CAM specific compsets below the following is supported
TIME = Time period (e.g. 2000, HIST, RCP8...)
- ATM = [CAM4, CAM5]
+ ATM = [CAM40, CAM50, CAM55]
LND = [CLM40, CLM45, CLM50, SLND]
ICE = [CICE, DICE, SICE]
OCN = [DOCN, ,AQUAP, SOCN]
@@ -566,6 +566,18 @@
</values>
</entry>
+ <entry id="BARRIER_N">
+ <values>
+ <value compset="_DATM" >1</value>
+ </values>
+ </entry>
+
+ <entry id="BARRIER_OPTION">
+ <values>
+ <value compset="_DATM" >ndays</value>
+ </values>
+ </entry>
+
</entries>
</compsets>
The problem seems to be in our new config_components.xml for alm. If I use the cesm1.5b6 version (and remove LND_PIO_REARRANGER) it gets past the create_newcase!
Does the last line from the error message:
xml.etree.ElementTree.ParseError: mismatched tag: line 215, column 4
mean that there's just a
Yes - you can check the validity of an xml file in a number of ways such as using xmllint or emacs nxml mode
Looks like we have xmllint on blues. What arguments should I use?
I put the config_components.xml on gist https://gist.github.com/rljacob/10b004ac59edea495e7158097142c81d
The output of xmllint without any args seems helpful but the tags its complaining about seem fine.
blogin2[180]: xmllint config_component.xml config_component.xml:215: parser error : expected '>' ^ config_component.xml:225: parser error : Opening and ending tag mismatch: description line 191 and definitions_variables ^ config_component.xml:226: parser error : Premature end of data in tag definitions_variables line 5 Exit 1 blogin2[181]
line 206 is missing a closing </desc>
The LND_PIO_REARRANGER should not have been in there. The BARRIERS should be moved to clm config_compsets.xml not in the clm config_components.xml. If you updated to the latest clm trunk tag - this is a problem and has been fixed in the svn esmci branch. See https://svn-ccsm-models.cgd.ucar.edu/clm2/branches/clm4_5_8_r174_esmciport/components/clm
On Wed, Jul 13, 2016 at 11:10 AM, Robert Jacob notifications@github.com wrote:
The problem seems to be in our new config_components.xml for alm. If I use the cesm1.5b6 version (and remove LND_PIO_REARRANGER) it gets past the create_newcase!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ESMCI/cime/issues/228#issuecomment-232422026, or mute the thread https://github.com/notifications/unsubscribe/AHlxE-b6WhFphwlVe4vq3iwdAhKJESLMks5qVRvqgaJpZM4I6LR7 .
Thanks @jedwards4b! Is there a way xmllint or emacs could point me directly to line 206?
emacs was pointing me to the parent closing and saying it was in error, i moved it up line by line until it wasn't in error anymore to find the real problem...
With the fix to config_components.xml, create_newcase competes. Now for "case.setup" there's a different error:
preview_namelists Running /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../components/data_comps/datm/cime_config/buildnml Running /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/buildnml ERROR: Command: '/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/buildnml /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase' failed with error 'Can't locate SetupTools.pm in @INC (@INC contains: /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase/Tools /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/buildnml line 13.'
However @mvertens told me we need a new buildnml to work with CIME5 and supplied one.
Using the clm buildnml suppled by @mvertens, I get a different error:
Running /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../components/data_comps/datm/cime_config/buildnml Running /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/buildnml ERROR: Command: '/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/buildnml /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase' failed with error '*\ can't open file: /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase/user_nl_clm at /lcrc/group/earthscience/jacob/ACME2/cime/utils/perl5lib/Config/SetupTools.pm line 31' Exit 1 blogin3[123]:
Not sure why user_nl_clm was not copied from components/clm/cime_config.
I copied it by hand and got a different error: preview_namelists Running /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../components/data_comps/datm/cime_config/buildnml Running /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/buildnml ERROR: Command: '/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/buildnml /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase' failed with error 'ERROR : CLM build-namelist::CLMBuildNamelist::check_for_perl_utils() : Cannot find perl module "SetupTools.pm" in directory "/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools"
ERROR clm.buildnml: /lcrc/group/earthscience/jacob/ACME2/components/clm/bld/build-namelist -infile /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase/Buildconf/clmconf/namelist -csmdata /home/ccsm-data/inputdata -inputdata /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase/Buildconf/clm.input_data_list -ignore_ic_year -namelist " &clm_inparm start_ymd=00010101 /" -use_case 1850_control -res 1.9x2.5 -clm_start_type default -envxml_dir /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase -l_ncpl 48 -lnd_frac /home/ccsm-data/inputdata/share/domains/domain.lnd.fv1.9x2.5_gx1v6.090206.nc -glc_nec 0 -co2_ppmv 284.7 -co2_type constant -config /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase/Buildconf/clmconf/config_cache.xml -bgc cn failed: 512' Exit 1
I just had to change the location of SetupTools.pm in CLMBuildNamelist.pm. preview_namelists made it to rtm which I did not finish converting.
Finish it by moving current ACME versions as follows: git mv rtm.buildlib ../cime_config/buildlib git mv rtm.buildnml ../cime_config/buildnml git mv user_nl_rtm ../cime_config
Had to edit buildnml to change location of SetupTool.pm and change all use of CCSMROOT to SRCROOT.
case.setup works for the I case!
Next is case.build. The buidlib failed for land: /lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/lnd.bldlog.160713-180158
message:
ar: /lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/lnd/obj/lib/lib/lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/lib.a: No such file or directory gmake: *** [/lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/lnd/obj/lib/lib/lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/lib.a] Error 1 ERROR: clm.buildlib gmake complib -j 4 MODEL=clm COMPLIB=/lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/lnd/obj/lib/lib/lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/lib.a USER_CPPDEFS=" " -f /lcrc/group/earthscience/jacob/ACME2/cime/scripts/tryIcase/Tools/Makefile failed: 512
Also all the land .o and .mod files appear in the $CASEROOT.
buildlib isn't different between ACME cime2 and cesm1.5b6 as far as I can tell.
Any ideas why the land is building inside $CASEROOT? The buildlib I'm using is identical to clm4_5_9_r186
Could you please try to use either the following buildlib -(now in python) or modify it to be usable for alm? I cleaned up the buildlib.py mechanism and its in interaction with clm in a previous PR. https://svn-ccsm-models.cgd.ucar.edu/clm2/branches/clm4_5_8_r174_esmciport/components/clm/cime_config/buildlib
On Thu, Jul 14, 2016 at 10:20 PM, Robert Jacob notifications@github.com wrote:
Any ideas why the land is building inside $CASEROOT? The buildlib I'm using is identical to clm4_5_9_r186
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ESMCI/cime/issues/228#issuecomment-232856530, or mute the thread https://github.com/notifications/unsubscribe-auth/AHlxE5vY2hUh8-0mzrd1VNcOV8k9tsblks5qVwqQgaJpZM4I6LR7 .
That worked much better. Now the only error is at the very end:
err=gmake: * No rule to make target /lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/intel/mvapich/nodebug/nothreads/MCT/noesmf/lib/libclm.a', needed by
/lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/acme.exe'. Stop.
gmake: * Waiting for unfinished jobs....
libclm.a exists but its in /lcrc/project/ACME/jacob/acme_scratch/tryIcase/bld/lib with the other model libs.
What is in the variable CLM_CONFIG_OPTS in env_build.xml?
`
`
The issues is in cime_config/acme/machines/Makefile starting at about line 695
The equivalent logic in the cesm Makefile is: CLMVER = $(filter $(CLM_CONFIG_OPTS), clm5_0 clm4_5) ifeq ($(CLMVER),$(null)) LNDOBJDIR = $(EXEROOT)/lnd/obj LNDLIBDIR=$(LIBROOT) LNDLIB := liblnd.a else LNDOBJDIR = $(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/clm/obj LNDLIBDIR = $(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/lib LNDLIB := libclm.a endif INCLDIR += -I$(LNDOBJDIR)
This seems to say the library should be in $(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/lib for clm4_5. Why is that?
Adding that logic doesn' help. The libclm.a is still built in $LIBROOT
Because most everything in clm4_5 and clm5_0 is runtime configurable so we don't need to rebuild it for every test that uses it. Putting it in the shared library path allows multiple tests to use the same build. Not sure why you didn't want to do that in acme too.
On Fri, Jul 15, 2016 at 4:33 PM, Robert Jacob notifications@github.com wrote:
The equivalent logic in the cesm Makefile is: CLMVER = $(filter $(CLM_CONFIG_OPTS), clm5_0 clm4_5) ifeq ($(CLMVER),$(null)) LNDOBJDIR = $(EXEROOT)/lnd/obj LNDLIBDIR=$(LIBROOT) LNDLIB := liblnd.a else LNDOBJDIR = $(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/clm/obj LNDLIBDIR = $(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/lib LNDLIB := libclm.a endif INCLDIR += -I$(LNDOBJDIR)
This seems to say the library should be in $(SHAREDPATH)/$(COMP_INTERFACE)/$(ESMFDIR)/lib for clm4_5. Why is that?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ESMCI/cime/issues/228#issuecomment-233085068, or mute the thread https://github.com/notifications/unsubscribe-auth/AF16GP0CaEJt9_TsBboj8QRRxVDjOybqks5qWArIgaJpZM4I6LR7 .
Jim Edwards
CESM Software Engineer National Center for Atmospheric Research Boulder, CO
I'm trying to put it in shared but it seems to be ignoring me. CLM_CONFIG_OPTS is clm4_5 so the LND*DIR should be the shared. It looks in shared at the end but still builds in $EXEROOT/lnd/obj and puts the library in $EXEROOT/lib. What am I missing?
I think that the problem may be at line 508 of utils/python/CIME/build.py:
if comp_lnd == "clm" and not "clm4_0" in clm_config_opts:
is your comp_lnd now alm instead of clm?
That fixed the build! I changed valid_values and default_value from "alm" to "clm" in COMP_LND entry in config_component.xml.
New issue: I tried running with case.submit and got an error message: "ERROR: must set CIMEROOT environment variable" CIMEROOT is defined correctly in env_case.xml.
I submitted the case.run script directly using qsub and got the same error.
you need to set CIMEROOT in the environment on the compute node, on most systems this just means setting it on the front end node, but some machines require an argument to the submit command - what machine and queueing system is it?
Blues and pbs. Something must have broken in the blues config. I get the same error with an X case.
After upgrading to latest ESMCI cime master (92a5d03244f096038da32b202637cfab105336b0) and starting over, got a new error in the clm buildlib (which is a copy of the one from @mvertens branch above):
Traceback (most recent call last):
File "/lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/clm/cime_config/buildlib", line 88, in
@rljacob there was a minor API change to run_cmd. Any run_cmd that had ok_to_fail needs to remove the ok_to_fail arg. All other run_cmd calls need to be changed to call run_cmd_no_fail
That worked! And I can now run an I case on blues with the latest master. Next: an IM case (with mosart).
IM case works. F case is next.
For an F-case, I'm doing ./create_newcase -case tryF19 -compset FC5 -res f19_f19 -compiler intel I've renamed/moved the ACME cam.buildlib and cam.builnml and made the necessary perl path and variable name changes.
create_newcase works but case.setup gives this error:
Running /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/cam/cime_config/buildnml
ERROR: Command /lcrc/group/earthscience/jacob/ACME2/cime/scripts/Tools/../../../components/cam/cime_config/buildnml failed rc=2
out=ERROR: unrecognized arguments: 1.9x2.5
err=SYNOPSIS
configure [options]
....(print out of the configure help page deleted).....
ERROR cam.buildnml: /lcrc/group/earthscience/jacob/ACME2/components/cam/bld/configure -s -ccsm_seq -ice none -ocn docn -comp_intf mct -spmd -spmd -smp -nosmp -dyn fv -dyn_target -res 1.9x2.5 -phys cam5 failed: 65280
Exit 1 blogin2[182]:
It seems that the cams configure options are not consistent with what buildnml expects them to be.
Where is -dyn_target getting set? There is supposed to be a string after it (preqx or preqx_acc).
Ahh dyn_target is not used in cesm cam - i think you'll need to modify your buildnml to handle it
But I'm using the ACME cam buildnml which should work with the ACME cam configure. I just moved "cam.buildnml" to the right place and changed the name, perl paths, etc.
If you look in buildnml, it is using the value of $CAM_TARGET which appears to be blank (unset). Who is supposed to set that in ACME?
Ah that was set in create_newcase and we took it out for cime5:
if ($camse_target eq "preqx") { $cfg_ref->set('CAM_TARGET', "preqx"); } elsif ($camse_target eq "preqx_acc") { $cfg_ref->set('CAM_TARGET', "preqx_acc"); } else { die "ERROR: option -camse_target must be preqx (default) or preqx_acc" }
The default value was in config_definitions and didn't get moved to our new cam config_components.
I got past the CAM part of preview_namelists by hard-coding CAM_TARGET in buildnml. Now working on cice which didn't get its config_components.xml created.
F, G and D cases should all work. mpas-o and mpas-cice have been added. Will now try a fully coupled case.
Trying to do an IG case: clm with MPAS-landice. Getting this error from CLM-Buildnamelist:
err=ERROR : CLM build-namelist::CLMBuildNamelist::setup_logic_glacier() : glc_smb set to .true. does NOT agree with -glc_smb argument of .. (set with GLC_SMB env variable)
Not sure how the argument is getting set to ".."
Nevermind. Found the problem. GLC_SMB was missing from config_component.xml in mpasli. Then had to re-create the case from scratch.
Final steps:
The following cime_config files on the branch are more up-to-date compared to what is on master: cice/cime_config/config_component.xml clm/cime_config/buildnml mpasli/cime_config/config_component.xml
I've put together wiki page to start listing the steps needed to bring the new CIME in to ACME. https://github.com/ACME-Climate/cime/wiki/Converting-ACME-from-cime2-to-ESMCI-cime
This issue can be used for discussion and also for reporting on merge attempts.