SCORPIO  1.7.0
Classes | Macros | Typedefs | Enumerations
pio.h File Reference

Public headers for the PIO C interface. More...

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <mpi.h>
#include "pio_config.h"
#include "pio_api.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  iosystem_desc_t::async_ios_msg_info_
 Async I/O service message info. 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_IODESC_START_ID   512
 The start ID and maximum number of IDs for IO decompositions. More...
 
#define PIO_IODESC_MAX_IDS   65536
 
#define PIO_MAX_VARS_UB   8192
 The maximum number of variables allowed in a netCDF file. More...
 
#define PIO_MAX_VARS   NC_MAX_VARS
 
#define PIO_MAX_DIMS_UB   1024
 The maximum number of dimensions allowed in a netCDF file. More...
 
#define PIO_MAX_DIMS   NC_MAX_DIMS
 
#define PIO_MAX_ATTRS_UB   8192
 The maximum number of attributes allowed in a netCDF file. More...
 
#define PIO_MAX_ATTRS   NC_MAX_ATTRS
 
#define PIO_DEFAULT   (-1)
 Pass this to PIOc_set_iosystem_error_handling() as the iosysid in order to set default error handling. More...
 
#define DECOMP_VERSION_ATT_NAME   "version"
 Used in the decomposition netCDF file. More...
 
#define DECOMP_MAX_MAPLEN_ATT_NAME   "max_maplen"
 
#define DECOMP_TITLE_ATT_NAME   "title"
 
#define DECOMP_HISTORY_ATT_NAME   "history"
 
#define DECOMP_SOURCE_ATT_NAME   "source"
 
#define DECOMP_ORDER_ATT_NAME   "array_order"
 
#define DECOMP_BACKTRACE_ATT_NAME   "backtrace"
 
#define DECOMP_DIM_DIM   "dims"
 
#define DECOMP_TASK_DIM_NAME   "task"
 
#define DECOMP_MAPELEM_DIM_NAME   "map_element"
 
#define DECOMP_NDIMS   "ndims"
 
#define DECOMP_GLOBAL_SIZE_VAR_NAME   "global_size"
 
#define DECOMP_MAPLEN_VAR_NAME   "maplen"
 
#define DECOMP_MAP_VAR_NAME   "map"
 
#define DECOMP_C_ORDER_STR   "C"
 
#define DECOMP_FORTRAN_ORDER_STR   "Fortran"
 
#define PIO_EINDEP   (-203)
 Define the extra error codes for the parallel-netcdf library. More...
 
#define PIO_REQ_NULL   (-1)
 
#define PIO_FIRST_ERROR_CODE   (-500)
 Define error codes for PIO. More...
 
#define PIO_EBADIOTYPE   (-500)
 
#define PIO_EINTERNAL   (-501)
 
#define PIO_REARR_COMM_UNLIMITED_PEND_REQ   -1
 

Typedefs

typedef PIO_OFFSET_C_TYPENAME PIO_Offset
 
typedef struct var_desc_t var_desc_t
 Variable description structure. More...
 
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. More...
 
typedef struct rearr_opt rearr_opt_t
 Rearranger options. More...
 
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 ,
  PIO_IOTYPE_NETCDF4P_NCZARR = 5 , PIO_IOTYPE_ADIOS = 6 , PIO_IOTYPE_ADIOSC = 7 , PIO_IOTYPE_HDF5 = 8
}
 These are the supported methods of reading/writing netCDF files. More...
 
enum  PIO_REARRANGERS { PIO_REARR_BOX = 1 , PIO_REARR_SUBSET = 2 , PIO_REARR_ANY = 3 }
 These are the supported output data rearrangement methods. More...
 
enum  PIO_ERROR_HANDLERS { PIO_INTERNAL_ERROR = (-51) , PIO_BCAST_ERROR = (-52) , PIO_REDUCE_ERROR = (-53) , PIO_RETURN_ERROR = (-54) }
 These are the supported error handlers. More...
 

Detailed Description

Public headers for the PIO C interface.

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

Macro Definition Documentation

◆ DECOMP_BACKTRACE_ATT_NAME

#define DECOMP_BACKTRACE_ATT_NAME   "backtrace"

◆ DECOMP_C_ORDER_STR

#define DECOMP_C_ORDER_STR   "C"

◆ DECOMP_DIM_DIM

#define DECOMP_DIM_DIM   "dims"

◆ DECOMP_FORTRAN_ORDER_STR

#define DECOMP_FORTRAN_ORDER_STR   "Fortran"

◆ DECOMP_GLOBAL_SIZE_VAR_NAME

#define DECOMP_GLOBAL_SIZE_VAR_NAME   "global_size"

◆ DECOMP_HISTORY_ATT_NAME

#define DECOMP_HISTORY_ATT_NAME   "history"

◆ DECOMP_MAP_VAR_NAME

#define DECOMP_MAP_VAR_NAME   "map"

◆ DECOMP_MAPELEM_DIM_NAME

#define DECOMP_MAPELEM_DIM_NAME   "map_element"

◆ DECOMP_MAPLEN_VAR_NAME

#define DECOMP_MAPLEN_VAR_NAME   "maplen"

◆ DECOMP_MAX_MAPLEN_ATT_NAME

#define DECOMP_MAX_MAPLEN_ATT_NAME   "max_maplen"

◆ DECOMP_NDIMS

#define DECOMP_NDIMS   "ndims"

◆ DECOMP_ORDER_ATT_NAME

#define DECOMP_ORDER_ATT_NAME   "array_order"

◆ DECOMP_SOURCE_ATT_NAME

#define DECOMP_SOURCE_ATT_NAME   "source"

◆ DECOMP_TASK_DIM_NAME

#define DECOMP_TASK_DIM_NAME   "task"

◆ DECOMP_TITLE_ATT_NAME

#define DECOMP_TITLE_ATT_NAME   "title"

◆ DECOMP_VERSION_ATT_NAME

#define DECOMP_VERSION_ATT_NAME   "version"

Used in the decomposition netCDF file.

◆ PIO_DEFAULT

#define PIO_DEFAULT   (-1)

Pass this to PIOc_set_iosystem_error_handling() as the iosysid in order to set default error handling.

◆ PIO_EBADIOTYPE

#define PIO_EBADIOTYPE   (-500)

◆ PIO_EINDEP

#define PIO_EINDEP   (-203)

Define the extra error codes for the parallel-netcdf library.

◆ PIO_EINTERNAL

#define PIO_EINTERNAL   (-501)

◆ PIO_FIRST_ERROR_CODE

#define PIO_FIRST_ERROR_CODE   (-500)

Define error codes for PIO.

◆ PIO_IODESC_MAX_IDS

#define PIO_IODESC_MAX_IDS   65536

◆ PIO_IODESC_START_ID

#define PIO_IODESC_START_ID   512

The start ID and maximum number of IDs for IO decompositions.

◆ PIO_MAX_ATTRS

#define PIO_MAX_ATTRS   NC_MAX_ATTRS

◆ PIO_MAX_ATTRS_UB

#define PIO_MAX_ATTRS_UB   8192

The maximum number of attributes allowed in a netCDF file.

◆ PIO_MAX_DIMS

#define PIO_MAX_DIMS   NC_MAX_DIMS

◆ PIO_MAX_DIMS_UB

#define PIO_MAX_DIMS_UB   1024

The maximum number of dimensions allowed in a netCDF file.

◆ PIO_MAX_VARS

#define PIO_MAX_VARS   NC_MAX_VARS

◆ PIO_MAX_VARS_UB

#define PIO_MAX_VARS_UB   8192

The maximum number of variables allowed in a netCDF file.

◆ PIO_REARR_COMM_UNLIMITED_PEND_REQ

#define PIO_REARR_COMM_UNLIMITED_PEND_REQ   -1

◆ PIO_REQ_NULL

#define PIO_REQ_NULL   (-1)

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

◆ PIO_Offset

typedef PIO_OFFSET_C_TYPENAME PIO_Offset

◆ rearr_comm_fc_opt_t

Rearranger comm flow control options.

◆ rearr_opt_t

typedef struct rearr_opt rearr_opt_t

Rearranger options.

◆ var_desc_t

typedef struct var_desc_t var_desc_t

Variable description 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 from io process with rank 0 is broadcasted to all processes.

PIO_REDUCE_ERROR 

Error codes are reduced across all processes.

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_IOTYPE_NETCDF4P_NCZARR 

NetCDF4 (HDF5) parallel NCZarr.

PIO_IOTYPE_ADIOS 

ADIOS parallel.

PIO_IOTYPE_ADIOSC 

ADIOS parallel with compression.

PIO_IOTYPE_HDF5 

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.

PIO_REARR_ANY 

Let the library choose the rearranger.