CAM_PIO_OPENFILE is a collective operation and on SE grids the assumption that all CPUs have the same # of chunks does not work. This assumption was implicitly made in photolysis_init.
This works for drydep_mod because CAM_PIO_OPENFILE is called by each CPU and not per chunk, but for photolysis_init it is called by chunk because it populates fields in State_Chm.
Fix
This update changes photolysis_init to only run on the first chunk in each CPU. This is made possible by letting GEOS-Chem be aware of which chunk it is running on via State_Grid%ID.
This is a companion PR to https://github.com/geoschem/geos-chem/pull/2366 -- this must be added to GEOS-Chem first to enable
State_Grid%ID
andState_Grid%ROOT_ID
Problem cause
CAM_PIO_OPENFILE
is a collective operation and on SE grids the assumption that all CPUs have the same # of chunks does not work. This assumption was implicitly made inphotolysis_init
.This works for
drydep_mod
becauseCAM_PIO_OPENFILE
is called by each CPU and not per chunk, but forphotolysis_init
it is called by chunk because it populates fields inState_Chm
.Fix
This update changes
photolysis_init
to only run on the first chunk in each CPU. This is made possible by letting GEOS-Chem be aware of which chunk it is running on viaState_Grid%ID
.