1D start, count, stride through a 3D variable?

Wei-keng Liao wkliao at eecs.northwestern.edu
Mon Feb 9 10:28:29 CST 2015


Hi, Hellen

If length of the least significant dimension of your variable is divisible by
the number of MPI processes, then you can use vars API family, by setting
argument stride[ndims-1] = np and all other stride[0...ndims-2] = 1 in C order,
where ndims is the number of dimensions and np is the number of processes.

If it is not divisible, then you will want to consider using vard family
(newly added to version 1.6.0. Check its C API reference guide for usage).
In this case, you need to create an MPI derived data type for the strided
access pattern. Please let me know if you need assistance on creating such
a data type.

Wei-keng

On Feb 9, 2015, at 9:45 AM, Helen Kershaw wrote:

> 
> We are working on an application where the we would like to have a strided read, but ignore the number of dimensions a variable has.  The stride would always be one-dimensional.  So in our code, each variable (1D,2D,3D, etc.) is treated as 1D. So if there were 10 mpi tasks, each task would pick up every 10th element of the variable.
> 
> Is this something that is possible with pnetcdf? From the documentation it seems that it is not, but I might be missing something.
> 
> Thanks for your help,
> Helen Kershaw
> 



More information about the parallel-netcdf mailing list