SCORPIO 2.0.0
Loading...
Searching...
No Matches
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  rearr_comm_fc_opt
 Rearranger comm flow control options. More...
 
struct  rearr_opt
 Rearranger options. More...
 

Macros

#define PIO_IODESC_START_ID   512
 The start ID and maximum number of IDs for IO decompositions.
 
#define PIO_IODESC_MAX_IDS   65536
 
#define PIO_MAX_VARS_UB   8192
 The maximum number of variables allowed in a netCDF file.
 
#define PIO_MAX_VARS   NC_MAX_VARS
 
#define PIO_MAX_DIMS_UB   1024
 The maximum number of dimensions allowed in a netCDF file.
 
#define PIO_MAX_DIMS   NC_MAX_DIMS
 
#define PIO_MAX_ATTRS_UB   8192
 The maximum number of attributes allowed in a netCDF file.
 
#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.
 
#define DECOMP_VERSION_ATT_NAME   "version"
 Used in the decomposition netCDF file.
 
#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.
 
#define PIO_REQ_NULL   (-1)
 
#define PIO_FIRST_ERROR_CODE   (-500)
 Define error codes for PIO.
 
#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 rearr_comm_fc_opt rearr_comm_fc_opt_t
 Rearranger comm flow control options.
 
typedef struct rearr_opt rearr_opt_t
 Rearranger options.
 

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 ,
  PIO_IOTYPE_HDF5C = 9
}
 These are the supported methods of reading/writing input/output files. More...
 
enum  PIO_REARRANGERS { PIO_REARR_BOX = 1 , PIO_REARR_SUBSET = 2 , PIO_REARR_ANY = 3 , PIO_REARR_CONTIG = 4 }
 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.

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

◆ 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.

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 input/output files.

The PnetCDF, NetCDF and HDF5 libraries output data in the NetCDF file format. The ADIOS library outputs data in the BP file format.

Enumerator
PIO_IOTYPE_PNETCDF 

Parallel NetCDF library (Parallel I/O, NetCDF3 classic file format)

PIO_IOTYPE_NETCDF 

NetCDF library (Serial I/O, NetCDF3 classic file format)

PIO_IOTYPE_NETCDF4C 

NetCDF library (Serial I/O, NetCDF4/HDF5 compressed file format)

PIO_IOTYPE_NETCDF4P 

NetCDF library (Parallel I/O, NetCDF4/HDF5 file format)

PIO_IOTYPE_NETCDF4P_NCZARR 

NetCDF library (Parallel I/O, NCZarr file format)

PIO_IOTYPE_ADIOS 

ADIOS library (Parallel I/O, ADIOS BP file format)

PIO_IOTYPE_ADIOSC 

ADIOS library (Parallel I/O, ADIOS BP compressed file format)

PIO_IOTYPE_HDF5 

HDF5 library (Parallel I/O, NetCDF4/HDF5 file format)

PIO_IOTYPE_HDF5C 

HDF5 library (Parallel I/O, NetCDF4/HDF5 compressed file format)

◆ 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.

PIO_REARR_CONTIG 

Contig rearranger (data aggregation + contiguous data)