PIO  2.5.4
Classes | Macros | Typedefs | Enumerations | Functions
pio.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <mpi.h>
#include <uthash.h>
#include <netcdf.h>
Include dependency graph for pio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  var_desc_t
 Variable description structure. More...
 
struct  io_region
 IO region structure. More...
 
struct  rearr_comm_fc_opt
 Rearranger comm flow control options. More...
 
struct  rearr_opt
 Rearranger options. More...
 
struct  io_desc_t
 IO descriptor structure. More...
 
struct  iosystem_desc_t
 IO system descriptor structure. More...
 
struct  wmulti_buffer
 The multi buffer holds data from one or more variables. More...
 
struct  file_desc_t
 File descriptor structure. More...
 

Macros

#define PIO_OFFSET   MPI_OFFSET
 PIO_OFFSET is an integer type of size sufficient to represent the size (in bytes) of the largest file supported by MPI. More...
 
#define PIO_Offset   MPI_Offset
 PIO_OFFSET is defined as MPI_Offset, which is defined in pio_internal.h as long long. More...
 
#define PIO_MAX_VARS   NC_MAX_VARS
 The maximum number of variables allowed in a netCDF file.
 
#define PIO_MAX_DIMS   NC_MAX_DIMS
 The maximum number of dimensions allowed in a netCDF file.
 
#define PIO_DEFAULT   (-1)
 Pass this to PIOc_set_iosystem_error_handling() as the iosysid in order to set default error handling.
 
#define DECOMP_VERSION_ATT_NAME   "PIO_library_version"
 Used in the decomposition netCDF file. More...
 
#define DECOMP_MAX_MAPLEN_ATT_NAME   "max_maplen"
 Holds the maximum length of any task map.
 
#define DECOMP_TITLE_ATT_NAME   "title"
 Name of title attribute in decomposition file.
 
#define DECOMP_HISTORY_ATT_NAME   "history"
 Name of history attribute in decomposition file.
 
#define DECOMP_SOURCE_ATT_NAME   "source"
 Name of source attribute in decomposition file.
 
#define DECOMP_ORDER_ATT_NAME   "array_order"
 Name of array order (C or Fortran) attribute in decomposition file.
 
#define DECOMP_BACKTRACE_ATT_NAME   "backtrace"
 Name of backtrace attribute in decomposition file.
 
#define DECOMP_DIM_DIM   "dims"
 Name for the dim dim in decomp file.
 
#define DECOMP_TASK_DIM_NAME   "task"
 Name for the npes dim in decomp file.
 
#define DECOMP_MAPELEM_DIM_NAME   "map_element"
 Name for the npes dim in decomp file.
 
#define DECOMP_NDIMS   "ndims"
 Name for the number of dimensions dim in decomp file.
 
#define DECOMP_GLOBAL_SIZE_VAR_NAME   "global_size"
 Name of var in decomp file that holds global array sizes.
 
#define DECOMP_MAPLEN_VAR_NAME   "maplen"
 Name of var in decomp file that holds the length of the map for each task.
 
#define DECOMP_MAP_VAR_NAME   "map"
 Name of var in decomp file that holds map.
 
#define DECOMP_C_ORDER_STR   "C"
 String used to indicate a decomposition file is in C array-order.
 
#define DECOMP_FORTRAN_ORDER_STR   "Fortran"
 String used to indicate a decomposition file is in Fortran array-order.
 
#define NC_PIO   NC_UDF0
 A convience macro for netCDF integration code.
 
#define PIO_REARR_COMM_UNLIMITED_PEND_REQ   -1
 Constant to indicate unlimited requests for the rearranger.
 
#define PIO_GLOBAL   NC_GLOBAL
 Attribute id to put/get a global attribute.
 
#define PIO_UNLIMITED   NC_UNLIMITED
 Size argument to nc_def_dim() for an unlimited dimension.
 
#define PIO_BYTE   NC_BYTE
 signed 1 byte integer
 
#define PIO_CHAR   NC_CHAR
 ISO/ASCII character.
 
#define PIO_SHORT   NC_SHORT
 signed 2 byte integer
 
#define PIO_INT   NC_INT
 signed 4 byte integer
 
#define PIO_FLOAT   NC_FLOAT
 single precision floating point number
 
#define PIO_REAL   NC_FLOAT
 single precision floating point number
 
#define PIO_DOUBLE   NC_DOUBLE
 double precision floating point number
 
#define PIO_UBYTE   NC_UBYTE
 unsigned 1 byte int
 
#define PIO_USHORT   NC_USHORT
 unsigned 2-byte int
 
#define PIO_UINT   NC_UINT
 unsigned 4-byte int
 
#define PIO_INT64   NC_INT64
 signed 8-byte int
 
#define PIO_UINT64   NC_UINT64
 unsigned 8-byte int
 
#define PIO_STRING   NC_STRING
 string
 
#define PIO_WRITE   NC_WRITE
 Set read-write access for nc_open().
 
#define PIO_NOWRITE   NC_NOWRITE
 Set read-only access for nc_open().
 
#define PIO_CLOBBER   NC_CLOBBER
 Destroy existing file. More...
 
#define PIO_NOCLOBBER   NC_NOCLOBBER
 Don't destroy existing file. More...
 
#define PIO_FILL   NC_FILL
 Argument to nc_set_fill() to clear NC_NOFILL.
 
#define PIO_NOFILL   NC_NOFILL
 Argument to nc_set_fill() to turn off filling of data.
 
#define PIO_MAX_NAME   NC_MAX_NAME
 Max name length.
 
#define PIO_MAX_VAR_DIMS   NC_MAX_VAR_DIMS
 max per variable dimensions
 
#define PIO_64BIT_OFFSET   NC_64BIT_OFFSET
 Use large (64-bit) file offsets. More...
 
#define PIO_64BIT_DATA   0x0010
 NC_64BIT_DATA This is a problem - need to define directly instead of using include file. More...
 
#define PIO_NOERR   NC_NOERR
 Define the netCDF-based error codes. More...
 
#define PIO_EBADID   NC_EBADID
 Bad ncid.
 
#define PIO_ENFILE   NC_ENFILE
 Too many netcdfs open.
 
#define PIO_EEXIST   NC_EEXIST
 netcdf file exists && NC_NOCLOBBER
 
#define PIO_EINVAL   NC_EINVAL
 Invalid Argument.
 
#define PIO_EPERM   NC_EPERM
 Write to read only.
 
#define PIO_ENOTINDEFINE   NC_ENOTINDEFINE
 Not in define mode.
 
#define PIO_EINDEFINE   NC_EINDEFINE
 Not allowed in define mode.
 
#define PIO_EINVALCOORDS   NC_EINVALCOORDS
 Invalid coordinates.
 
#define PIO_EMAXDIMS   NC_EMAXDIMS
 not enforced after netcdf-c 4.5.0
 
#define PIO_ENAMEINUSE   NC_ENAMEINUSE
 String match to name in use.
 
#define PIO_ENOTATT   NC_ENOTATT
 Attribute not found.
 
#define PIO_EMAXATTS   NC_EMAXATTS
 NC_MAX_ATTRS exceeded - not enforced after 4.5.0.
 
#define PIO_EBADTYPE   NC_EBADTYPE
 Not a netcdf data type.
 
#define PIO_EBADDIM   NC_EBADDIM
 Invalid dimension id or name.
 
#define PIO_EUNLIMPOS   NC_EUNLIMPOS
 NC_UNLIMITED in the wrong index.
 
#define PIO_EMAXVARS   NC_EMAXVARS
 not enforced after 4.5.0
 
#define PIO_ENOTVAR   NC_ENOTVAR
 variable not found
 
#define PIO_EGLOBAL   NC_EGLOBAL
 Action prohibited on NC_GLOBAL varid.
 
#define PIO_ENOTNC   NC_ENOTNC
 Not a netcdf file.
 
#define PIO_ESTS   NC_ESTS
 In Fortran, string too short.
 
#define PIO_EMAXNAME   NC_EMAXNAME
 NC_MAX_NAME exceeded.
 
#define PIO_EUNLIMIT   NC_EUNLIMIT
 NC_UNLIMITED size already in use.
 
#define PIO_ENORECVARS   NC_ENORECVARS
 nc_rec op when there are no record vars
 
#define PIO_ECHAR   NC_ECHAR
 Attempt to convert between text & numbers.
 
#define PIO_EEDGE   NC_EEDGE
 Start+count exceeds dimension bound.
 
#define PIO_ESTRIDE   NC_ESTRIDE
 Illegal stride.
 
#define PIO_EBADNAME   NC_EBADNAME
 Attribute or variable name contains illegal characters.
 
#define PIO_ERANGE   NC_ERANGE
 Range error.
 
#define PIO_ENOMEM   NC_ENOMEM
 Memory allocation (malloc) failure.
 
#define PIO_EVARSIZE   NC_EVARSIZE
 One or more variable sizes violate format constraints.
 
#define PIO_EDIMSIZE   NC_EDIMSIZE
 Invalid dimension size.
 
#define PIO_ETRUNC   NC_ETRUNC
 File likely truncated or possibly corrupted.
 
#define PIO_EAXISTYPE   NC_EAXISTYPE
 Unknown axis type.
 
#define PIO_EDAP   NC_EDAP
 Generic DAP error.
 
#define PIO_ECURL   NC_ECURL
 Generic libcurl error.
 
#define PIO_EIO   NC_EIO
 Generic IO error.
 
#define PIO_ENODATA   NC_ENODATA
 Attempt to access variable with no data.
 
#define PIO_EDAPSVC   NC_EDAPSVC
 DAP server error.
 
#define PIO_EDAS   NC_EDAS
 Malformed or inaccessible DAS.
 
#define PIO_EDDS   NC_EDDS
 Malformed or inaccessible DDS.
 
#define PIO_EDATADDS   NC_EDATADDSDS
 Dap4 alias.
 
#define PIO_EDAPURL   NC_EDAPURL
 Malformed DAP URL.
 
#define PIO_EDAPCONSTRAINT   NC_EDAPCONSTRAINT
 Malformed DAP Constraint.
 
#define PIO_ETRANSLATION   NC_ETRANSLATION
 Untranslatable construct.
 
#define PIO_EHDFERR   NC_EHDFERR
 Error at HDF5 layer.
 
#define PIO_ECANTREAD   NC_ECANTREAD
 Can't read.
 
#define PIO_ECANTWRITE   NC_ECANTWRITE
 Can't write.
 
#define PIO_ECANTCREATE   NC_ECANTCREATE
 Can't create.
 
#define PIO_EFILEMETA   NC_EFILEMETA
 Problem with file metadata.
 
#define PIO_EDIMMETA   NC_EDIMMETA
 Problem with dimension metadata.
 
#define PIO_EATTMETA   NC_EATTMETA
 Problem with attribute metadata.
 
#define PIO_EVARMETA   NC_EVARMETA
 Problem with variable metadata.
 
#define PIO_ENOCOMPOUND   NC_ENOCOMPOUND
 Not a compound type.
 
#define PIO_EATTEXISTS   NC_EATTEXISTS
 Attribute already exists.
 
#define PIO_ENOTNC4   NC_ENOTNC4
 Attempting netcdf-4 operation on netcdf-3 file.
 
#define PIO_ESTRICTNC3   NC_ESTRICTNC3
 Attempting netcdf-4 operation on strict nc3 netcdf-4 file.
 
#define PIO_ENOTNC3   NC_ENOTNC3
 Attempting netcdf-3 operation on netcdf-4 file.
 
#define PIO_ENOPAR   NC_ENOPAR
 Parallel operation on file opened for non-parallel access.
 
#define PIO_EPARINIT   NC_EPARINIT
 Error initializing for parallel access.
 
#define PIO_EBADGRPID   NC_EBADGRPID
 Bad group ID.
 
#define PIO_EBADTYPID   NC_EBADTYPID
 Bad type ID.
 
#define PIO_ETYPDEFINED   NC_ETYPDEFINED
 Type has already been defined and may not be edited.
 
#define PIO_EBADFIELD   NC_EBADFIELD
 Bad field ID.
 
#define PIO_EBADCLASS   NC_EBADCLASS
 Bad class.
 
#define PIO_EMAPTYPE   NC_EMAPTYPE
 Mapped access for atomic types only.
 
#define PIO_ELATEFILL   NC_ELATEFILL
 Attempt to define fill value when data already exists.
 
#define PIO_ELATEDEF   NC_ELATEDEF
 Attempt to define var properties, like deflate, after enddef.
 
#define PIO_EDIMSCALE   NC_EDIMSCALE
 Problem with HDF5 dimscales.
 
#define PIO_ENOGRP   NC_ENOGRP
 No group found.
 
#define PIO_ESTORAGE   NC_ESTORAGE
 Can't specify both contiguous and chunking.
 
#define PIO_EBADCHUNK   NC_EBADCHUNK
 Bad chunksize.
 
#define PIO_ENOTBUILT   NC_ENOTBUILT
 Attempt to use feature that was not turned on when netCDF was built.
 
#define PIO_EDISKLESS   NC_EDISKLESS
 Error in using diskless access.
 
#define PIO_FILL_BYTE   NC_FILL_BYTE
 Default fill value for this type.
 
#define PIO_FILL_CHAR   NC_FILL_CHAR
 Default fill value for this type.
 
#define PIO_FILL_SHORT   NC_FILL_SHORT
 Default fill value for this type.
 
#define PIO_FILL_INT   NC_FILL_INT
 Default fill value for this type.
 
#define PIO_FILL_FLOAT   NC_FILL_FLOAT
 Default fill value for this type.
 
#define PIO_FILL_DOUBLE   NC_FILL_DOUBLE
 Default fill value for this type.
 
#define PIO_FILL_UBYTE   NC_FILL_UBYTE
 Default fill value for this type.
 
#define PIO_FILL_USHORT   NC_FILL_USHORT
 Default fill value for this type.
 
#define PIO_FILL_UINT   NC_FILL_UINT
 Default fill value for this type.
 
#define PIO_FILL_INT64   NC_FILL_INT64
 Default fill value for this type.
 
#define PIO_FILL_UINT64   NC_FILL_UINT64
 Default fill value for this type.
 
#define PIO_EINDEP   (-203)
 independent access error.
 
#define PIO_FIRST_ERROR_CODE   (-500)
 The first error code for PIO.
 
#define PIO_EBADIOTYPE   (-500)
 Bad IOTYPE error.
 
#define PIO_EVARDIMMISMATCH   (-501)
 Variable dimensions do not match in a multivar call.
 
#define PIO_EBADREARR   (-502)
 Rearranger error in async mode. More...
 
#define PIO_REQ_NULL   (NC_REQ_NULL-1)
 Request null.
 

Typedefs

typedef struct var_desc_t var_desc_t
 Variable description structure.
 
typedef struct io_region io_region
 IO region structure. More...
 
typedef struct rearr_comm_fc_opt rearr_comm_fc_opt_t
 Rearranger comm flow control options.
 
typedef struct rearr_opt rearr_opt_t
 Rearranger options.
 
typedef struct io_desc_t io_desc_t
 IO descriptor structure. More...
 
typedef struct iosystem_desc_t iosystem_desc_t
 IO system descriptor structure. More...
 
typedef struct wmulti_buffer wmulti_buffer
 The multi buffer holds data from one or more variables. More...
 
typedef struct file_desc_t file_desc_t
 File descriptor structure. More...
 

Enumerations

enum  PIO_REARR_COMM_TYPE { PIO_REARR_COMM_P2P = (0), PIO_REARR_COMM_COLL }
 Rearranger comm type. More...
 
enum  PIO_REARR_COMM_FC_DIR { PIO_REARR_COMM_FC_2D_ENABLE = (0), PIO_REARR_COMM_FC_1D_COMP2IO, PIO_REARR_COMM_FC_1D_IO2COMP, PIO_REARR_COMM_FC_2D_DISABLE }
 Rearranger comm flow control direction. More...
 
enum  PIO_IOTYPE { PIO_IOTYPE_PNETCDF = 1, PIO_IOTYPE_NETCDF = 2, PIO_IOTYPE_NETCDF4C = 3, PIO_IOTYPE_NETCDF4P = 4 }
 These are the supported methods of reading/writing netCDF files. More...
 
enum  PIO_REARRANGERS { PIO_REARR_BOX = 1, PIO_REARR_SUBSET = 2 }
 These are the supported output data rearrangement methods. More...
 
enum  PIO_ERROR_HANDLERS { PIO_INTERNAL_ERROR = (-51), PIO_BCAST_ERROR = (-52), PIO_RETURN_ERROR = (-53) }
 These are the supported error handlers. More...
 

Functions

int PIOc_strerror (int pioerr, char *errstr)
 Return a string description of an error code. More...
 
int PIOc_set_log_level (int level)
 Set the logging level if PIO was built with PIO_ENABLE_LOGGING. More...
 
int PIOc_set_global_log_level (int iosysid, int level)
 Set the logging level value from the root compute task on all tasks if PIO was built with PIO_ENABLE_LOGGING. More...
 
int PIOc_InitDecomp (int iosysid, int pio_type, int ndims, const int *gdimlen, int maplen, const PIO_Offset *compmap, int *ioidp, const int *rearr, const PIO_Offset *iostart, const PIO_Offset *iocount)
 Initialize the decomposition used with distributed arrays. More...
 
int PIOc_InitDecomp_bc (int iosysid, int basetype, 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...
 
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_freedecomp (int iosysid, int ioid)
 Free a decomposition map. More...
 
int PIOc_readmap (const char *file, int *ndims, int **gdims, PIO_Offset *fmaplen, PIO_Offset **map, MPI_Comm comm)
 Read a decomposition map from a file. More...
 
int PIOc_readmap_from_f90 (const char *file, int *ndims, int **gdims, PIO_Offset *maplen, PIO_Offset **map, int f90_comm)
 Read a decomposition map from file. More...
 
int PIOc_writemap (const char *file, int ndims, const int *gdims, PIO_Offset maplen, PIO_Offset *map, MPI_Comm comm)
 Write the decomposition map to a file. More...
 
int PIOc_writemap_from_f90 (const char *file, int ndims, const int *gdims, PIO_Offset maplen, const PIO_Offset *map, int f90_comm)
 Write the decomposition map to a file for F90. More...
 
int PIOc_write_decomp (const char *file, int iosysid, int ioid, MPI_Comm comm)
 Write the decomposition map to a file. More...
 
int PIOc_write_nc_decomp (int iosysid, const char *filename, int cmode, int ioid, char *title, char *history, int fortran_order)
 Write the decomposition map to a file using netCDF, everyones favorite data format. More...
 
int PIOc_read_nc_decomp (int iosysid, const char *filename, int *ioid, MPI_Comm comm, int pio_type, char *title, char *history, int *fortran_order)
 Read the decomposition map from a netCDF decomp file produced by PIOc_write_nc_decomp(). More...
 
int PIOc_init_async (MPI_Comm world, int num_io_procs, int *io_proc_list, int component_count, int *num_procs_per_comp, int **proc_list, MPI_Comm *io_comm, MPI_Comm *comp_comm, int rearranger, int *iosysidp)
 Library initialization used when IO tasks are distinct from compute tasks. More...
 
int PIOc_init_async_from_comms (MPI_Comm world, int component_count, MPI_Comm *comp_comm, MPI_Comm io_comm, int rearranger, int *iosysidp)
 Library initialization used when IO tasks are distinct from compute tasks. More...
 
int PIOc_get_numiotasks (int iosysid, int *numiotasks)
 Get the number of IO tasks set. More...
 
int PIOc_Init_Intracomm (MPI_Comm comp_comm, int num_iotasks, int stride, int base, int rearr, int *iosysidp)
 Library initialization used when IO tasks are a subset of compute tasks. More...
 
int PIOc_finalize (int iosysid)
 Shut down an iosystem and free all associated resources. More...
 
int PIOc_free_iosystem (int iosysid)
 Clean up internal data structures, and free MPI resources, associated with an IOSystem. More...
 
int PIOc_Set_IOSystem_Error_Handling (int iosysid, int method)
 Set the error handling method used for subsequent calls. More...
 
int PIOc_set_iosystem_error_handling (int iosysid, int method, int *old_method)
 Set the error handling method used for subsequent calls for this IO system. More...
 
int PIOc_iam_iotask (int iosysid, bool *ioproc)
 Return a logical indicating whether this task is an IO task. More...
 
int PIOc_iotask_rank (int iosysid, int *iorank)
 Return the rank of this task in the IO communicator or -1 if this task is not in the communicator. More...
 
int PIOc_iosystem_is_active (int iosysid, bool *active)
 Check to see if PIO has been initialized. More...
 
int PIOc_iotype_available (int iotype)
 Return true if this iotype is supported in the build, 0 otherwise. More...
 
int PIOc_set_rearr_opts (int iosysid, int comm_type, int fcd, bool enable_hs_c2i, bool enable_isend_c2i, int max_pend_req_c2i, bool enable_hs_i2c, bool enable_isend_i2c, int max_pend_req_i2c)
 Set the rearranger options associated with an iosystem. More...
 
int PIOc_advanceframe (int ncid, int varid)
 Increment the unlimited dimension of the given variable. More...
 
int PIOc_setframe (int ncid, int varid, int frame)
 Set the unlimited dimension of the given variable. More...
 
int PIOc_write_darray (int ncid, int varid, int ioid, PIO_Offset arraylen, void *array, void *fillvalue)
 Write a distributed array to the output file. More...
 
int PIOc_write_darray_multi (int ncid, const int *varids, int ioid, int nvars, PIO_Offset arraylen, void *array, const int *frame, void **fillvalue, bool flushtodisk)
 Write one or more arrays with the same IO decomposition to the file. More...
 
int PIOc_read_darray (int ncid, int varid, int ioid, PIO_Offset arraylen, void *array)
 Read a field from a file to the IO library using distributed arrays. More...
 
int PIOc_get_local_array_size (int ioid)
 Get the local size of the variable. More...
 
int PIOc_redef (int ncid)
 The PIO-C interface for the NetCDF function nc_redef. More...
 
int PIOc_enddef (int ncid)
 The PIO-C interface for the NetCDF function nc_enddef. More...
 
int PIOc_sync (int ncid)
 PIO interface to nc_sync This routine is called collectively by all tasks in the communicator ios.union_comm. More...
 
int PIOc_deletefile (int iosysid, const char *filename)
 Delete a file. More...
 
int PIOc_createfile (int iosysid, int *ncidp, int *iotype, const char *fname, int mode)
 Create a new file using pio. More...
 
int PIOc_create (int iosysid, const char *path, int cmode, int *ncidp)
 Open a new file using pio. More...
 
int PIOc_openfile (int iosysid, int *ncidp, int *iotype, const char *fname, int mode)
 Open an existing file using PIO library. More...
 
int PIOc_openfile2 (int iosysid, int *ncidp, int *iotype, const char *fname, int mode)
 Open an existing file using PIO library. More...
 
int PIOc_open (int iosysid, const char *path, int mode, int *ncidp)
 Open an existing file using PIO library. More...
 
int PIOc_closefile (int ncid)
 Close a file previously opened with PIO. More...
 
int PIOc_inq_format (int ncid, int *formatp)
 Learn the netCDF format of an open file. More...
 
int PIOc_inq (int ncid, int *ndimsp, int *nvarsp, int *ngattsp, int *unlimdimidp)
 The PIO-C interface for the NetCDF function nc_inq. More...
 
int PIOc_inq_ndims (int ncid, int *ndimsp)
 Find out how many dimensions are defined in the file. More...
 
int PIOc_inq_nvars (int ncid, int *nvarsp)
 Find out how many variables are defined in a file. More...
 
int PIOc_inq_natts (int ncid, int *ngattsp)
 Find out how many global attributes are defined in a file. More...
 
int PIOc_inq_unlimdim (int ncid, int *unlimdimidp)
 Find out the dimension ids of the unlimited dimension. More...
 
int PIOc_inq_unlimdims (int ncid, int *nunlimdimsp, int *unlimdimidsp)
 Find out the dimension ids of all unlimited dimensions. More...
 
int PIOc_inq_type (int ncid, nc_type xtype, char *name, PIO_Offset *sizep)
 Learn the name and size of a type. More...
 
int PIOc_set_blocksize (int newblocksize)
 Set the target blocksize for the box rearranger. More...
 
int PIOc_File_is_Open (int ncid)
 Check to see if PIO file is open. More...
 
PIO_Offset PIOc_set_buffer_size_limit (PIO_Offset limit)
 Set the PIO IO node data buffer size limit. More...
 
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. More...
 
int PIOc_set_hint (int iosysid, const char *hint, const char *hintval)
 Send a hint to the MPI-IO library. More...
 
int PIOc_set_chunk_cache (int iosysid, int iotype, PIO_Offset size, PIO_Offset nelems, float preemption)
 Set chunk cache netCDF files to be opened/created. More...
 
int PIOc_get_chunk_cache (int iosysid, int iotype, PIO_Offset *sizep, PIO_Offset *nelemsp, float *preemptionp)
 Get current file chunk cache settings from HDF5. More...
 
int PIOc_inq_dim (int ncid, int dimid, char *name, PIO_Offset *lenp)
 The PIO-C interface for the NetCDF function nc_inq_dim. More...
 
int PIOc_inq_dimid (int ncid, const char *name, int *idp)
 The PIO-C interface for the NetCDF function nc_inq_dimid. More...
 
int PIOc_inq_dimname (int ncid, int dimid, char *name)
 Find the name of a dimension. More...
 
int PIOc_inq_dimlen (int ncid, int dimid, PIO_Offset *lenp)
 Find the length of a dimension. More...
 
int PIOc_rename_dim (int ncid, int dimid, const char *name)
 The PIO-C interface for the NetCDF function nc_rename_dim. More...
 
int PIOc_def_dim (int ncid, const char *name, PIO_Offset len, int *idp)
 The PIO-C interface for the NetCDF function nc_def_dim. More...
 
int PIOc_inq_varid (int ncid, const char *name, int *varidp)
 The PIO-C interface for the NetCDF function nc_inq_varid. More...
 
int PIOc_inq_var (int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp)
 The PIO-C interface for the NetCDF function nc_inq_var. More...
 
int PIOc_inq_varname (int ncid, int varid, char *name)
 Get the name of a variable. More...
 
int PIOc_inq_vartype (int ncid, int varid, nc_type *xtypep)
 Find the type of a variable. More...
 
int PIOc_inq_varndims (int ncid, int varid, int *ndimsp)
 Find the number of dimensions of a variable. More...
 
int PIOc_inq_vardimid (int ncid, int varid, int *dimidsp)
 Find the dimension IDs associated with a variable. More...
 
int PIOc_inq_varnatts (int ncid, int varid, int *nattsp)
 Find the number of attributes associated with a variable. More...
 
int PIOc_def_var (int ncid, const char *name, nc_type xtype, int ndims, const int *dimidsp, int *varidp)
 The PIO-C interface for the NetCDF function nc_def_var. More...
 
int PIOc_set_fill (int ncid, int fillmode, int *old_modep)
 The PIO-C interface for the NetCDF function nc_set_fill. More...
 
int PIOc_def_var_fill (int ncid, int varid, int no_fill, const void *fill_value)
 Set the fill value for a variable. More...
 
int PIOc_inq_var_fill (int ncid, int varid, int *no_fill, void *fill_valuep)
 The PIO-C interface for the NetCDF function nc_inq_var_fill. More...
 
int PIOc_rename_var (int ncid, int varid, const char *name)
 The PIO-C interface for the NetCDF function nc_rename_var. More...
 
int PIOc_def_var_deflate (int ncid, int varid, int shuffle, int deflate, int deflate_level)
 Set deflate (zlib) settings for a variable. More...
 
int PIOc_inq_var_deflate (int ncid, int varid, int *shufflep, int *deflatep, int *deflate_levelp)
 This function only applies to netCDF-4 files. More...
 
int PIOc_def_var_chunking (int ncid, int varid, int storage, const PIO_Offset *chunksizesp)
 Set chunksizes for a variable. More...
 
int PIOc_inq_var_chunking (int ncid, int varid, int *storagep, PIO_Offset *chunksizesp)
 Inquire about chunksizes for a variable. More...
 
int PIOc_def_var_endian (int ncid, int varid, int endian)
 Set chunksizes for a variable. More...
 
int PIOc_inq_var_endian (int ncid, int varid, int *endianp)
 Inquire about chunksizes for a variable. More...
 
int PIOc_set_var_chunk_cache (int ncid, int varid, PIO_Offset size, PIO_Offset nelems, float preemption)
 Set chunksizes for a variable. More...
 
int PIOc_get_var_chunk_cache (int ncid, int varid, PIO_Offset *sizep, PIO_Offset *nelemsp, float *preemptionp)
 Get the variable chunk cache settings. More...
 
int PIOc_rename_att (int ncid, int varid, const char *name, const char *newname)
 The PIO-C interface for the NetCDF function nc_rename_att. More...
 
int PIOc_del_att (int ncid, int varid, const char *name)
 The PIO-C interface for the NetCDF function nc_del_att. More...
 
int PIOc_inq_att (int ncid, int varid, const char *name, nc_type *xtypep, PIO_Offset *lenp)
 The PIO-C interface for the NetCDF function nc_inq_att. More...
 
int PIOc_inq_attid (int ncid, int varid, const char *name, int *idp)
 The PIO-C interface for the NetCDF function nc_inq_attid. More...
 
int PIOc_inq_attlen (int ncid, int varid, const char *name, PIO_Offset *lenp)
 Get the length of an attribute. More...
 
int PIOc_inq_atttype (int ncid, int varid, const char *name, nc_type *xtypep)
 Get the type of an attribute. More...
 
int PIOc_inq_attname (int ncid, int varid, int attnum, char *name)
 The PIO-C interface for the NetCDF function nc_inq_attname. More...
 
int PIOc_put_att (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const void *op)
 Write a netCDF attribute of any type. More...
 
int PIOc_put_att_text (int ncid, int varid, const char *name, PIO_Offset len, const char *op)
 Write a netCDF text attribute. More...
 
int PIOc_put_att_schar (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const signed char *op)
 Write a netCDF attribute array of 8-bit signed chars. More...
 
int PIOc_put_att_short (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const short *op)
 Write a netCDF attribute array of 16-bit integers. More...
 
int PIOc_put_att_int (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const int *op)
 Write a netCDF attribute array of 32-bit signed integers. More...
 
int PIOc_put_att_long (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const long *op)
 Write a netCDF attribute array of 32-bit signed integers. More...
 
int PIOc_put_att_float (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const float *op)
 Write a netCDF attribute array of 32-bit floating points. More...
 
int PIOc_put_att_double (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const double *op)
 Write a netCDF attribute array of 64-bit floating points. More...
 
int PIOc_put_att_uchar (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned char *op)
 Write a netCDF attribute array of 8-bit unsigned chars. More...
 
int PIOc_put_att_ushort (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned short *op)
 Write a netCDF attribute array of 16-bit unsigned integers. More...
 
int PIOc_put_att_uint (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned int *op)
 Write a netCDF attribute array of 32-bit unsigned integers. More...
 
int PIOc_put_att_longlong (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const long long *op)
 Write a netCDF attribute array of 64-bit signed integers. More...
 
int PIOc_put_att_ulonglong (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned long long *op)
 Write a netCDF attribute array of 64-bit unsigned integers. More...
 
int PIOc_get_att (int ncid, int varid, const char *name, void *ip)
 Get the value of an attribute of any type, with no type conversion. More...
 
int PIOc_get_att_text (int ncid, int varid, const char *name, char *ip)
 Get the value of an text attribute. More...
 
int PIOc_get_att_schar (int ncid, int varid, const char *name, signed char *ip)
 Get the value of an 8-bit signed char array attribute. More...
 
int PIOc_get_att_short (int ncid, int varid, const char *name, short *ip)
 Get the value of an 16-bit integer array attribute. More...
 
int PIOc_get_att_int (int ncid, int varid, const char *name, int *ip)
 Get the value of an 32-bit integer array attribute. More...
 
int PIOc_get_att_long (int ncid, int varid, const char *name, long *ip)
 Get the value of an 32-bit ingeger array attribute. More...
 
int PIOc_get_att_float (int ncid, int varid, const char *name, float *ip)
 Get the value of an 32-bit floating point array attribute. More...
 
int PIOc_get_att_double (int ncid, int varid, const char *name, double *ip)
 Get the value of an 64-bit floating point array attribute. More...
 
int PIOc_get_att_uchar (int ncid, int varid, const char *name, unsigned char *ip)
 Get the value of an 8-bit unsigned char array attribute. More...
 
int PIOc_get_att_ushort (int ncid, int varid, const char *name, unsigned short *ip)
 Get the value of an 16-bit unsigned integer array attribute. More...
 
int PIOc_get_att_uint (int ncid, int varid, const char *name, unsigned int *ip)
 Get the value of an 32-bit unsigned integer array attribute. More...
 
int PIOc_get_att_longlong (int ncid, int varid, const char *name, long long *ip)
 Get the value of an 64-bit integer array attribute. More...
 
int PIOc_get_att_ulonglong (int ncid, int varid, const char *name, unsigned long long *ip)
 Get the value of an 64-bit unsigned integer array attribute. More...
 
int PIOc_get_var (int ncid, int varid, void *buf)
 Get all data from a variable the same type as the variable in the file. More...
 
int PIOc_get_var_text (int ncid, int varid, char *buf)
 Get all data of a text variable. More...
 
int PIOc_get_var_schar (int ncid, int varid, signed char *buf)
 Get all data of a signed char variable. More...
 
int PIOc_get_var_short (int ncid, int varid, short *buf)
 Get all data of a 16-bit integer variable. More...
 
int PIOc_get_var_int (int ncid, int varid, int *buf)
 Get all data of an integer variable. More...
 
int PIOc_get_var_long (int ncid, int varid, long *buf)
 Get all data of a 64-bit integer variable. More...
 
int PIOc_get_var_float (int ncid, int varid, float *buf)
 Get all data of a floating point variable. More...
 
int PIOc_get_var_double (int ncid, int varid, double *buf)
 Get all data of a 64-bit floating point variable. More...
 
int PIOc_get_var_uchar (int ncid, int varid, unsigned char *buf)
 Get all data of an unsigned char variable. More...
 
int PIOc_get_var_ushort (int ncid, int varid, unsigned short *buf)
 Get all data of an unsigned 16-bit integer variable. More...
 
int PIOc_get_var_uint (int ncid, int varid, unsigned int *buf)
 Get all data of an unsigned integer variable. More...
 
int PIOc_get_var_longlong (int ncid, int varid, long long *buf)
 Get all data of a 64-bit integer variable. More...
 
int PIOc_get_var_ulonglong (int ncid, int varid, unsigned long long *buf)
 Get all data of an unsigned 64-bit integer variable. More...
 
int PIOc_put_var (int ncid, int varid, const void *buf)
 Put all data to a variable of any type. More...
 
int PIOc_put_var_text (int ncid, int varid, const char *op)
 Put all data to a text variable. More...
 
int PIOc_put_var_schar (int ncid, int varid, const signed char *op)
 Put all data to a signed char variable. More...
 
int PIOc_put_var_short (int ncid, int varid, const short *op)
 Put all data to a 16-bit integer variable. More...
 
int PIOc_put_var_int (int ncid, int varid, const int *op)
 Put all data to an integer variable. More...
 
int PIOc_put_var_long (int ncid, int varid, const long *op)
 Put all data to an integer variable. More...
 
int PIOc_put_var_float (int ncid, int varid, const float *op)
 Put all data to a floating point variable. More...
 
int PIOc_put_var_double (int ncid, int varid, const double *op)
 Put all data to a 64-bit floating point variable. More...
 
int PIOc_put_var_uchar (int ncid, int varid, const unsigned char *op)
 Put all data to an unsigned char variable. More...
 
int PIOc_put_var_ushort (int ncid, int varid, const unsigned short *op)
 Put all data to a 16-bit unsigned integer variable. More...
 
int PIOc_put_var_uint (int ncid, int varid, const unsigned int *op)
 Put all data to an unsigned integer variable. More...
 
int PIOc_put_var_longlong (int ncid, int varid, const long long *op)
 Put all data to a 64-bit integer variable. More...
 
int PIOc_put_var_ulonglong (int ncid, int varid, const unsigned long long *op)
 Put all data to an unsigned 64-bit integer variable. More...
 
int PIOc_get_var1 (int ncid, int varid, const PIO_Offset *index, void *buf)
 Get one value from a variable the same type as the variable in the file. More...
 
int PIOc_get_var1_text (int ncid, int varid, const PIO_Offset *index, char *buf)
 Get one value of a text variable. More...
 
int PIOc_get_var1_schar (int ncid, int varid, const PIO_Offset *index, signed char *buf)
 Get one value of a signed char variable. More...
 
int PIOc_get_var1_short (int ncid, int varid, const PIO_Offset *index, short *buf)
 Get one value of a 16-bit integer variable. More...
 
int PIOc_get_var1_int (int ncid, int varid, const PIO_Offset *index, int *buf)
 Get one value of an integer variable. More...
 
int PIOc_get_var1_long (int ncid, int varid, const PIO_Offset *index, long *buf)
 Get one value of a 64-bit integer variable. More...
 
int PIOc_get_var1_float (int ncid, int varid, const PIO_Offset *index, float *buf)
 Get one value of a floating point variable. More...
 
int PIOc_get_var1_double (int ncid, int varid, const PIO_Offset *index, double *buf)
 Get one value of a 64-bit floating point variable. More...
 
int PIOc_get_var1_uchar (int ncid, int varid, const PIO_Offset *index, unsigned char *buf)
 Get one value of an unsinged char variable. More...
 
int PIOc_get_var1_ushort (int ncid, int varid, const PIO_Offset *index, unsigned short *buf)
 Get one value of an unsigned 16-bit integer variable. More...
 
int PIOc_get_var1_uint (int ncid, int varid, const PIO_Offset *index, unsigned int *buf)
 Get one value of an unsigned integer variable. More...
 
int PIOc_get_var1_longlong (int ncid, int varid, const PIO_Offset *index, long long *buf)
 Get one value of a 64-bit integer variable. More...
 
int PIOc_get_var1_ulonglong (int ncid, int varid, const PIO_Offset *index, unsigned long long *buf)
 Get one value of an unsigned 64-bit integer variable. More...
 
int PIOc_put_var1 (int ncid, int varid, const PIO_Offset *index, const void *buf)
 Put one value from a variable of any type. More...
 
int PIOc_put_var1_text (int ncid, int varid, const PIO_Offset *index, const char *op)
 Put one value from an text variable. More...
 
int PIOc_put_var1_schar (int ncid, int varid, const PIO_Offset *index, const signed char *op)
 Put one value from an signed char variable. More...
 
int PIOc_put_var1_short (int ncid, int varid, const PIO_Offset *index, const short *op)
 Put one value from a 16-bit integer variable. More...
 
int PIOc_put_var1_int (int ncid, int varid, const PIO_Offset *index, const int *op)
 Put one value from an integer variable. More...
 
int PIOc_put_var1_long (int ncid, int varid, const PIO_Offset *index, const long *ip)
 Put one value from an integer variable. More...
 
int PIOc_put_var1_float (int ncid, int varid, const PIO_Offset *index, const float *op)
 Put one value from an floating point variable. More...
 
int PIOc_put_var1_double (int ncid, int varid, const PIO_Offset *index, const double *op)
 Put one value from an 64-bit floating point variable. More...
 
int PIOc_put_var1_uchar (int ncid, int varid, const PIO_Offset *index, const unsigned char *op)
 Put one value from an text variable. More...
 
int PIOc_put_var1_ushort (int ncid, int varid, const PIO_Offset *index, const unsigned short *op)
 Put one value from an unsigned 16-bit integer variable. More...
 
int PIOc_put_var1_uint (int ncid, int varid, const PIO_Offset *index, const unsigned int *op)
 Put one value from an unsigned integer variable. More...
 
int PIOc_put_var1_longlong (int ncid, int varid, const PIO_Offset *index, const long long *op)
 Put one value from a 64-bit integer variable. More...
 
int PIOc_put_var1_ulonglong (int ncid, int varid, const PIO_Offset *index, const unsigned long long *op)
 Put one value from an unsigned 64-bit integer variable. More...
 
int PIOc_get_vara (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, void *buf)
 Get a muti-dimensional subset of a variable the same type as the variable in the file. More...
 
int PIOc_get_vara_text (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, char *buf)
 Get a muti-dimensional subset of a text variable. More...
 
int PIOc_get_vara_schar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, signed char *buf)
 Get a muti-dimensional subset of a signed char variable. More...
 
int PIOc_get_vara_short (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, short *buf)
 Get a muti-dimensional subset of a 16-bit integer variable. More...
 
int PIOc_get_vara_int (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, int *buf)
 Get a muti-dimensional subset of an integer variable. More...
 
int PIOc_get_vara_float (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, float *buf)
 Get a muti-dimensional subset of a floating point variable. More...
 
int PIOc_get_vara_long (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, long *buf)
 Get a muti-dimensional subset of a 64-bit integer variable. More...
 
int PIOc_get_vara_double (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, double *buf)
 Get a muti-dimensional subset of a 64-bit floating point variable. More...
 
int PIOc_get_vara_uchar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, unsigned char *buf)
 Get a muti-dimensional subset of an unsigned char variable. More...
 
int PIOc_get_vara_ushort (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, unsigned short *buf)
 Get a muti-dimensional subset of an unsigned 16-bit integer variable. More...
 
int PIOc_get_vara_uint (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, unsigned int *buf)
 Get a muti-dimensional subset of an unsigned integer variable. More...
 
int PIOc_get_vara_longlong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, long long *buf)
 Get a muti-dimensional subset of a 64-bit integer variable. More...
 
int PIOc_get_vara_ulonglong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, unsigned long long *buf)
 Get a muti-dimensional subset of an unsigned 64-bit integer variable. More...
 
int PIOc_put_vara (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const void *buf)
 Put muti-dimensional subset of a variable of any type. More...
 
int PIOc_put_vara_text (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const char *op)
 Put muti-dimensional subset of a text variable. More...
 
int PIOc_put_vara_schar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const signed char *op)
 Put muti-dimensional subset of a signed char variable. More...
 
int PIOc_put_vara_short (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const short *op)
 Put muti-dimensional subset of a 16-bit integer variable. More...
 
int PIOc_put_vara_int (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const int *op)
 Put muti-dimensional subset of an integer variable. More...
 
int PIOc_put_vara_long (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const long *op)
 Put muti-dimensional subset of an integer variable. More...
 
int PIOc_put_vara_float (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const float *op)
 Put muti-dimensional subset of a floating point variable. More...
 
int PIOc_put_vara_double (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const double *op)
 Put muti-dimensional subset of a 64-bit integer variable. More...
 
int PIOc_put_vara_uchar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const unsigned char *op)
 Put muti-dimensional subset of an unsigned char variable. More...
 
int PIOc_put_vara_ushort (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const unsigned short *op)
 Put muti-dimensional subset of an unsigned 16-bit integer variable. More...
 
int PIOc_put_vara_uint (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const unsigned int *op)
 Put muti-dimensional subset of an unsigned integer variable. More...
 
int PIOc_put_vara_longlong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const long long *op)
 Put muti-dimensional subset of a 64-bit integer variable. More...
 
int PIOc_put_vara_ulonglong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const unsigned long long *op)
 Put muti-dimensional subset of an unsigned 64-bit integer variable. More...
 
int PIOc_get_vars (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, void *buf)
 Get strided, muti-dimensional subset of a variable of the same type as the variable in the file. More...
 
int PIOc_get_vars_text (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, char *buf)
 Get strided, muti-dimensional subset of a text variable. More...
 
int PIOc_get_vars_schar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, signed char *buf)
 Get strided, muti-dimensional subset of a signed char variable. More...
 
int PIOc_get_vars_short (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, short *buf)
 Get strided, muti-dimensional subset of a 16-bit integer variable. More...
 
int PIOc_get_vars_int (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, int *buf)
 Get strided, muti-dimensional subset of an integer variable. More...
 
int PIOc_get_vars_long (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, long *buf)
 Get strided, muti-dimensional subset of a 64-bit int variable. More...
 
int PIOc_get_vars_float (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, float *buf)
 Get strided, muti-dimensional subset of a floating point variable. More...
 
int PIOc_get_vars_double (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, double *buf)
 Get strided, muti-dimensional subset of a 64-bit floating point variable. More...
 
int PIOc_get_vars_uchar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, unsigned char *buf)
 Get strided, muti-dimensional subset of an unsigned char variable. More...
 
int PIOc_get_vars_ushort (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, unsigned short *buf)
 Get strided, muti-dimensional subset of an unsigned 16-bit integer variable. More...
 
int PIOc_get_vars_uint (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, unsigned int *buf)
 Get strided, muti-dimensional subset of an unsigned integer variable. More...
 
int PIOc_get_vars_longlong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, long long *buf)
 Get strided, muti-dimensional subset of a 64-bit int variable. More...
 
int PIOc_get_vars_ulonglong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, unsigned long long *buf)
 Get strided, muti-dimensional subset of an unsigned 64-bit int variable. More...
 
int PIOc_put_vars (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const void *buf)
 Write strided, muti-dimensional subset of a variable of any type. More...
 
int PIOc_put_vars_text (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const char *op)
 Put strided, muti-dimensional subset of a text variable. More...
 
int PIOc_put_vars_schar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const signed char *op)
 Put strided, muti-dimensional subset of a signed char variable. More...
 
int PIOc_put_vars_short (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const short *op)
 Put strided, muti-dimensional subset of a 16-bit integer variable. More...
 
int PIOc_put_vars_int (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const int *op)
 Put strided, muti-dimensional subset of an integer variable. More...
 
int PIOc_put_vars_float (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const float *op)
 Put strided, muti-dimensional subset of a floating point variable. More...
 
int PIOc_put_vars_double (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const double *op)
 Put strided, muti-dimensional subset of a 64-bit floating point variable. More...
 
int PIOc_put_vars_long (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const long *op)
 Put strided, muti-dimensional subset of a 64-bit integer variable. More...
 
int PIOc_put_vars_uchar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const unsigned char *op)
 Put strided, muti-dimensional subset of an unsigned char variable. More...
 
int PIOc_put_vars_ushort (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const unsigned short *op)
 Put strided, muti-dimensional subset of an unsigned 16-bit integer variable. More...
 
int PIOc_put_vars_uint (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const unsigned int *op)
 Put strided, muti-dimensional subset of an unsigned integer variable. More...
 
int PIOc_put_vars_longlong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const long long *op)
 Put strided, muti-dimensional subset of a 64-bit unsigned integer variable. More...
 
int PIOc_put_vars_ulonglong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, const unsigned long long *op)
 Put strided, muti-dimensional subset of an unsigned 64-bit integer variable. More...
 
int PIOc_get_vard (int ncid, int varid, int decompid, const PIO_Offset recnum, void *buf)
 Get a muti-dimensional subset of a variable the same type as the variable in the file. More...
 
int PIOc_get_vard_text (int ncid, int varid, int decompid, const PIO_Offset recnum, char *buf)
 Get a muti-dimensional subset of a text variable. More...
 
int PIOc_get_vard_schar (int ncid, int varid, int decompid, const PIO_Offset recnum, signed char *buf)
 Get a muti-dimensional subset of a signed char variable. More...
 
int PIOc_get_vard_short (int ncid, int varid, int decompid, const PIO_Offset recnum, short *buf)
 Get a muti-dimensional subset of a 16-bit integer variable. More...
 
int PIOc_get_vard_int (int ncid, int varid, int decompid, const PIO_Offset recnum, int *buf)
 Get a muti-dimensional subset of an integer variable. More...
 
int PIOc_get_vard_float (int ncid, int varid, int decompid, const PIO_Offset recnum, float *buf)
 Get a muti-dimensional subset of a floating point variable. More...
 
int PIOc_get_vard_double (int ncid, int varid, int decompid, const PIO_Offset recnum, double *buf)
 Get a muti-dimensional subset of a 64-bit floating point variable. More...
 
int PIOc_get_vard_uchar (int ncid, int varid, int decompid, const PIO_Offset recnum, unsigned char *buf)
 Get a muti-dimensional subset of an unsigned char variable. More...
 
int PIOc_get_vard_ushort (int ncid, int varid, int decompid, const PIO_Offset recnum, unsigned short *buf)
 Get a muti-dimensional subset of an unsigned 16-bit integer variable. More...
 
int PIOc_get_vard_uint (int ncid, int varid, int decompid, const PIO_Offset recnum, unsigned int *buf)
 Get a muti-dimensional subset of an unsigned integer variable. More...
 
int PIOc_get_vard_longlong (int ncid, int varid, int decompid, const PIO_Offset recnum, long long *buf)
 Get a muti-dimensional subset of a 64-bit integer variable. More...
 
int PIOc_get_vard_ulonglong (int ncid, int varid, int decompid, const PIO_Offset recnum, unsigned long long *buf)
 Get a muti-dimensional subset of an unsigned 64-bit integer variable. More...
 
int PIOc_put_vard (int ncid, int varid, int decompid, const PIO_Offset recnum, const void *buf)
 Write distributed array subset of a variable of any type. More...
 
int PIOc_put_vard_text (int ncid, int varid, int decompid, const PIO_Offset recnum, const char *op)
 Put distributed array subset of a text variable. More...
 
int PIOc_put_vard_schar (int ncid, int varid, int decompid, const PIO_Offset recnum, const signed char *op)
 Put distributed array subset of a signed char variable. More...
 
int PIOc_put_vard_short (int ncid, int varid, int decompid, const PIO_Offset recnum, const short *op)
 Put distributed array subset of a 16-bit integer variable. More...
 
int PIOc_put_vard_int (int ncid, int varid, int decompid, const PIO_Offset recnum, const int *op)
 Put distributed array subset of an integer variable. More...
 
int PIOc_put_vard_float (int ncid, int varid, int decompid, const PIO_Offset recnum, const float *op)
 Put distributed array subset of a floating point variable. More...
 
int PIOc_put_vard_double (int ncid, int varid, int decompid, const PIO_Offset recnum, const double *op)
 Put distributed array subset of a 64-bit floating point variable. More...
 
int PIOc_put_vard_uchar (int ncid, int varid, int decompid, const PIO_Offset recnum, const unsigned char *op)
 Put distributed array subset of an unsigned char variable. More...
 
int PIOc_put_vard_ushort (int ncid, int varid, int decompid, const PIO_Offset recnum, const unsigned short *op)
 Put distributed array subset of an unsigned 16-bit integer variable. More...
 
int PIOc_put_vard_uint (int ncid, int varid, int decompid, const PIO_Offset recnum, const unsigned int *op)
 Put distributed array subset of an unsigned integer variable. More...
 
int PIOc_put_vard_longlong (int ncid, int varid, int decompid, const PIO_Offset recnum, const long long *op)
 Put distributed array subset of a 64-bit unsigned integer variable. More...
 
int PIOc_put_vard_ulonglong (int ncid, int varid, int decompid, const PIO_Offset recnum, const unsigned long long *op)
 Put distributed array subset of an unsigned 64-bit integer variable. More...
 
int nc_def_iosystem (MPI_Comm comp_comm, int num_iotasks, int stride, int base, int rearr, int *iosysidp)
 Same as PIOc_Init_Intracomm(). More...
 
int nc_def_async (MPI_Comm world, int num_io_procs, int *io_proc_list, int component_count, int *num_procs_per_comp, int **proc_list, MPI_Comm *io_comm, MPI_Comm *comp_comm, int rearranger, int *iosysidp)
 Same as PIOc_init_async(). More...
 
int nc_set_iosystem (int iosysid)
 Set the default iosystemID. More...
 
int nc_get_iosystem (int *iosysid)
 Get the default iosystemID. More...
 
int nc_free_iosystem (int iosysid)
 Same as PIOc_free_iosystem(). More...
 
int nc_def_decomp (int iosysid, int pio_type, int ndims, const int *gdimlen, int maplen, const size_t *compmap, int *ioidp, int rearranger, const size_t *iostart, const size_t *iocount)
 Same as PIOc_init_decomp(). More...
 
int nc_free_decomp (int ioid)
 Same as PIOc_freedecomp(). More...
 
int nc_get_vard (int ncid, int varid, int decompid, const size_t recnum, void *buf)
 Get a muti-dimensional subset of a variable the same type as the variable in the file. More...
 
int nc_get_vard_text (int ncid, int varid, int decompid, const size_t recnum, char *buf)
 Get a muti-dimensional subset of a text variable. More...
 
int nc_get_vard_schar (int ncid, int varid, int decompid, const size_t recnum, signed char *buf)
 Get a muti-dimensional subset of a signed char variable. More...
 
int nc_get_vard_short (int ncid, int varid, int decompid, const size_t recnum, short *buf)
 Get a muti-dimensional subset of a 16-bit integer variable. More...
 
int nc_get_vard_int (int ncid, int varid, int decompid, const size_t recnum, int *buf)
 Get a muti-dimensional subset of an integer variable. More...
 
int nc_get_vard_float (int ncid, int varid, int decompid, const size_t recnum, float *buf)
 Get a muti-dimensional subset of a floating point variable. More...
 
int nc_get_vard_double (int ncid, int varid, int decompid, const size_t recnum, double *buf)
 Get a muti-dimensional subset of a 64-bit floating point variable. More...
 
int nc_get_vard_uchar (int ncid, int varid, int decompid, const size_t recnum, unsigned char *buf)
 Get a muti-dimensional subset of an unsigned char variable. More...
 
int nc_get_vard_ushort (int ncid, int varid, int decompid, const size_t recnum, unsigned short *buf)
 Get a muti-dimensional subset of an unsigned 16-bit integer variable. More...
 
int nc_get_vard_uint (int ncid, int varid, int decompid, const size_t recnum, unsigned int *buf)
 Get a muti-dimensional subset of an unsigned integer variable. More...
 
int nc_get_vard_longlong (int ncid, int varid, int decompid, const size_t recnum, long long *buf)
 Get a muti-dimensional subset of a 64-bit integer variable. More...
 
int nc_get_vard_ulonglong (int ncid, int varid, int decompid, const size_t recnum, unsigned long long *buf)
 Get a muti-dimensional subset of an unsigned 64-bit integer variable. More...
 
int nc_put_vard (int ncid, int varid, int decompid, const size_t recnum, const void *buf)
 Write distributed array subset of a variable of any type. More...
 
int nc_put_vard_text (int ncid, int varid, int decompid, const size_t recnum, const char *op)
 Put distributed array subset of a text variable. More...
 
int nc_put_vard_schar (int ncid, int varid, int decompid, const size_t recnum, const signed char *op)
 Put distributed array subset of a signed char variable. More...
 
int nc_put_vard_short (int ncid, int varid, int decompid, const size_t recnum, const short *op)
 Put distributed array subset of a 16-bit integer variable. More...
 
int nc_put_vard_int (int ncid, int varid, int decompid, const size_t recnum, const int *op)
 Put distributed array subset of an integer variable. More...
 
int nc_put_vard_float (int ncid, int varid, int decompid, const size_t recnum, const float *op)
 Put distributed array subset of a floating point variable. More...
 
int nc_put_vard_double (int ncid, int varid, int decompid, const size_t recnum, const double *op)
 Put distributed array subset of a 64-bit floating point variable. More...
 
int nc_put_vard_uchar (int ncid, int varid, int decompid, const size_t recnum, const unsigned char *op)
 Put distributed array subset of an unsigned char variable. More...
 
int nc_put_vard_ushort (int ncid, int varid, int decompid, const size_t recnum, const unsigned short *op)
 Put distributed array subset of an unsigned 16-bit integer variable. More...
 
int nc_put_vard_uint (int ncid, int varid, int decompid, const size_t recnum, const unsigned int *op)
 Put distributed array subset of an unsigned integer variable. More...
 
int nc_put_vard_longlong (int ncid, int varid, int decompid, const size_t recnum, const long long *op)
 Put distributed array subset of a 64-bit unsigned integer variable. More...
 
int nc_put_vard_ulonglong (int ncid, int varid, int decompid, const size_t recnum, const unsigned long long *op)
 Put distributed array subset of an unsigned 64-bit integer variable. More...
 

Detailed Description

Public headers for the PIO C interface.

Author
Jim Edwards, Ed Hartnett
Date
2014
See also
https://github.com/NCAR/ParallelIO

Macro Definition Documentation

◆ DECOMP_VERSION_ATT_NAME

#define DECOMP_VERSION_ATT_NAME   "PIO_library_version"

Used in the decomposition netCDF file.

Holds the version of the decomposition file.

◆ PIO_64BIT_DATA

#define PIO_64BIT_DATA   0x0010

NC_64BIT_DATA This is a problem - need to define directly instead of using include file.

CDF5 foemat.

◆ PIO_64BIT_OFFSET

#define PIO_64BIT_OFFSET   NC_64BIT_OFFSET

Use large (64-bit) file offsets.

Mode flag for nc_create().

◆ PIO_CLOBBER

#define PIO_CLOBBER   NC_CLOBBER

Destroy existing file.

Mode flag for nc_create().

◆ PIO_EBADREARR

#define PIO_EBADREARR   (-502)

Rearranger error in async mode.


◆ PIO_NOCLOBBER

#define PIO_NOCLOBBER   NC_NOCLOBBER

Don't destroy existing file.

Mode flag for nc_create().

◆ PIO_NOERR

#define PIO_NOERR   NC_NOERR

Define the netCDF-based error codes.

No Error

◆ PIO_OFFSET

#define PIO_OFFSET   MPI_OFFSET

PIO_OFFSET is an integer type of size sufficient to represent the size (in bytes) of the largest file supported by MPI.

This is not actually used by the code.

◆ PIO_Offset

#define PIO_Offset   MPI_Offset

PIO_OFFSET is defined as MPI_Offset, which is defined in pio_internal.h as long long.

This is what is used throughout the C code.

Typedef Documentation

◆ file_desc_t

typedef struct file_desc_t file_desc_t

File descriptor structure.

This structure holds information associated with each open file

◆ io_desc_t

typedef struct io_desc_t io_desc_t

IO descriptor structure.

This structure defines the mapping for a given variable between compute and IO decomposition.

◆ io_region

typedef struct io_region io_region

IO region structure.

Each IO region is a unit of data which can be described using start and count arrays. Each IO task may in general have multiple io regions per variable. The box rearranger will have at most one io region per variable.

The write from a particular IO task is divided into 1 or more regions each of which can be described using start and count. The io_region typedef is a linked list of those regions.

◆ iosystem_desc_t

IO system descriptor structure.

This structure contains the general IO subsystem data and MPI structure

◆ wmulti_buffer

typedef struct wmulti_buffer wmulti_buffer

The multi buffer holds data from one or more variables.

Data are accumulated in the multi-buffer.

Enumeration Type Documentation

◆ PIO_ERROR_HANDLERS

These are the supported error handlers.

Enumerator
PIO_INTERNAL_ERROR 

Errors cause abort.

PIO_BCAST_ERROR 

Error codes are broadcast to all tasks.

PIO_RETURN_ERROR 

Errors are returned to caller with no internal action.

◆ PIO_IOTYPE

enum PIO_IOTYPE

These are the supported methods of reading/writing netCDF files.

(Not all methods can be used with all netCDF files.)

Enumerator
PIO_IOTYPE_PNETCDF 

Parallel Netcdf (parallel)

PIO_IOTYPE_NETCDF 

Netcdf3 Classic format (serial)

PIO_IOTYPE_NETCDF4C 

NetCDF4 (HDF5) compressed format (serial)

PIO_IOTYPE_NETCDF4P 

NetCDF4 (HDF5) parallel.

◆ PIO_REARR_COMM_FC_DIR

Rearranger comm flow control direction.

The rearranger option values must match the definitions in the fortran interface.

Enumerator
PIO_REARR_COMM_FC_2D_ENABLE 

Comp procs to io procs and vice versa.

PIO_REARR_COMM_FC_1D_COMP2IO 

Comp procs to io procs only.

PIO_REARR_COMM_FC_1D_IO2COMP 

IO procs to comp procs only.

PIO_REARR_COMM_FC_2D_DISABLE 

Disable flow control.

◆ PIO_REARR_COMM_TYPE

Rearranger comm type.

The rearranger option values must match the definitions in the fortran interface.

Enumerator
PIO_REARR_COMM_P2P 

Point to point.

PIO_REARR_COMM_COLL 

Collective.

◆ PIO_REARRANGERS

These are the supported output data rearrangement methods.

Enumerator
PIO_REARR_BOX 

Box rearranger.

PIO_REARR_SUBSET 

Subset rearranger.

Function Documentation

◆ nc_def_async()

int nc_def_async ( MPI_Comm  world,
int  num_io_procs,
int *  io_proc_list,
int  component_count,
int *  num_procs_per_comp,
int **  proc_list,
MPI_Comm *  io_comm,
MPI_Comm *  comp_comm,
int  rearranger,
int *  iosysidp 
)

Same as PIOc_init_async().

Parameters
worldthe communicator containing all the available tasks.
num_io_procsthe number of processes for the IO component.
io_proc_listan array of lenth num_io_procs with the processor number for each IO processor. If NULL then the IO processes are assigned starting at processes 0.
component_countnumber of computational components
num_procs_per_compan array of int, of length component_count, with the number of processors in each computation component.
proc_listan array of arrays containing the processor numbers for each computation component. If NULL then the computation components are assigned processors sequentially starting with processor num_io_procs.
io_commpointer to an MPI_Comm. If not NULL, it will get an MPI duplicate of the IO communicator. (It is a full duplicate and later must be freed with MPI_Free() by the caller.)
comp_commpointer to an array of pointers to MPI_Comm; the array is of length component_count. If not NULL, it will get an MPI duplicate of each computation communicator. (These are full duplicates and each must later be freed with MPI_Free() by the caller.)
rearrangerthe default rearranger to use for decompositions in this IO system. Only PIO_REARR_BOX is supported for async. Support for PIO_REARR_SUBSET will be provided in a future version.
iosysidppointer to array of length component_count that gets the iosysid for each component.
Returns
PIO_NOERR on success, error code otherwise.
Author
Ed Hartnett

◆ nc_def_decomp()

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

Same as PIOc_init_decomp().

Author
Ed Hartnett

◆ nc_def_iosystem()

int nc_def_iosystem ( MPI_Comm  comp_comm,
int  num_iotasks,
int  stride,
int  base,
int  rearr,
int *  iosysidp 
)

Same as PIOc_Init_Intracomm().

Author
Ed Hartnett

◆ nc_free_decomp()

int nc_free_decomp ( int  ioid)

Same as PIOc_freedecomp().

Author
Ed Hartnett

◆ nc_free_iosystem()

int nc_free_iosystem ( int  iosysid)

Same as PIOc_free_iosystem().

Author
Ed Hartnett

◆ nc_get_iosystem()

int nc_get_iosystem ( int *  iosysid)

Get the default iosystemID.

Parameters
iosysidPointer that gets The IO system ID.
Returns
PIO_NOERR for success.
Author
Ed Hartnett

◆ nc_set_iosystem()

int nc_set_iosystem ( int  iosysid)

Set the default iosystemID.

Parameters
iosysidThe IO system ID to set.
Returns
PIO_NOERR for success.
Author
Ed Hartnett

◆ PIOc_deletefile()

int PIOc_deletefile ( int  iosysid,
const char *  filename 
)

Delete a file.

Parameters
iosysida pio system handle.
filenamea filename.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_File_is_Open()

int PIOc_File_is_Open ( int  ncid)

Check to see if PIO file is open.

Parameters
ncidthe ncid of an open file
Returns
1 if file is open, 0 otherwise.
Author
Jim Edwards

◆ PIOc_finalize()

int PIOc_finalize ( int  iosysid)

Shut down an iosystem and free all associated resources.

Use PIOc_free_iosystem() instead.

◆ PIOc_inq_attid()

int PIOc_inq_attid ( int  ncid,
int  varid,
const char *  name,
int *  idp 
)

The PIO-C interface for the NetCDF function nc_inq_attid.

This routine is called collectively by all tasks in the communicator ios.union_comm. For more information on the underlying NetCDF commmand please read about this function in the NetCDF documentation at: http://www.unidata.ucar.edu/software/netcdf/docs/group__attributes.html

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
namea pointer that will get name of attribute. Ignored if NULL.
idpa pointer that will get the id of the variable or attribute. Ignored if NULL.
Returns
PIO_NOERR for success, error code otherwise. See PIOc_Set_File_Error_Handling
Author
Jim Edwards, Ed Hartnett

◆ PIOc_inq_attlen()

int PIOc_inq_attlen ( int  ncid,
int  varid,
const char *  name,
PIO_Offset lenp 
)

Get the length of an attribute.

Parameters
ncidthe ID of an open file.
varidthe variable ID, or NC_GLOBAL for global attributes.
namethe name of the attribute.
lenpa pointer that gets the lenght of the attribute array. Ignored if NULL.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_inq_attname()

int PIOc_inq_attname ( int  ncid,
int  varid,
int  attnum,
char *  name 
)

The PIO-C interface for the NetCDF function nc_inq_attname.

This routine is called collectively by all tasks in the communicator ios.union_comm. For more information on the underlying NetCDF commmand please read about this function in the NetCDF documentation at: http://www.unidata.ucar.edu/software/netcdf/docs/group__attributes.html

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
varidthe variable ID.
attnumthe attribute ID.
namethe name of the attribute.
Returns
PIO_NOERR for success, error code otherwise. See PIOc_Set_File_Error_Handling
Author
Jim Edwards, Ed Hartnett

◆ PIOc_inq_atttype()

int PIOc_inq_atttype ( int  ncid,
int  varid,
const char *  name,
nc_type *  xtypep 
)

Get the type of an attribute.

Parameters
ncidthe ID of an open file.
varidthe variable ID, or NC_GLOBAL for global attributes.
namethe name of the attribute.
xtypepa pointer that gets the type of the attribute. Ignored if NULL.
Returns
PIO_NOERR for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_inq_unlimdims()

int PIOc_inq_unlimdims ( int  ncid,
int *  nunlimdimsp,
int *  unlimdimidsp 
)

Find out the dimension ids of all unlimited dimensions.

Note that only netCDF-4 files can have more than 1 unlimited dimension.

Parameters
ncidthe ncid of the open file.
nunlimdimspa pointer that gets the number of unlimited dimensions. Ignored if NULL.
unlimdimidspa pointer that will get an array of unlimited dimension IDs.
Returns
0 for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_iotype_available()

int PIOc_iotype_available ( int  iotype)

Return true if this iotype is supported in the build, 0 otherwise.

Parameters
iotypethe io type to check
Returns
1 if iotype is in build, 0 if not.
Author
Jim Edwards

◆ PIOc_read_nc_decomp()

int PIOc_read_nc_decomp ( int  iosysid,
const char *  filename,
int *  ioidp,
MPI_Comm  comm,
int  pio_type,
char *  title,
char *  history,
int *  fortran_order 
)

Read the decomposition map from a netCDF decomp file produced by PIOc_write_nc_decomp().

Parameters
iosysidthe IO system ID.
filenamethe name of the decomp file.
ioidppointer that will get the newly-assigned ID of the IO description. The ioid is needed to later free the decomposition.
comman MPI communicator.
pio_typethe PIO type to be used as the type for the data.
titlepointer that will get optial title attribute for the file. Will be less than PIO_MAX_NAME + 1 if provided. Ignored if NULL.
historypointer that will get optial history attribute for the file. Will be less than PIO_MAX_NAME + 1 if provided. Ignored if NULL.
fortran_orderpointer that gets set to 1 if fortran array ordering is used, or to zero if C array ordering is used.
Returns
0 for success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_readmap()

int PIOc_readmap ( const char *  file,
int *  ndims,
int **  gdims,
PIO_Offset fmaplen,
PIO_Offset **  map,
MPI_Comm  comm 
)

Read a decomposition map from a file.

The decomp file is only read by task 0 in the communicator.

Parameters
filethe filename
ndimspointer to an int with the number of dims.
gdimspointer to an array of dimension ids.
fmaplen
map
comm
Returns
0 for success, error code otherwise.
Author
Jim Edwards

◆ PIOc_readmap_from_f90()

int PIOc_readmap_from_f90 ( const char *  file,
int *  ndims,
int **  gdims,
PIO_Offset maplen,
PIO_Offset **  map,
int  f90_comm 
)

Read a decomposition map from file.

Parameters
filethe filename
ndimspointer to the number of dimensions
gdimspointer to an array of dimension ids
maplenpointer to the length of the map
mappointer to the map array
f90_comm
Returns
0 for success, error code otherwise.
Author
Jim Edwards

◆ PIOc_set_buffer_size_limit()

PIO_Offset PIOc_set_buffer_size_limit ( PIO_Offset  limit)

Set the PIO IO node data buffer size limit.

The pio_buffer_size_limit will only apply to files opened after the setting is changed.

Parameters
limitthe size of the buffer on the IO nodes
Returns
The previous limit setting.
Author
Jim Edwards

◆ PIOc_set_global_log_level()

int PIOc_set_global_log_level ( int  iosysid,
int  level 
)

Set the logging level value from the root compute task on all tasks if PIO was built with PIO_ENABLE_LOGGING.

Set to -1 for nothing, 0 for errors only, 1 for important logging, and so on. Log levels below 1 are only printed on the io/component root.

A log file is also produced for each task. The file is called pio_log_X.txt, where X is the (0-based) task number.

If the library is not built with logging, this function does nothing.

Parameters
iosysidthe IO system ID
levelthe logging level, 0 for errors only, 5 for max verbosity.
Returns
0 on success, error code otherwise.
Author
Jim Edwards

◆ PIOc_set_log_level()

int PIOc_set_log_level ( int  level)

Set the logging level if PIO was built with PIO_ENABLE_LOGGING.

Set to -1 for nothing, 0 for errors only, 1 for important logging, and so on. Log levels below 1 are only printed on the io/component root.

A log file is also produced for each task. The file is called pio_log_X.txt, where X is the (0-based) task number.

If the library is not built with logging, this function does nothing.

Parameters
levelthe logging level, 0 for errors only, 5 for max verbosity.
Returns
0 on success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_set_rearr_opts()

int PIOc_set_rearr_opts ( int  iosysid,
int  comm_type,
int  fcd,
bool  enable_hs_c2i,
bool  enable_isend_c2i,
int  max_pend_req_c2i,
bool  enable_hs_i2c,
bool  enable_isend_i2c,
int  max_pend_req_i2c 
)

Set the rearranger options associated with an iosystem.

Parameters
iosysida defined pio system descriptor.
comm_typeType of communication (pt2pt/coll) used by the rearranger. See PIO_REARR_COMM_TYPE for more detail. Possible values are : PIO_REARR_COMM_P2P (Point to point communication) PIO_REARR_COMM_COLL (Collective communication)
fcdFlow control direction for the rearranger. See PIO_REARR_COMM_FC_DIR for more detail. Possible values are : PIO_REARR_COMM_FC_2D_ENABLE : Enable flow control from compute processes to io processes and vice versa PIO_REARR_COMM_FC_1D_COMP2IO : Enable flow control from compute processes to io processes (only) PIO_REARR_COMM_FC_1D_IO2COMP : Enable flow control from io processes to compute processes (only) PIO_REARR_COMM_FC_2D_DISABLE : Disable flow control from compute processes to io processes and vice versa.
enable_hs_c2iEnable handshake while rearranging data, from compute to io processes
enable_isend_c2iEnable isends while rearranging data, from compute to io processes
max_pend_req_c2iMaximum pending requests during data rearragment from compute processes to io processes
enable_hs_i2cEnable handshake while rearranging data, from io to compute processes
enable_isend_i2cEnable isends while rearranging data, from io to compute processes
max_pend_req_i2cMaximum pending requests during data rearragment from io processes to compute processes
Returns
0 on success, otherwise a PIO error code.
Author
Jayesh Krishna

◆ PIOc_strerror()

int PIOc_strerror ( int  pioerr,
char *  errmsg 
)

Return a string description of an error code.

If zero is passed, the errmsg will be "No error".

Parameters
pioerrthe error code returned by a PIO function call.
errmsgPointer that will get the error message. The message will be PIO_MAX_NAME chars or less.
Returns
0 on success.
Author
Jim Edwards

◆ PIOc_write_decomp()

int PIOc_write_decomp ( const char *  file,
int  iosysid,
int  ioid,
MPI_Comm  comm 
)

Write the decomposition map to a file.

Parameters
filethe filename to be used.
iosysidthe IO system ID.
ioidthe ID of the IO description.
comman MPI communicator.
Returns
0 for success, error code otherwise.
Author
Jim Edwards

◆ PIOc_write_nc_decomp()

int PIOc_write_nc_decomp ( int  iosysid,
const char *  filename,
int  cmode,
int  ioid,
char *  title,
char *  history,
int  fortran_order 
)

Write the decomposition map to a file using netCDF, everyones favorite data format.

Parameters
iosysidthe IO system ID.
filenamethe filename to be used.
cmodefor PIOc_create(). Will be bitwise or'd with NC_WRITE.
ioidthe ID of the IO description.
titleoptial title attribute for the file. Must be less than PIO_MAX_NAME + 1 if provided. Ignored if NULL.
historyoptial history attribute for the file. Must be less than PIO_MAX_NAME + 1 if provided. Ignored if NULL.
fortran_orderset to non-zero if fortran array ordering is used, or to zero if C array ordering is used.
Returns
0 for success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_writemap()

int PIOc_writemap ( const char *  file,
int  ndims,
const int *  gdims,
PIO_Offset  maplen,
PIO_Offset map,
MPI_Comm  comm 
)

Write the decomposition map to a file.

Parameters
filethe filename
ndimsthe number of dimensions
gdimsan array of dimension ids
maplenthe length of the map
mapthe map array
comman MPI communicator.
Returns
0 for success, error code otherwise.
Author
Jim Edwards

◆ PIOc_writemap_from_f90()

int PIOc_writemap_from_f90 ( const char *  file,
int  ndims,
const int *  gdims,
PIO_Offset  maplen,
const PIO_Offset map,
int  f90_comm 
)

Write the decomposition map to a file for F90.

Parameters
filethe filename
ndimsthe number of dimensions
gdimsan array of dimension ids
maplenthe length of the map
mapthe map array
f90_comman MPI communicator.
Returns
0 for success, error code otherwise.
Author
Jim Edwards