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 using build from a different case

r_a_khan

Ramsha Khan
New Member
I am running a few hundred cases for the single column compset SCAM for cesm2.1.0 to create an emulator, and I'm trying to avoid having to build each case separately. Since I am only perturbing namelist parameters each build should be identical. I have successfully built and ran a base case called EM_BASE_CASE, and then for each of my cases, after setting up the case instead of using ./case.build I have :

xmlchange EXEROOT=../cesm2.1.0-out/EM_BASE_CASE/bld
xmlchange BUILD_COMPLETE=TRUE

However, this gives me the following error in the log file:

pio_support::pio_die:: myrank= -1 : ERROR: ionf_mod.F90: 122 :
PNETCDF not enabled in the build
Image PC Routine Line Source
cesm.exe 00000000025E1596 Unknown Unknown Unknown
cesm.exe 000000000246758A pio_support_mp_pi 118 pio_support.F90
cesm.exe 0000000002465BEB pio_utils_mp_bad_ 97 pio_utils.F90
cesm.exe 00000000024E37B8 ionf_mod_mp_creat 122 ionf_mod.F90
cesm.exe 0000000002458F88 piolib_mod_mp_cre 2663 piolib_mod.F90
cesm.exe 00000000006C4F77 cam_pio_utils_mp_ 1112 cam_pio_utils.F90
cesm.exe 0000000000689552 cam_history_mp_h_ 3801 cam_history.F90
cesm.exe 0000000000686256 cam_history_mp_ws 4859 cam_history.F90
cesm.exe 00000000006712DA cam_comp_mp_cam_r 388 cam_comp.F90
cesm.exe 0000000000662F6C atm_comp_mct_mp_a 441 atm_comp_mct.F90
cesm.exe 0000000000597856 component_mod_mp_ 728 component_mod.F90
cesm.exe 00000000005744CE cime_comp_mod_mp_ 3436 cime_comp_mod.F90
cesm.exe 0000000000597417 MAIN__ 125 cime_driver.F90
cesm.exe 000000000056E92E Unknown Unknown Unknown
libc-2.17.so 00007F233975E555 __libc_start_main Unknown Unknown
cesm.exe 000000000056E829 Unknown Unknown Unknown
MPI_Abort: error code = 1

When I build the case in my script instead, then the model runs successfully, so the problem should not be with anything else.

I would appreciate any insight into troubleshooting this. In theory I can build the model each time, but it is quite an inefficient use of computing resources.
 

jedwards

CSEG and Liaisons
Staff member
We have a script create_clone which is intended for this usage.
usage: create_clone [-h] [-d] [-v] [-s] --case CASE --clone CLONE
[--ensemble ENSEMBLE]
[--user-mods-dirs [USER_MODS_DIRS [USER_MODS_DIRS ...]]]
[--keepexe] [--mach-dir MACH_DIR] [--project PROJECT]
[--cime-output-root CIME_OUTPUT_ROOT]

optional arguments:
-h, --help show this help message and exit
-d, --debug Print debug information (very verbose) to file /glade/work/jedwards/sandboxes/ctsm/cime/scripts/create_clone.log
-v, --verbose Add additional context (time and file) to log messages
-s, --silent Print only warnings and error messages
--case CASE, -case CASE
(required) Specify a new case name. If not a full pathname,
the new case will be created under then current working directory.
--clone CLONE, -clone CLONE
(required) Specify a case to be cloned. If not a full pathname,
the case to be cloned is assumed to be under then current working directory.
--ensemble ENSEMBLE clone an ensemble of cases, the case name argument must end in an integer.
for example: ./create_clone --clone case.template --case case.001 --ensemble 4
will create case.001, case.002, case.003, case.004 from existing case.template
--user-mods-dirs [USER_MODS_DIRS [USER_MODS_DIRS ...]], --user-mods-dir [USER_MODS_DIRS [USER_MODS_DIRS ...]]
Full pathname to a directory containing any combination of user_nl_* files
and a shell_commands script (typically containing xmlchange commands).
The directory can also contain an SourceMods/ directory with the same structure
as would be found in a case directory.
It can also contain a file named 'include_user_mods' which gives the path to
one or more other directories that should be included.
Multiple directories can be given to the --user-mods-dirs argument,
in which case changes from all of them are applied.
(If there are conflicts, later directories take precedence.)
(Care is needed if multiple directories include the same directory via 'include_user_mods':
in this case, the included directory will be applied multiple times.)
If this argument is used in conjunction
with the --keepexe flag, then no changes will be permitted to the env_build.xml
in the newly created case directory.
--keepexe, -keepexe Sets EXEROOT to point to original build. It is HIGHLY recommended
that the original case be built BEFORE cloning it if the --keepexe flag is specfied.
This flag will make the SourceMods/ directory in the newly created case directory a
symbolic link to the SourceMods/ directory in the original case directory.
--mach-dir MACH_DIR, -mach_dir MACH_DIR
Specify the locations of the Machines directory, other than the default.
The default is CIMEROOT/machines.
--project PROJECT, -project PROJECT
Specify a project id for the case (optional).
Used for accounting and directory permissions when on a batch system.
The default is user or machine specified by PROJECT.
Accounting (only) may be overridden by user or machine specified CHARGE_ACCOUNT.
--cime-output-root CIME_OUTPUT_ROOT
Specify the root output directory. The default is the setting in the original
case directory. NOTE: create_clone will fail if this directory is not writable.
 

Francesca Bruno

ranqi
New Member
I am running a few hundred cases for the single column compset SCAM for cesm2.1.0 to create an emulator, and I'm trying to avoid having to build each case separately. Since I am only perturbing namelist parameters each build should be identical. I have successfully built and ran a base case called EM_BASE_CASE, and then for each of my cases, after setting up the case instead of using ./case.build I have :

xmlchange EXEROOT=../cesm2.1.0-out/EM_BASE_CASE/bld
xmlchange BUILD_COMPLETE=TRUE

However, this gives me the following error in the log file:

pio_support::pio_die:: myrank= -1 : ERROR: ionf_mod.F90: 122 :
PNETCDF not enabled in the build
Image PC Routine Line Source
cesm.exe 00000000025E1596 Unknown Unknown Unknown
cesm.exe 000000000246758A pio_support_mp_pi 118 pio_support.F90
cesm.exe 0000000002465BEB pio_utils_mp_bad_ 97 pio_utils.F90
cesm.exe 00000000024E37B8 ionf_mod_mp_creat 122 ionf_mod.F90
cesm.exe 0000000002458F88 piolib_mod_mp_cre 2663 piolib_mod.F90
cesm.exe 00000000006C4F77 cam_pio_utils_mp_ 1112 cam_pio_utils.F90
cesm.exe 0000000000689552 cam_history_mp_h_ 3801 cam_history.F90
cesm.exe 0000000000686256 cam_history_mp_ws 4859 cam_history.F90
cesm.exe 00000000006712DA cam_comp_mp_cam_r 388 cam_comp.F90
cesm.exe 0000000000662F6C atm_comp_mct_mp_a 441 atm_comp_mct.F90
cesm.exe 0000000000597856 component_mod_mp_ 728 component_mod.F90
cesm.exe 00000000005744CE cime_comp_mod_mp_ 3436 cime_comp_mod.F90
cesm.exe 0000000000597417 MAIN__ 125 cime_driver.F90
cesm.exe 000000000056E92E Unknown Unknown Unknown
libc-2.17.so 00007F233975E555 __libc_start_main Unknown Unknown
cesm.exe 000000000056E829 Unknown Unknown Unknown
MPI_Abort: error code = 1

When I build the case in my script instead, then the model runs successfully, so the problem should not be with anything else.

I would appreciate any insight into troubleshooting this. In theory I can build the model each time, but it is quite an inefficient use of computing resources.
Hi, Ramsha. Do you meet the error "forrtl: error (76): Abort trap signal", when running the SCAM? The build process succeed while there is an error happened when I submitted it.
 

jedwards

CSEG and Liaisons
Staff member
The create_clone script is meant to be used for this.
./create_clone
usage: create_clone [-h] [-d] [-v] [-s] --case CASE --clone CLONE
[--ensemble ENSEMBLE] [--user-mods-dir USER_MODS_DIR]
[--keepexe] [--mach-dir MACH_DIR] [--project PROJECT]
[--cime-output-root CIME_OUTPUT_ROOT]


The ensemble argument accepts the size of the ensemble you want to create and the --keepexe argument says all members should point to the same executable.
 

tresamt

Tresa Mary
Member
Hi,
Is this applicable in CESM1.2.2?
I mean, can multiple cases be build to the same folder with just a change in usr_nl_cam?

Thankyou
Regards
Tresa
 

tresamt

Tresa Mary
Member
So, if I build multiple cases to the same build folder, and these cases differed only for one inputdata, will it cause runtime error?
In my case what happened is : since individual cases are build using the build command, the changes in user_nl_cam are reflected in build namelist. But the build of all cases happened to a single folder, so, the time consumed for building individual cases came down.
Do you think this would lead to run-time errors in CESM1.2.2?


Thank you
Tresa
 
Top