[MITgcm-devel] OAD_convert and S/Rs within k-loops

Daniel Goldberg dngoldberg at gmail.com
Fri Mar 8 10:42:27 EST 2019


Hi All

(apologies if this gets double posted)

I have noticed that CALC_PHI_HYD passes the arrays SFLD and TFLD to
CALC_GRAD_PHI_HYD and DIAGS_PHI_RLOW, but i can't see where these arrays
are then used within these called subroutines -- are the arguments required?

If not, i would think the performance hit is negligible in most cases, but
when compiling with OpenAD the result is that OAD_convert is called to
convert the active arrays SFLD and TFLD to real arrays -- and since this is
called within the dynamics loop, the unncessary array conversion takes
place Nr times per time step.

In my current setup this seems to increase "plain mode" run time (and
presumably adjoint mode too) by at least 200%. Im unsure if there is
anywhere else such a performance hit is occuring. (Of course, i set
useDiagPhiRlow  to .false., but  i can't avoid calling CALC_GRAD_PHI_HYD!)
There may be a way to "trick" openad into not behaving this way -- but i
wanted to check whether these arguments are even needed.

Best
Dan


-- 

Daniel Goldberg, PhD
Sr. Lecturer in Glaciology
School of Geosciences, University of Edinburgh
Geography Building, Drummond Street, Edinburgh EH8 9XP


em: dan.goldberg at ed.ac.uk
web: https://www.geos.ed.ac.uk/homes/dgoldber
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-devel/attachments/20190308/db6ae908/attachment.html>


More information about the MITgcm-devel mailing list