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

ERROR: Expected one child

mczhao

mczhao
New Member
Hi, everyone, I am trying to porting the CESM2 in my hpc. A error occured when ./create_newcase --case mycase --compset X --res f19_g16. Here is the detail:
./create_newcase --case mycase --compset X --res f19_g16
Compset longname is 2000_XATM_XLND_XICE_XOCN_XROF_XGLC_XWAV
Compset specification file is /raid61/mczhao/cesm2/my_cesm_sandbox/cime/src/drivers/mct/cime_config/config_compsets.xml
Compset forcing is 1972-2004
ATM component is Dead atm component
LND component is Dead land component
ICE component is Dead ice component
OCN component is Dead ocean component
ROF component is Dead river component
GLC component is Dead land-ice component
WAV component is Dead wave component
ESP component is
Pes specification file is /raid61/mczhao/cesm2/my_cesm_sandbox/cime/src/drivers/mct/cime_config/config_pes.xml
Machine is atmoce-epyc01
ERROR: Expected one child.

Attach are the config_machines.xml and the config_compilers.xml in my $HOME/.cime.
I have searched in the forum but still not work, what should I do to solve the question?
Thanks very much!
 

Attachments

  • config_compilers.txt
    4.8 KB · Views: 28
  • config_machines.txt
    2.5 KB · Views: 37

jedwards

CSEG and Liaisons
Staff member
I think that you need to remove the <default_run_suffix> section from the end of your config_machines.xml file. And your config_compilers.xml should have only a section for your particular machine (MACH="atmoce-epyc01"). These files are appended to the default files found in cime/config/cesm/machines and should not repeat any of the sections found therein.
 

mczhao

mczhao
New Member
Thanks! I have solved the error!
A new error occur when I run ./case.build.

In the shell:
Component cesm exe build complete with 1 warnings
ERROR: BUILD FAIL: buildexe failed, cat /raid61/mczhao/scratch/mycase1/bld/cesm.bldlog.210305-134738

And the cesm.bldlog.210305-134738 file shows that:
...
L../../intel/impi/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1/lib -lcsm_share -L../../intel/impi/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/raid61/mczhao/env/PNETCDF/lib -lnetcdff -framework Accelerate -mkl=cluster -L/raid61/mczhao/env/PNETCDF/lib -lpnetcdf
ifort: command line warning #10006: ignoring unknown option '-framework'
ifort: error #10236: File not found: 'Accelerate'
gmake: *** [/raid61/mczhao/scratch/mycase1/bld/cesm.exe] Error 1

How to solve the problem?
 

mczhao

mczhao
New Member
Thanks! I have solved the error!
A new error occur when I run ./case.build.

In the shell:
Component cesm exe build complete with 1 warnings
ERROR: BUILD FAIL: buildexe failed, cat /raid61/mczhao/scratch/mycase1/bld/cesm.bldlog.210305-134738

And the cesm.bldlog.210305-134738 file shows that:
...
L../../intel/impi/nodebug/nothreads/mct/noesmf/c1a1l1i1o1r1g1w1e1/lib -lcsm_share -L../../intel/impi/nodebug/nothreads/lib -lpio -lgptl -lmct -lmpeu -L/raid61/mczhao/env/PNETCDF/lib -lnetcdff -framework Accelerate -mkl=cluster -L/raid61/mczhao/env/PNETCDF/lib -lpnetcdf
ifort: command line warning #10006: ignoring unknown option '-framework'
ifort: error #10236: File not found: 'Accelerate'
gmake: *** [/raid61/mczhao/scratch/mycase1/bld/cesm.exe] Error 1

How to solve the problem?
I have solved the question
 

huo

huo
New Member
hi. I had the same problem as you. Could you tell me how did you solve it? Thanks very much!!
./create_newcase --case mycase --res f19_g16 --compset X --mach huo

Compset longname is 2000_XATM_XLND_XICE_XOCN_XROF_XGLC_XWAV
Compset specification file is /home/huo/cesm2/my_cesm_sandbox/cime/src/drivers/mct/cime_config/config_compsets.xml
Compset forcing is 1972-2004
ATM component is Dead atm component
LND component is Dead land component
ICE component is Dead ice component
OCN component is Dead ocean component
ROF component is Dead river component
GLC component is Dead land-ice component
WAV component is Dead wave component
ESP component is
Pes specification file is /home/huo/cesm2/my_cesm_sandbox/cime/src/drivers/mct/cime_config/config_pes.xml
Machine is huo
ERROR: Expected one child
 

YCCircle

Yuanyuan HUANG
New Member
hi. I had the same problem as you. Could you tell me how did you solve it? Thanks very much!!
./create_newcase --case mycase --res f19_g16 --compset X --mach huo

Compset longname is 2000_XATM_XLND_XICE_XOCN_XROF_XGLC_XWAV
Compset specification file is /home/huo/cesm2/my_cesm_sandbox/cime/src/drivers/mct/cime_config/config_compsets.xml
Compset forcing is 1972-2004
ATM component is Dead atm component
LND component is Dead land component
ICE component is Dead ice component
OCN component is Dead ocean component
ROF component is Dead river component
GLC component is Dead land-ice component
WAV component is Dead wave component
ESP component is
Pes specification file is /home/huo/cesm2/my_cesm_sandbox/cime/src/drivers/mct/cime_config/config_pes.xml
Machine is huo
ERROR: Expected one child
hi! have you solved this problem?
 
Hello, I am having the same problem. I am trying to create a new case on a rocky linux 8.5 machine. I've created an anaconda environment and installed cesm and all its systems prerequisites inside that environment.

Below there is the output I get. I left only the sections from my particular machine in the config files (attached). I don't know elsewhere to look.
The config files are in $CESMROOT/cime/config/cesm/machines

Any help will be much appreciated!


(cesm) [numa19@ire0233 scripts]$ ./create_newcase --case /disco2/cesm/cases/b.day1.0 --res f19_g17 --compset B1850
Compset longname is 1850_CAM60_CLM50%BGC-CROP_CICE_POP2%ECO%ABIO-DIC_MOSART_CISM2%NOEVOLVE_WW3_BGC%BDRD
Compset specification file is /home/numa19/cesm/cesm2.1.3/cime/../cime_config/config_compsets.xml
Compset forcing is 1850
Com forcing is Biogeochemistry intercomponent with diagnostic CO2
ATM component is CAM cam6 physics:
LND component is clm5.0:BGC (vert. resol. CN and methane) with prognostic crop:
ICE component is Sea ICE (cice) model version 5
OCN component is POP2 EcosystemAbiotic DIC/DIC14
ROF component is MOSART: MOdel for Scale Adaptive River Transport
GLC component is cism2 (default, higher-order, can run in parallel):cism ice evolution turned off (this is the standard configuration unless you're explicitly interested in ice evolution):
WAV component is Wave Watch
ESP component is
Pes specification file is /home/numa19/cesm/cesm2.1.3/cime/../cime_config/config_pes.xml
Compset specific settings: name is RUN_STARTDATE and value is 0001-01-01
Compset specific settings: name is RUN_REFDATE and value is 0301-01-01
Compset specific settings: name is RUN_TYPE and value is hybrid
Compset specific settings: name is RUN_REFCASE and value is b.e20.B1850.f19_g17.release_cesm2_1_0.020
Compset specific settings: name is CLM_NAMELIST_OPTS and value is use_init_interp=.true.
Machine is centos7-linux
ERROR: Expected one child
 

Attachments

  • config_batch.txt
    2.3 KB · Views: 4
  • config_compilers.txt
    4.5 KB · Views: 5
  • config_machines.txt
    4.5 KB · Views: 11

jedwards

CSEG and Liaisons
Staff member
Do you have anything in directory ~/.cime? If so try removing it.
Try the create_newcase command again with the --debug option.
 
Hi Jim,
I've been seeing this .cime directory, which seems like a hidden directory, but I don't have it, as I show below:
Or am I looking for the wrong thing??

(cesm) [numa19@ire0233 cesm2.1.3]$ pwd
/home/numa19/cesm/cesm2.1.3
(cesm) [numa19@ire0233 cesm2.1.3]$ ls -a
. ChangeLog_template components doc .github manage_externals
.. cime Copyright Externals.cfg .gitignore mpi_test
ChangeLog cime_config describe_version .git LICENSE.txt README.rst
(cesm) [numa19@ire0233 cesm2.1.3]$ cd cime
(cesm) [numa19@ire0233 cime]$ ls -a

. ChangeLog_template CONTRIBUTING.md .github LICENSE.TXT scripts .travis.yml
.. CMakeLists.txt doc .gitignore .nojekyll src utils
ChangeLog config .git index.html README.md tools
(cesm) [numa19@ire0233 cime]$

Before creating a new case, I also tried to run the scripts_regression_test.py to validate porting and the same error (Expected one child) returns.

Finnaly, I tried create_newcase with the --debug option, below. It seems like it get stuck. Attached is the output.

(cesm) [numa19@ire0233 scripts]$ ./create_newcase --case /disco2/cesm/cases/b.day1.0 --res f19_g17 --compset B1850 --debug > out2.txt

Thank you so much for the help!
 

Attachments

  • out2.txt
    5.4 KB · Views: 7

jedwards

CSEG and Liaisons
Staff member
Sorry for not being complete. The directory would be $HOME/.cime but if you don't know about it you probably don't have it.
As for using the debug option, it's dropping you into the python debugger. Run it again and this time type 'where', this should show
what the problem is.
 
Hi Jim!

I did what you suggested and here is the result:

Machine is centos7-linux
> /home/numa19/cesm/cesm2.1.3/cime/scripts/lib/CIME/utils.py(126)expect()
-> try:
(Pdb) where
/home/numa19/cesm/cesm2.1.3/cime/scripts/create_newcase(218)<module>()
-> _main_func(__doc__)
/home/numa19/cesm/cesm2.1.3/cime/scripts/create_newcase(206)_main_func()
-> case.create(casename, srcroot, compset, grid, user_mods_dir=user_mods_dir,
/home/numa19/cesm/cesm2.1.3/cime/scripts/lib/CIME/case/case.py(1440)create()
-> self.configure(compset_name, grid_name, machine_name=machine_name,
/home/numa19/cesm/cesm2.1.3/cime/scripts/lib/CIME/case/case.py(854)configure()
-> env_mach_specific_obj.populate(machobj)
/home/numa19/cesm/cesm2.1.3/cime/scripts/lib/CIME/XML/env_mach_specific.py(30)populate()
-> default_run_suffix = machobj.get_child("default_run_suffix", root=machobj.root)
/home/numa19/cesm/cesm2.1.3/cime/scripts/lib/CIME/XML/machines.py(61)get_child()
-> return super(Machines, self).get_child(name, attributes, root, err_msg)
/home/numa19/cesm/cesm2.1.3/cime/scripts/lib/CIME/XML/generic_xml.py(255)get_child()
-> expect(len(children) == 1, err_msg if err_msg else "Expected one child")
> /home/numa19/cesm/cesm2.1.3/cime/scripts/lib/CIME/utils.py(126)expect()
-> try:
(Pdb)
 

jedwards

CSEG and Liaisons
Staff member
Okay I see it now, when you striped the config_machines.xml file you took out too much. At the end of the file after </machine> but before </config_machines> you should have
Code:
  <default_run_suffix>
    <default_run_exe>${EXEROOT}/cesm.exe </default_run_exe>
    <default_run_misc_suffix> >> cesm.log.$LID 2>&amp;1 </default_run_misc_suffix>
  </default_run_suffix>
 
I did take too much from the config_machines.xml!!

I put the missing code and it created the case successfully!
I also ran case.setup and I am running cesm.build

But then, I tried to run the scripts_regression_test.py and I still get FAILs. The output file is attached.

(cesm) [numa19@ire0233 tests]$ python scripts_regression_tests.py

----------------------------------------------------------------------
Ran 361 tests in 461.567s

FAILED (failures=77, errors=5, skipped=17)
 

Attachments

  • out3.txt
    613 bytes · Views: 5

jedwards

CSEG and Liaisons
Staff member
If you want to be able to run scripts_regression_tests.py then you need to follow the porting instructions.
In particular you should not remove all of the provided code from the xml files, you should simply append your
new machine. The output you provided from scripts_regression_tests.py is incomplete - you need to capture stderr as well as stdout.
 
Top