[MITgcm-devel] serious divided adjoint recomputation in latest code
Matthew Mazloff
mmazloff at ucsd.edu
Tue Oct 14 13:49:22 EDT 2014
Hello
Unfortunately I don't know when this happened, but there is a "bug" in the latest DIVA code. It is benign in that it doesn't effect the results, but it is serious in that it results in an extra forward loop.
It is reproducible with
MITgcm/verification/lab_sea/
At the beginning of adthe_main_loop there is the part
C----------------------------------------------
C skip adjoint before divided loop
C----------------------------------------------
where nothing needs to happen in the DIVA setup. I'm not sure its purpose, but it should definitely not call main_do_loop.
(For the nondiva, tapelevel 3 are written here -- but it should not be written here for diva as that happens in mdthe_main_loop)
For the DIVA it does say:
if (idivbeg .ne. nchklev_3) then
goto 9813
endif
but for the first loop idivbeg does equal nchklev_3 and the extra main_do_loop is called. I have seen this before, and I think it is just that TAF needs to get its indices in place, but I am having a hard time determining which variable is responsible. I have used the flag -showrecomp but it doesn't specify the issue.
In the older code nothing really happened between
goto 9813
and
9813
This happens as far back as to code I downloaded in Feb. 2014 -- I am not sure when the extra call to the_main_loop reared its ugly head.
And the issue runs deep in the code -- e.g. its not due to the seaice package or a specific cost term. Any suggestions on how to make progress with this?
Thanks
Matt
More information about the MITgcm-devel
mailing list