Dear all,
There is another bug confirmed and fixed in RegCM4.2 with CLM option.
First, thanks for Chao Sun who found it and Phan Van Tan who provided part of fixing.
This bug is in ./Main/clmlib/clm_atmlnd.F90, line 1370 and line 1374.
I have confirmed that line 1370 and line 1374 do cause a segment fault due to reallocation of c2r_allout by each processor.
(if you use one processor, it is no problem. Also you may can not find it by just run the model for couple of days. I find it after
about one month. At first, I just tested the code for couple of days and did not find it.) After fixing it, the model passed the crashed point.
It is still running now (two months already).
The lines 1370 and 1374 should be fixed as follow:
if(AERTYP.ne.'AER00D0') then !Aerosol scheme on
nout = 22
allocate(c2r_all(nt*nout))
if (.NOT. allocated(c2r_allout(numg*nout))) allocate(c2r_allout(numg*nout))
else
nout = 20
allocate(c2r_all(nt*nout))
if (.NOT. allocated(c2r_allout(numg*nout))) allocate(c2r_allout(numg*nout))
end if
I made a new patch file based on the old one in ./Main/clmlib/patchset. You can use this new patch to replace the old one.
Next step, comment deallocate(c2r_allout) (delete this line) in ./Main/clmlib/mod_mtrxclm.F90.
I had made a patch file for mod_mtrxclm.F90. The attached is a new one.
Guangshan Chen
University of Wisconsin-Madison, USA