PIO  2.5.4
Functions
Initialize a Decomposition

Intiailize a decomposition of data into distributed arrays in C. More...

Functions

int PIOc_InitDecomp (int iosysid, int pio_type, int ndims, const int *gdimlen, int maplen, const PIO_Offset *compmap, int *ioidp, const int *rearranger, const PIO_Offset *iostart, const PIO_Offset *iocount)
 Initialize the decomposition used with distributed arrays. More...
 
int PIOc_init_decomp (int iosysid, int pio_type, int ndims, const int *gdimlen, int maplen, const PIO_Offset *compmap, int *ioidp, int rearranger, const PIO_Offset *iostart, const PIO_Offset *iocount)
 Initialize the decomposition used with distributed arrays. More...
 
int PIOc_InitDecomp_bc (int iosysid, int pio_type, int ndims, const int *gdimlen, const long int *start, const long int *count, int *ioidp)
 This is a simplified initdecomp which can be used if the memory order of the data can be expressed in terms of start and count on the file. More...
 

Detailed Description

Intiailize a decomposition of data into distributed arrays in C.

Function Documentation

◆ PIOc_init_decomp()

int PIOc_init_decomp ( int  iosysid,
int  pio_type,
int  ndims,
const int *  gdimlen,
int  maplen,
const PIO_Offset compmap,
int *  ioidp,
int  rearranger,
const PIO_Offset iostart,
const PIO_Offset iocount 
)

Initialize the decomposition used with distributed arrays.

The decomposition describes how the data will be distributed between tasks.

Parameters
iosysidthe IO system ID.
pio_typethe basic PIO data type used.
ndimsthe number of dimensions in the variable, not including the unlimited dimension.
gdimlenan array length ndims with the sizes of the global dimensions.
maplenthe local length of the compmap array.
compmapa 0 based array of offsets into the array record on file. A -1 in this array indicates a value which should not be transfered.
ioidppointer that will get the io description ID.
rearrangerthe rearranger to be used for this decomp or 0 to use the default. Valid rearrangers are PIO_REARR_BOX and PIO_REARR_SUBSET.
iostartAn array of start values for block cyclic decompositions. If NULL ???
iocountAn array of count values for block cyclic decompositions. If NULL ???
Returns
0 on success, error code otherwise
Author
Jim Edwards, Ed Hartnett

◆ PIOc_InitDecomp()

int PIOc_InitDecomp ( int  iosysid,
int  pio_type,
int  ndims,
const int *  gdimlen,
int  maplen,
const PIO_Offset compmap,
int *  ioidp,
const int *  rearranger,
const PIO_Offset iostart,
const PIO_Offset iocount 
)

Initialize the decomposition used with distributed arrays.

The decomposition describes how the data will be distributed between tasks.

Internally, this function will:

  • Allocate and initialize an iodesc struct for this decomposition. (This also allocates an io_region struct for the first region.)
  • (Box rearranger only) If iostart or iocount are NULL, call CalcStartandCount() to determine starts/counts. Then call compute_maxIObuffersize() to compute the max IO buffer size needed.
  • Create the rearranger.
  • Assign an ioid and add this decomposition to the list of open decompositions.
Parameters
iosysidthe IO system ID.
pio_typethe basic PIO data type used.
ndimsthe number of dimensions in the variable, not including the unlimited dimension.
gdimlenan array length ndims with the sizes of the global dimensions.
maplenthe local length of the compmap array.
compmapa 1 based array of offsets into the array record on file. A 0 in this array indicates a value which should not be transfered.
ioidppointer that will get the io description ID. Ignored if NULL.
rearrangerpointer to the rearranger to be used for this decomp or NULL to use the default.
iostartAn array of start values for block cyclic decompositions for the SUBSET rearranger. Ignored if block rearranger is used. If NULL and SUBSET rearranger is used, the iostarts are generated.
iocountAn array of count values for block cyclic decompositions for the SUBSET rearranger. Ignored if block rearranger is used. If NULL and SUBSET rearranger is used, the iostarts are generated.
Returns
0 on success, error code otherwise
Author
Jim Edwards, Ed Hartnett

◆ PIOc_InitDecomp_bc()

int PIOc_InitDecomp_bc ( int  iosysid,
int  pio_type,
int  ndims,
const int *  gdimlen,
const long int *  start,
const long int *  count,
int *  ioidp 
)

This is a simplified initdecomp which can be used if the memory order of the data can be expressed in terms of start and count on the file.

In this case we compute the compdof.

Parameters
iosysidthe IO system ID
pio_type
ndimsthe number of dimensions
gdimlenan array length ndims with the sizes of the global dimensions.
startstart array
countcount array
ioidppointer that gets the IO ID.
Returns
0 for success, error code otherwise
Author
Jim Edwards