You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arrays are dimensioned as array(npts,nz) which means that the npts dimension varies fastest. So it is more efficient to access elements 1 level at a time, eg:
do k =1, nz
do n =1, npts
array(n,k)
end doend do
However in KPP, we actually access data the other way around, as the physics code operates on one grid point at a time. So it would be much more efficient if the levels were contiguous in memory, and the arrays dimensioned as array(nz,npts).
This would also make the MPI parallelisation easier, as we would be parallelising over the outer dimension.
For 3d arrays the position of the extra dimension depends on the access patterns - so I need to check this.
The text was updated successfully, but these errors were encountered:
Arrays are dimensioned as
array(npts,nz)
which means that thenpts
dimension varies fastest. So it is more efficient to access elements 1 level at a time, eg:However in KPP, we actually access data the other way around, as the physics code operates on one grid point at a time. So it would be much more efficient if the levels were contiguous in memory, and the arrays dimensioned as
array(nz,npts)
.This would also make the MPI parallelisation easier, as we would be parallelising over the outer dimension.
For 3d arrays the position of the extra dimension depends on the access patterns - so I need to check this.
The text was updated successfully, but these errors were encountered: