Hi everyone,
I use CMAQ-5.3.2 to simulate Hg and the model runs smoothly with “CTM_HGBIDI N”. Once i turn on the mercury bi-directional flux for in-line deposition velocities(CTM_HGBIDI Y), the following error appears:
It would be helpful to re-build the model for debug and run the debug-executable: that way, when we get the seg-fault, the traceback will list the files and lines related to the fault.
Note that you need to remove all the optimized “.o” and “.mod” files before you do the debug-make… the current CMAQ build-system doesn’t separate debug-builds from optimized-builds.
cmaq_main.F line 96-98:
DO ISTEP = 1, NSTEPS
CALL CMAQ_DRIVER (STDATE, STTIME, MODEL_TSTEP, JDATE, JTIME, (ISTEP .EQ. NSTEPS))
END DO
I am confused and have no clue how to fix this, could you please help?
Thanks!
Lin
This is quite curious. The possibilities would seem to be
subscript out of bounds in fevgrn(c,r) or Grid_Data%lufrac(c,r,l), which seems quite improbable given the loop-bounds in the enclosing loop-nest and the ALLOCATE statements immediately above HGSIM.F line 174-176; or
Grid_Data%lufrac(c,r,l) not yet allocated (which seems unlkely, also.
BTW, this is lousy code that has the relationship between subscripts and loop-orders exactly backwards for good performance (and the bad performance will get worse and worse as the problem size gets larger and larger; for reasonable performance, the loop order should have been:
DO L = 1, N_LUFRAC
DO R = 1, NROWS
DO C = 1, NCOLS
Hi,
I changed the HGSIM.F loop according to what you said and the HGSIM.F error disappear. But the other three are still there. Does this mean to fix this problem i need to change all these three files as well? Could you please help with it?
Thanks!
Lin
This issue has not yet been fixed in the current release of CMAQ but will be fixed in the next release.
We have opened a new issue page on the CMAQ github site to document this error and describe a code fix that can be used prior to the next CMAQ release.