[MITgcm-devel] vectorizing seaice and exf
Martin Losch
Martin.Losch at awi.de
Thu Sep 27 08:14:07 EDT 2007
Hi,
the seaice model is now basically vectorizing quite well: with my
(really: Jens-Olaf's) fix you improve the Vector operation ratio from
91% to 99.4%, the most unsatifactory part remains in
seaice_advection, where I can get only 84%, but I guess you cannot
change that (gad_advection should have a similar problem).
The bottleneck (from a vectorization point of view) is in
exf_bulkformulae (and exf_bulk_largeyeager04, I expect), because of
the iteration as the innermost loop. Jens-Olaf's solution is
unsatifactory: he noticed that niter_bulk = 2 always (per parameter
definition) and just copied the loop body twice, thus removing the
iteratioin loop. I am still looking for a directive that can do that
automatically, since the loop range is know at compile time. But I am
afraid that the only real solution would be "loop pushing": move the
iteration out of the ij-loops. This means redefining a few fields
(the ones that are updated in the iteration, which are they?) as 2D.
I would like to do this, but what's the best way: have two versions
of exf_bulkformlulae, one as it is and one for vector machines? Or
can we live with one version that is vectorizable at the cost of
having a few extra 2d fields?
Martin
More information about the MITgcm-devel
mailing list