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

SCAM build error after adding a namelist variable

yanhp2009

Huiping Yan
New Member
HI, I recently added a logical namelist variable in to the group of phys_ctl_nl following the steps:
1. add the definition of the new namelist variable into the file namelist_definition.xml at the directory of components/cam/bld/namelist_files/namelist_definition.xml
2. add the variable in the file phys_control.F90 with the initiation, read namelist, and mpi broadcast.
All the modifications work well when I run F2000climo compset, but when i move to the single column model compset, one error occurs during model building:

FSCAM_T42_T42_CESM2_drib1/bld/lib//libatm.a(phys_control.o): In function `phys_control_mp_phys_ctl_readnl_':


CESM_drib/components/cam/src/physics/cam/phys_control.F90:181: undefined reference to `mpibcast_'


The 181 line in phys_control.F90 is where I add the new variable broadcast:


call mpibcast(l_dribling_tend, 1, mpi_logical, masterprocid, mpicom, ierr)



I am wondering whether some other modifications are needed to make the new namelist variable work in the single column model.


Ps: the model version I run is CESM2.1.3, and the compile is inter/18.0.0, impi/2018.0. netcdf/4.6.2

the command line to create the single column is following the CAM6 user guide:

./create_newcase --case $CASEROOT --mach $MACH -q Regular --res $RESOLUTION --compset $COMPSET --user-mods-dir $CCSMROOT/components/cam/cime_config/usermods_dirs/scam_mandatory


Any suggestion?


Thanks,
Huiping Yan
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
mpibcast is a CAM specific subroutine which depending on the version is in the mpishorthand module. So you need to add a use statement to mpishorthand in order to use mpibcast. This should be similar to other instances of mpibcast.

@nusbaume can you verify I'm correct here?
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
This is better served in the CAM specific forum, so I'm moving it there.
 

yanhp2009

Huiping Yan
New Member
mpibcast is a CAM specific subroutine which depending on the version is in the mpishorthand module. So you need to add a use statement to mpishorthand in order to use mpibcast. This should be similar to other instances of mpibcast.

@nusbaume can you verify I'm correct here?
Thanks for your answer, Erik. Yes, you are right. When I add the 'mpishorthand', it works.
A little thing may be need to think, why SCAM report such error while CAM not.

And a following question (or bug), I found SCAM could not automatically download the IOP data from website. If I download the data manually, SCAM can be run successfully. So I think there may be some bugs in SCAM scripts, hope these problems could be solved soon.


Thanks,
Huiping Yan
 
Top