[RegCNET] Another Bug confirmed and fixed in RegCM4.2 with CLM option
Guangshan Chen
gchen9 at gmail.com
Fri May 11 17:48:22 CEST 2012
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120511/82d59bc4/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clm_atmlnd.F90.patch
Type: application/octet-stream
Size: 24669 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120511/82d59bc4/attachment-0002.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120511/82d59bc4/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_mtrxclm.F90.patch
Type: application/octet-stream
Size: 1683 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120511/82d59bc4/attachment-0003.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120511/82d59bc4/attachment-0005.html>
More information about the RegCNET
mailing list