ParallelIO
Functions
pioc.c File Reference

PIO C interface. More...

#include <config.h>
#include <pio.h>
#include <pio_internal.h>

Functions

int PIOc_iosystem_is_active (const int iosysid, bool *active)
 Check to see if PIO has been initialized.
 
int PIOc_File_is_Open (int ncid)
 Check to see if PIO file is open.
 
int PIOc_Set_File_Error_Handling (int ncid, int method)
 Set the error handling method to be used for subsequent pio library calls, returns the previous method setting.
 
int PIOc_advanceframe (int ncid, int varid)
 Increment the unlimited dimension of the given variable.
 
int PIOc_setframe (const int ncid, const int varid, const int frame)
 Set the unlimited dimension of the given variable. More...
 
int PIOc_get_numiotasks (int iosysid, int *numiotasks)
 Get the number of IO tasks set.
 
int PIOc_get_iorank (int iosysid, int *iorank)
 Get the IO rank on the current task.
 
int PIOc_get_local_array_size (int ioid)
 Get the local size of the variable.
 
int PIOc_Set_IOSystem_Error_Handling (int iosysid, int method)
 Set the error handling method used for subsequent calls.
 
int PIOc_InitDecomp (const int iosysid, const int basetype, const int ndims, const int dims[], const int maplen, const PIO_Offset *compmap, int *ioidp, const int *rearranger, const PIO_Offset *iostart, const PIO_Offset *iocount)
 C interface to the initdecomp. More...
 
int PIOc_InitDecomp_bc (const int iosysid, const int basetype, const int ndims, const int dims[], 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...
 
int PIOc_Init_Intracomm (const MPI_Comm comp_comm, const int num_iotasks, const int stride, const int base, const int rearr, int *iosysidp)
 
int PIOc_Init_Intracomm_from_F90 (int f90_comp_comm, const int num_iotasks, const int stride, const int base, const int rearr, int *iosysidp)
 
int PIOc_set_hint (const int iosysid, char hint[], const char hintval[])
 Send a hint to the MPI-IO library. More...
 
int PIOc_finalize (const int iosysid)
 Clean up internal data structures, free MPI resources, and exit the pio library. More...
 
int PIOc_iam_iotask (const int iosysid, bool *ioproc)
 return a logical indicating whether this task is an iotask
 
int PIOc_iotask_rank (const int iosysid, int *iorank)
 return the rank of this task in the io comm or -1 if this task is not in the comm
 
int PIOc_iotype_available (const int iotype)
 return true if this iotype is supported in the build, 0 otherwise
 

Detailed Description

PIO C interface.

Author
Jim Edwards
Date
2014
See also
http://code.google.com/p/parallelio/

Function Documentation

§ PIOc_finalize()

int PIOc_finalize ( const int  iosysid)

Clean up internal data structures, free MPI resources, and exit the pio library.

Parameters
iosysidthe io system ID provided by PIOc_Init_Intracomm().
Returns
0 for success or non-zero for error.

§ PIOc_Init_Intracomm_from_F90()

int PIOc_Init_Intracomm_from_F90 ( int  f90_comp_comm,
const int  num_iotasks,
const int  stride,
const int  base,
const int  rearr,
int *  iosysidp 
)

§ PIOc_InitDecomp()

int PIOc_InitDecomp ( const int  iosysid,
const int  basetype,
const int  ndims,
const int  dims[],
const int  maplen,
const PIO_Offset *  compmap,
int *  ioidp,
const int *  rearranger,
const PIO_Offset *  iostart,
const PIO_Offset *  iocount 
)

C interface to the initdecomp.

Parameters
iosysidIO system descriptor structure. (input) This structure contains the general IO subsystem data and MPI structure (input)
basetypethe basic PIO data type used (input)
ndimsthe number of dimensions in the variable (input)
dims[]the global size of each dimension (input)
maplenthe local length of the compmap array (input)
compmap[]a 1 based array of offsets into the array record on file. A 0 in this array indicates a value which should not be transfered. (input)
ioidpthe io description pointer (output)
rearrangerthe rearranger to be used for this decomp or NULL to use the default (optional input)
iostartAn optional array of start values for block cyclic decompositions (optional input)
iocountAn optional array of count values for block cyclic decompositions (optional input)

§ PIOc_InitDecomp_bc()

int PIOc_InitDecomp_bc ( const int  iosysid,
const int  basetype,
const int  ndims,
const int  dims[],
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 and use the subset rearranger

§ PIOc_set_hint()

int PIOc_set_hint ( const int  iosysid,
char  hint[],
const char  hintval[] 
)

Send a hint to the MPI-IO library.

§ PIOc_setframe()

int PIOc_setframe ( const int  ncid,
const int  varid,
const int  frame 
)

Set the unlimited dimension of the given variable.

Parameters
ncidthe ncid of the file.
varidthe varid of the variable
framethe value of the unlimited dimension. In c 0 for the first record, 1 for the second
Returns
PIO_NOERR for no error, or error code.