[MITgcm-support] Optimization in x and not y?
Martin Losch
Martin.Losch at awi.de
Thu Aug 18 11:05:47 EDT 2011
Hi Jody,
the i-loop is usually the innermost loop, so it's the one that get's vectorized (first). Usually the j-loop does not even get vectorized at all. With vector-cpus, this matters a lot. Some compilers/chip combinations can do some vectorization, so then it also matters. You'd have to try it with your architecture. Without vectorization it shouldn't matter that much, may the memory access is a bit faster (I am speculating).
Martin
On Aug 18, 2011, at 4:59 PM, Klymak Jody wrote:
> Hi Martin,
>
> On 2011-08-18, at 3:17 AM, Martin Losch wrote:
>
>> What happens, when you turn the domain around so that is has ny=1 and nx=1000? (On a vector machine this will be much faster, but even on a single cpu with some vectorization, it will be faster).
>
> Umm, OK, can you explain this in more detail? I've done tons of 2-D models nx = 1, ny=N, and had no idea that there was an optimization if I do it the other way around. Is it because the x-loop is the inner loop? I run on some 8 core xserves.
>
> Thanks, Jody
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
More information about the MITgcm-support
mailing list