Scheduled Downtime
On Wednesday 09 March 2022 from 6am to 10am MT, the website will be down for maintenance

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