Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

fail to build executable for CLM single point run

Status
Not open for further replies.

yalingliu

Yaling Liu
New Member
Dear all,

I'm trying to run the CLM single point run following the tutorial (http://www.cgd.ucar.edu/events/2019/ctsm/files/practical4-wieder.pdf), and it fails to build the executable. I also have tried it in debug mode (Python/2.7.16 loaded) but there is no much information in the CaseStatus file, so I post the error message below and hope someone could provide some instructions or hints to fix the problem, thanks!

------------------------------error message below--------------------------------------------------
<username>@cheyenne2:~/clm_tutorial_cases/Ha1_CLM50sp_001> ./case.build

Building case in directory /glade/u/home/<username>/clm_tutorial_cases/Ha1_CLM50sp_001

sharedlib_only is False

model_only is False

Setting resource.RLIMIT_STACK to -1 from (307200000, -1)

Generating component namelists as part of build

Creating component namelists

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/data_comps/datm/cime_config/buildnml

Running /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/data_comps/datm/cime_config/buildnml

Traceback (most recent call last):

File "/glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/data_comps/datm/cime_config/buildnml", line 251, in <module>

_main_func()

File "/glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/data_comps/datm/cime_config/buildnml", line 247, in _main_func

buildnml(case, caseroot, "datm")

File "/glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/data_comps/datm/cime_config/buildnml", line 229, in buildnml

_create_namelists(case, confdir, inst_string, namelist_infile, nmlgen, data_list_path)

File "/glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/data_comps/datm/cime_config/buildnml", line 123, in _create_namelists

nmlgen.create_stream_file_and_update_shr_strdata_nml(config, case.get_value("CASEROOT"),stream, stream_path, data_list_path)

File "/glade/u/home/<username>/clm5.0_2019tutorial/cime/scripts/Tools/../../scripts/lib/CIME/nmlgen.py", line 444, in create_stream_file_and_update_shr_strdata_nml

strmobj = Stream(infile=stream_path)

File "/glade/u/home/<username>/clm5.0_2019tutorial/cime/scripts/Tools/../../scripts/lib/CIME/XML/stream.py", line 22, in __init__

GenericXML.__init__(self, infile, schema=schema)

File "/glade/u/home/<username>/clm5.0_2019tutorial/cime/scripts/Tools/../../scripts/lib/CIME/XML/generic_xml.py", line 57, in __init__

self.read(infile, schema)

File "/glade/u/home/<username>/clm5.0_2019tutorial/cime/scripts/Tools/../../scripts/lib/CIME/XML/generic_xml.py", line 87, in read

self.read_fd(fd)

File "/glade/u/home/<username>/clm5.0_2019tutorial/cime/scripts/Tools/../../scripts/lib/CIME/XML/generic_xml.py", line 112, in read_fd

self.tree = ET.parse(fd)

File "/glade/u/apps/ch/opt/python/2.7.16/gnu/8.3.0/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse

tree.parse(source, parser)

File "/glade/u/apps/ch/opt/python/2.7.16/gnu/8.3.0/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse

parser.feed(data)

File "/glade/u/apps/ch/opt/python/2.7.16/gnu/8.3.0/lib/python2.7/xml/etree/ElementTree.py", line 1659, in feed

self._raiseerror(v)

File "/glade/u/apps/ch/opt/python/2.7.16/gnu/8.3.0/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror

raise err

xml.etree.ElementTree.ParseError: junk after document element: line 5, column 0

ERROR: /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/data_comps/datm/cime_config/buildnml /glade/u/home/<username>/clm_tutorial_cases/Ha1_CLM50sp_001 FAILED, see above
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
This is due to a recent update in the release-clm5.0 branch in CIME. In cime5.6.23 datm streams files were made to be legitimate XML files. The main difference that means is that a root element must be added to the files (previously the streams file didn't require a root element and it wasn't usually used). This means the user_datm.streams.* files in your directory need to be updated in accordance to that. The versions in the Weider tutorial that you copied were in place before that change came in. So you need to add the following to the beginning of each of the user_datm.streams files...

XML:
<?xml version="1.0"?>
<file id="stream" version="1.0">

And then end the file with

XML:
/file>

This change applies to release-clm5.0 versions starting with release-clm5.0.28 and following.
 

yalingliu

Yaling Liu
New Member
This is due to a recent update in the release-clm5.0 branch in CIME. In cime5.6.23 datm streams files were made to be legitimate XML files. The main difference that means is that a root element must be added to the files (previously the streams file didn't require a root element and it wasn't usually used). This means the user_datm.streams.* files in your directory need to be updated in accordance to that. The versions in the Weider tutorial that you copied were in place before that change came in. So you need to add the following to the beginning of each of the user_datm.streams files...

XML:
<?xml version="1.0"?>
<file id="stream" version="1.0">

And then end the file with

XML:
/file>

This change applies to release-clm5.0 versions starting with release-clm5.0.28 and following.

Thanks for your reply, yes, I have successfully built the executables now, but there is another issue when I submit and run the CLM. It seems not able to download the input data, it says "Cannot download file since it lives outside of the input_data_root '/glade/p/cesmdata/cseg/inputdata'".

Can anyone provide some hints to address this issue? Thanks!

The entire error message is as below:
-----------------------------------------------------------------------------------------
<username>@cheyenne2:~/clm_tutorial_cases/Ha1_CLM50sp_001> ./case.submit

Setting resource.RLIMIT_STACK to -1 from (307200000, -1)

Creating component namelists

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/data_comps/datm/cime_config/buildnml

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime_config/buildnml

WARNING: CLM is starting up from a cold state

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/stub_comps/sice/cime_config/buildnml

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/stub_comps/socn/cime_config/buildnml

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/stub_comps/srof/cime_config/buildnml

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/stub_comps/sglc/cime_config/buildnml

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/stub_comps/swav/cime_config/buildnml

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/components/stub_comps/sesp/cime_config/buildnml

Calling /glade/u/home/<username>/clm5.0_2019tutorial/cime/src/drivers/mct/cime_config/buildnml

Finished creating component namelists

Checking that inputdata is available as part of case submission

Setting resource.RLIMIT_STACK to -1 from (-1, -1)

Loading input file list: 'Buildconf/clm.input_data_list'

Model clm no file specified for finidat

Loading input file list: 'Buildconf/cpl.input_data_list'

Loading input file list: 'Buildconf/datm.input_data_list'

Model datm missing file file17 = '/gpfs/fs1/scratch/wwieder/single_point/datmdata_Ha1_gswp3/clmforcd'

Client protocol gftp not enabled

Using protocol wget with user anonymous and passwd user@example.edu

Trying to download file: '../inputdata_checksum.dat' to path '/glade/scratch/<username>/Ha1_CLM50sp_001/run/inputdata_checksum.dat.raw' using WGET protocol.

SUCCESS



Using protocol ftp with user anonymous and passwd user@example.edu

server address ftp.cgd.ucar.edu root path cesm/inputdata

Trying to download file: '../inputdata_checksum.dat' to path '/glade/scratch/<username>/Ha1_CLM50sp_001/run/inputdata_checksum.dat.raw' using FTP protocol.

Using protocol svn with user and passwd

Trying to download file: 'None' to path '/glade/scratch/<username>/Ha1_CLM50sp_001/run/inputdata_checksum.dat.raw' using SVN protocol.

Could not automatically download file /glade/scratch/<username>/Ha1_CLM50sp_001/run/inputdata_checksum.dat Restoring existing version.

Client protocol None not enabled

Checking server ftp://gridanon.cgd.ucar.edu:2811/cesm/inputdata/ with protocol gftp

Setting resource.RLIMIT_STACK to -1 from (-1, -1)

Client protocol gftp not enabled

Checking server ftp://ftp.cgd.ucar.edu/cesm/inputdata with protocol wget

Setting resource.RLIMIT_STACK to -1 from (-1, -1)

Using protocol wget with user anonymous and passwd user@example.edu

Loading input file list: 'Buildconf/clm.input_data_list'

Model clm no file specified for finidat

Loading input file list: 'Buildconf/cpl.input_data_list'

Loading input file list: 'Buildconf/datm.input_data_list'

Model datm missing file file17 = '/gpfs/fs1/scratch/wwieder/single_point/datmdata_Ha1_gswp3/clmforcd'

Cannot download file since it lives outside of the input_data_root '/glade/p/cesmdata/cseg/inputdata'

Checking server ftp.cgd.ucar.edu/cesm/inputdata with protocol ftp

Setting resource.RLIMIT_STACK to -1 from (-1, -1)

Using protocol ftp with user anonymous and passwd user@example.edu

server address ftp.cgd.ucar.edu root path cesm/inputdata

Loading input file list: 'Buildconf/clm.input_data_list'

Model clm no file specified for finidat

Loading input file list: 'Buildconf/cpl.input_data_list'

Loading input file list: 'Buildconf/datm.input_data_list'

Model datm missing file file17 = '/gpfs/fs1/scratch/wwieder/single_point/datmdata_Ha1_gswp3/clmforcd'

Cannot download file since it lives outside of the input_data_root '/glade/p/cesmdata/cseg/inputdata'

Checking server https://svn-ccsm-inputdata.cgd.ucar.edu/trunk/inputdata with protocol svn

Setting resource.RLIMIT_STACK to -1 from (-1, -1)

Using protocol svn with user and passwd

Loading input file list: 'Buildconf/clm.input_data_list'

Model clm no file specified for finidat

Loading input file list: 'Buildconf/cpl.input_data_list'

Loading input file list: 'Buildconf/datm.input_data_list'

Model datm missing file file17 = '/gpfs/fs1/scratch/wwieder/single_point/datmdata_Ha1_gswp3/clmforcd'

Cannot download file since it lives outside of the input_data_root '/glade/p/cesmdata/cseg/inputdata'

Checking server None with protocol None

Setting resource.RLIMIT_STACK to -1 from (-1, -1)

Client protocol None not enabled

ERROR: Could not find all inputdata on any server
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
It looks like you have a spurious line in
datm.streams.txt.CLMGSWP3v1.Solar

i.e.,
clmforcd="stream" version="1.0">.GSWP3.c2011.0.5x0.5.Solr.287.8_42.5.1902-05.nc
 

yalingliu

Yaling Liu
New Member
It looks like you have a spurious line in
datm.streams.txt.CLMGSWP3v1.Solar

i.e.,
clmforcd="stream" version="1.0">.GSWP3.c2011.0.5x0.5.Solr.287.8_42.5.1902-05.nc

Hi Keith,
You are definitely right! I made a mistake when I modify the file user_datm.streams.txt.CLMGSWP3v1.Solar. The CLM is running now. Thanks!

-Yaling
 
Status
Not open for further replies.
Top