ParallelIO
|
Public headers for the PIO C interface. More...
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <mpi.h>
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 | io_desc_t |
IO descriptor structure. More... | |
struct | iosystem_desc_t |
IO system descriptor structure. More... | |
struct | wmulti_buffer |
multi buffer. More... | |
struct | file_desc_t |
File descriptor structure. More... | |
Macros | |
#define | MPI_OFFSET MPI_LONG_LONG |
MPI_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 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 |
#define | PIO_MAX_VARS NC_MAX_VARS |
The maximum number of variables allowed in a netCDF file. More... | |
#define | PIO_EINDEP (-203) |
Define the netCDF-based error codes. More... | |
#define | PIO_EBADIOTYPE -255 |
Define error codes for PIO. More... | |
#define | PIO_REQ_NULL (NC_REQ_NULL-1) |
??? | |
Typedefs | |
typedef struct var_desc_t | var_desc_t |
Variable description structure. | |
typedef struct io_region | io_region |
IO region structure. 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 |
multi buffer. | |
typedef struct file_desc_t | file_desc_t |
File descriptor structure. More... | |
Enumerations | |
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_freedecomp (int iosysid, int ioid) |
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_format (int ncid, int *formatp) |
The PIO-C interface for the NetCDF function nc_inq_format. | |
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_varnatts (int ncid, int varid, int *nattsp) |
The PIO-C interface for the NetCDF function nc_inq_varnatts. | |
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_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_inq_var_szip (int ncid, int varid, int *options_maskp, int *pixels_per_blockp) |
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_fill (int ncid, int varid, int no_fill, const void *fill_value) |
Set chunksizes 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_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_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_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_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) |
The PIO-C interface for the NetCDF function nc_inq_varname. | |
int | PIOc_put_att_double (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const double *op) |
The PIO-C interface for the NetCDF function nc_put_att_double. | |
int | PIOc_put_att_int (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const int *op) |
The PIO-C interface for the NetCDF function nc_put_att_int. | |
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_natts (int ncid, int *ngattsp) |
The PIO-C interface for the NetCDF function nc_inq_natts. | |
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_get_att_text (int ncid, int varid, const char *name, char *ip) |
The PIO-C interface for the NetCDF function nc_get_att_text. | |
int | PIOc_get_att_short (int ncid, int varid, const char *name, short *ip) |
The PIO-C interface for the NetCDF function nc_get_att_short. | |
int | PIOc_put_att_long (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const long *op) |
The PIO-C interface for the NetCDF function nc_put_att_long. | |
int | PIOc_redef (int ncid) |
The PIO-C interface for the NetCDF function nc_redef. 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_enddef (int ncid) |
The PIO-C interface for the NetCDF function nc_enddef. 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_put_att_short (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const short *op) |
The PIO-C interface for the NetCDF function nc_put_att_short. | |
int | PIOc_put_att_text (int ncid, int varid, const char *name, PIO_Offset len, const char *op) |
The PIO-C interface for the NetCDF function nc_put_att_text. | |
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_get_att_ulonglong (int ncid, int varid, const char *name, unsigned long long *ip) |
The PIO-C interface for the NetCDF function nc_get_att_ulonglong. | |
int | PIOc_get_att_ushort (int ncid, int varid, const char *name, unsigned short *ip) |
The PIO-C interface for the NetCDF function nc_get_att_ushort. | |
int | PIOc_put_att_ulonglong (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned long long *op) |
The PIO-C interface for the NetCDF function nc_put_att_ulonglong. | |
int | PIOc_inq_dimlen (int ncid, int dimid, PIO_Offset *lenp) |
The PIO-C interface for the NetCDF function nc_inq_dimlen. | |
int | PIOc_get_att_uint (int ncid, int varid, const char *name, unsigned int *ip) |
The PIO-C interface for the NetCDF function nc_get_att_uint. | |
int | PIOc_get_att_longlong (int ncid, int varid, const char *name, long long *ip) |
The PIO-C interface for the NetCDF function nc_get_att_longlong. | |
int | PIOc_put_att_schar (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const signed char *op) |
The PIO-C interface for the NetCDF function nc_put_att_schar. | |
int | PIOc_put_att_float (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const float *op) |
The PIO-C interface for the NetCDF function nc_put_att_float. | |
int | PIOc_inq_nvars (int ncid, int *nvarsp) |
The PIO-C interface for the NetCDF function nc_inq_nvars. | |
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_inq_varndims (int ncid, int varid, int *ndimsp) |
The PIO-C interface for the NetCDF function nc_inq_varndims. | |
int | PIOc_get_att_long (int ncid, int varid, const char *name, long *ip) |
The PIO-C interface for the NetCDF function nc_get_att_long. | |
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_unlimdim (int ncid, int *unlimdimidp) |
The PIO-C interface for the NetCDF function nc_inq_unlimdim. | |
int | PIOc_inq_vardimid (int ncid, int varid, int *dimidsp) |
The PIO-C interface for the NetCDF function nc_inq_vardimid. | |
int | PIOc_inq_attlen (int ncid, int varid, const char *name, PIO_Offset *lenp) |
The PIO-C interface for the NetCDF function nc_inq_attlen. | |
int | PIOc_inq_dimname (int ncid, int dimid, char *name) |
The PIO-C interface for the NetCDF function nc_inq_dimname. | |
int | PIOc_put_att_ushort (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned short *op) |
The PIO-C interface for the NetCDF function nc_put_att_ushort. | |
int | PIOc_get_att_float (int ncid, int varid, const char *name, float *ip) |
The PIO-C interface for the NetCDF function nc_get_att_float. | |
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_put_att_longlong (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const long long *op) |
The PIO-C interface for the NetCDF function nc_put_att_longlong. | |
int | PIOc_put_att_uint (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned int *op) |
The PIO-C interface for the NetCDF function nc_put_att_uint. | |
int | PIOc_get_att_schar (int ncid, int varid, const char *name, signed char *ip) |
The PIO-C interface for the NetCDF function nc_get_att_schar. | |
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_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_ndims (int ncid, int *ndimsp) |
The PIO-C interface for the NetCDF function nc_inq_ndims. | |
int | PIOc_inq_vartype (int ncid, int varid, nc_type *xtypep) |
The PIO-C interface for the NetCDF function nc_inq_vartype. | |
int | PIOc_get_att_int (int ncid, int varid, const char *name, int *ip) |
The PIO-C interface for the NetCDF function nc_get_att_int. | |
int | PIOc_get_att_double (int ncid, int varid, const char *name, double *ip) |
The PIO-C interface for the NetCDF function nc_get_att_double. | |
int | PIOc_inq_atttype (int ncid, int varid, const char *name, nc_type *xtypep) |
The PIO-C interface for the NetCDF function nc_inq_atttype. | |
int | PIOc_put_att_uchar (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned char *op) |
The PIO-C interface for the NetCDF function nc_put_att_uchar. | |
int | PIOc_get_att_uchar (int ncid, int varid, const char *name, unsigned char *ip) |
The PIO-C interface for the NetCDF function nc_get_att_uchar. | |
int | PIOc_InitDecomp (const int iosysid, const int basetype, const int ndims, const int dims[], const int maplen, const PIO_Offset *compmap, int *ioidp, const int *rearr, const PIO_Offset *iostart, const PIO_Offset *iocount) |
C interface to the initdecomp. More... | |
int | PIOc_Init_Intracomm (const MPI_Comm comp_comm, const int num_iotasks, const int stride, const int base, const int rearr, int *iosysidp) |
int | PIOc_Init_Async (MPI_Comm world, int num_io_procs, int *io_proc_list, int component_count, int *num_procs_per_comp, int **proc_list, int *iosysidp) |
Library initialization used when IO tasks are distinct from compute tasks. More... | |
int | PIOc_Init_Intercomm (int component_count, MPI_Comm peer_comm, MPI_Comm *comp_comms, MPI_Comm io_comm, int *iosysidp) |
int | PIOc_closefile (int ncid) |
Close a file previously opened with PIO. More... | |
int | PIOc_createfile (const int iosysid, int *ncidp, int *iotype, const char *fname, const int mode) |
int | PIOc_create (int iosysid, const char *path, int cmode, int *ncidp) |
Open a new file using pio. More... | |
int | PIOc_openfile (const int iosysid, int *ncidp, int *iotype, const char *fname, const int mode) |
Open an existing file using PIO library. More... | |
int | PIOc_open (const int iosysid, const char *path, int mode, int *ncidp) |
Open an existing file using PIO library. More... | |
int | PIOc_write_darray (const int ncid, const int vid, const int ioid, const PIO_Offset arraylen, void *array, void *fillvalue) |
Write a distributed array to the output file. More... | |
int | PIOc_write_darray_multi (const int ncid, const int vid[], const int ioid, const int nvars, const PIO_Offset arraylen, void *array, const int frame[], void *fillvalue[], bool flushtodisk) |
int | PIOc_get_att_ubyte (int ncid, int varid, const char *name, unsigned char *ip) |
The PIO-C interface for the NetCDF function nc_get_att_ubyte. | |
int | PIOc_put_att_ubyte (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const unsigned char *op) |
The PIO-C interface for the NetCDF function nc_put_att_ubyte. | |
int | PIOc_set_blocksize (const int newblocksize) |
Set the target blocksize for the box rearranger. | |
int | PIOc_readmap (const char file[], int *ndims, int *gdims[], PIO_Offset *fmaplen, PIO_Offset *map[], const MPI_Comm comm) |
int | PIOc_readmap_from_f90 (const char file[], int *ndims, int *gdims[], PIO_Offset *maplen, PIO_Offset *map[], const int f90_comm) |
int | PIOc_writemap (const char file[], const int ndims, const int gdims[], PIO_Offset maplen, PIO_Offset map[], const MPI_Comm comm) |
int | PIOc_writemap_from_f90 (const char file[], const int ndims, const int gdims[], const PIO_Offset maplen, const PIO_Offset map[], const int f90_comm) |
int | PIOc_deletefile (const int iosysid, const char filename[]) |
Delete a file. More... | |
int | PIOc_File_is_Open (int ncid) |
Check to see if PIO file is open. | |
int | PIOc_Set_File_Error_Handling (int ncid, int method) |
Set the error handling method to be used for subsequent pio library calls, returns the previous method setting. | |
int | PIOc_advanceframe (int ncid, int varid) |
Increment the unlimited dimension of the given variable. | |
int | PIOc_setframe (const int ncid, const int varid, const int frame) |
Set the unlimited dimension of the given variable. More... | |
int | PIOc_get_numiotasks (int iosysid, int *numiotasks) |
Get the number of IO tasks set. | |
int | PIOc_get_iorank (int iosysid, int *iorank) |
Get the IO rank on the current task. | |
int | PIOc_get_local_array_size (int ioid) |
Get the local size of the variable. | |
int | PIOc_Set_IOSystem_Error_Handling (int iosysid, int method) |
Set the error handling method used for subsequent calls. | |
int | PIOc_set_hint (const int iosysid, char hint[], const char hintval[]) |
Send a hint to the MPI-IO library. More... | |
int | PIOc_finalize (const int iosysid) |
Clean up internal data structures, free MPI resources, and exit the pio library. More... | |
int | PIOc_iam_iotask (const int iosysid, bool *ioproc) |
return a logical indicating whether this task is an iotask | |
int | PIOc_iotask_rank (const int iosysid, int *iorank) |
return the rank of this task in the io comm or -1 if this task is not in the comm | |
int | PIOc_iosystem_is_active (const int iosysid, bool *active) |
Check to see if PIO has been initialized. | |
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) |
int | PIOc_get_var1_schar (int ncid, int varid, const PIO_Offset index[], signed char *buf) |
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) |
int | pio_read_darray_nc (file_desc_t *file, io_desc_t *iodesc, const int vid, void *IOBUF) |
Read an array of data from a file to the (parallel) IO library. 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) |
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) |
int | PIOc_put_varm (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
PIO interface to nc_put_varm. More... | |
int | PIOc_read_darray (const int ncid, const int vid, const int ioid, const PIO_Offset arraylen, void *array) |
Read a field from a file to the IO library. 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) |
int | PIOc_get_varm_schar (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], signed char *buf) |
int | PIOc_put_varm_uchar (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const unsigned char *op) |
PIO interface to nc_put_varm_uchar. More... | |
int | PIOc_put_var_ushort (int ncid, int varid, const unsigned short *op) |
Interface to netCDF data write function. More... | |
int | PIOc_get_vars_short (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], short *buf) |
int | PIOc_put_var1_longlong (int ncid, int varid, const PIO_Offset index[], const long long *op) |
int | PIOc_get_var_double (int ncid, int varid, double *buf) |
int | PIOc_put_vara_uchar (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const unsigned char *op) |
int | PIOc_put_varm_short (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const short *op) |
PIO interface to nc_put_varm_short. More... | |
int | PIOc_get_vara_double (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], double *buf) |
int | PIOc_put_var1_long (int ncid, int varid, const PIO_Offset index[], const long *ip) |
int | PIOc_get_var_int (int ncid, int varid, int *buf) |
int | PIOc_put_vars_long (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const long *op) |
int | PIOc_put_var_short (int ncid, int varid, const short *op) |
Interface to netCDF data write function. More... | |
int | PIOc_get_vara_text (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], char *buf) |
int | PIOc_put_vara_int (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const int *op) |
int | PIOc_put_var1_ushort (int ncid, int varid, const PIO_Offset index[], const unsigned short *op) |
int | PIOc_put_vara_text (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const char *op) |
int | PIOc_put_varm_text (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const char *op) |
PIO interface to nc_put_varm_text. More... | |
int | PIOc_put_varm_ushort (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const unsigned short *op) |
PIO interface to nc_put_varm_ushort. More... | |
int | PIOc_put_var_ulonglong (int ncid, int varid, const unsigned long long *op) |
Interface to netCDF data write function. More... | |
int | PIOc_put_var_int (int ncid, int varid, const int *op) |
Interface to netCDF data write function. More... | |
int | PIOc_put_var_longlong (int ncid, int varid, const long long *op) |
Interface to netCDF data write function. More... | |
int | PIOc_put_var_schar (int ncid, int varid, const signed char *op) |
Interface to netCDF data write function. More... | |
int | PIOc_put_var_uint (int ncid, int varid, const unsigned int *op) |
Interface to netCDF data write function. More... | |
int | PIOc_put_var (int ncid, int varid, const void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
Interface to netCDF data write function. More... | |
int | PIOc_put_vara_ushort (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const unsigned short *op) |
int | PIOc_put_vars_short (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const short *op) |
int | PIOc_put_vara_uint (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const unsigned int *op) |
int | PIOc_put_vara_schar (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const signed char *op) |
int | PIOc_put_varm_ulonglong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const unsigned long long *op) |
PIO interface to nc_put_varm_ulonglong. More... | |
int | PIOc_put_var1_uchar (int ncid, int varid, const PIO_Offset index[], const unsigned char *op) |
int | PIOc_put_varm_int (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const int *op) |
PIO interface to nc_put_varm_int. 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) |
int | PIOc_put_var1 (int ncid, int varid, const PIO_Offset index[], const void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
int | PIOc_put_vara_float (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const float *op) |
int | PIOc_put_var1_float (int ncid, int varid, const PIO_Offset index[], const float *op) |
int | PIOc_put_varm_float (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const float *op) |
PIO interface to nc_put_varm_float. More... | |
int | PIOc_put_var1_text (int ncid, int varid, const PIO_Offset index[], const char *op) |
int | PIOc_put_vars_text (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const char *op) |
int | PIOc_put_varm_long (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const long *op) |
PIO interface to nc_put_varm_long. 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) |
int | PIOc_put_vara_longlong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const long long *op) |
int | PIOc_put_var_double (int ncid, int varid, const double *op) |
Interface to netCDF data write function. More... | |
int | PIOc_put_var_float (int ncid, int varid, const float *op) |
Interface to netCDF data write function. More... | |
int | PIOc_put_var1_ulonglong (int ncid, int varid, const PIO_Offset index[], const unsigned long long *op) |
int | PIOc_put_varm_uint (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const unsigned int *op) |
PIO interface to nc_put_varm_uint. More... | |
int | PIOc_put_var1_uint (int ncid, int varid, const PIO_Offset index[], const unsigned int *op) |
int | PIOc_put_var1_int (int ncid, int varid, const PIO_Offset index[], const int *op) |
int | PIOc_put_vars_float (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const float *op) |
int | PIOc_put_vara_short (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const short *op) |
int | PIOc_put_var1_schar (int ncid, int varid, const PIO_Offset index[], const signed char *op) |
int | PIOc_put_vara_ulonglong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const unsigned long long *op) |
int | PIOc_put_varm_double (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const double *op) |
PIO interface to nc_put_varm_double. More... | |
int | PIOc_put_vara (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
int | PIOc_put_vara_long (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const long *op) |
int | PIOc_put_var1_double (int ncid, int varid, const PIO_Offset index[], const double *op) |
int | PIOc_put_varm_schar (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const signed char *op) |
PIO interface to nc_put_varm_schar. More... | |
int | PIOc_put_var_text (int ncid, int varid, const char *op) |
Interface to netCDF data write function. 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) |
int | PIOc_put_var1_short (int ncid, int varid, const PIO_Offset index[], const short *op) |
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) |
int | PIOc_put_vara_double (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const double *op) |
int | PIOc_put_vars (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
int | PIOc_put_vars_tc (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], nc_type xtype, const void *buf) |
int | PIOc_put_var_uchar (int ncid, int varid, const unsigned char *op) |
Interface to netCDF data write function. More... | |
int | PIOc_put_var_long (int ncid, int varid, const long *op) |
Interface to netCDF data write function. More... | |
int | PIOc_put_varm_longlong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], const long long *op) |
PIO interface to nc_put_varm_longlong. More... | |
int | PIOc_get_vara_int (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], int *buf) |
int | PIOc_get_var1_float (int ncid, int varid, const PIO_Offset index[], float *buf) |
int | PIOc_get_var1_short (int ncid, int varid, const PIO_Offset index[], short *buf) |
int | PIOc_get_vars_int (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], int *buf) |
int | PIOc_get_var_text (int ncid, int varid, char *buf) |
int | PIOc_get_varm_double (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], double *buf) |
int | PIOc_get_vars_schar (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], signed char *buf) |
int | PIOc_get_vara_ushort (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], unsigned short *buf) |
int | PIOc_get_var1_ushort (int ncid, int varid, const PIO_Offset index[], unsigned short *buf) |
int | PIOc_get_var_float (int ncid, int varid, float *buf) |
int | PIOc_get_vars_uchar (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], unsigned char *buf) |
int | PIOc_get_var (int ncid, int varid, void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
int | PIOc_get_var1_longlong (int ncid, int varid, const PIO_Offset index[], long long *buf) |
int | PIOc_get_vars_ushort (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], unsigned short *buf) |
int | PIOc_get_var_long (int ncid, int varid, long *buf) |
int | PIOc_get_var1_double (int ncid, int varid, const PIO_Offset index[], double *buf) |
int | PIOc_get_vara_uint (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], unsigned int *buf) |
int | PIOc_get_vars_longlong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], long long *buf) |
int | PIOc_get_var_longlong (int ncid, int varid, long long *buf) |
int | PIOc_get_vara_short (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], short *buf) |
int | PIOc_get_vara_long (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], long *buf) |
int | PIOc_get_var1_int (int ncid, int varid, const PIO_Offset index[], int *buf) |
int | PIOc_get_var1_ulonglong (int ncid, int varid, const PIO_Offset index[], unsigned long long *buf) |
int | PIOc_get_var_uchar (int ncid, int varid, unsigned char *buf) |
int | PIOc_get_vara_uchar (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], unsigned char *buf) |
int | PIOc_get_vars_float (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], float *buf) |
int | PIOc_get_vars_long (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], long *buf) |
int | PIOc_get_var1 (int ncid, int varid, const PIO_Offset index[], void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
int | PIOc_get_var_uint (int ncid, int varid, unsigned int *buf) |
int | PIOc_get_vara (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
int | PIOc_get_vara_schar (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], signed char *buf) |
int | PIOc_get_var1_uint (int ncid, int varid, const PIO_Offset index[], unsigned int *buf) |
int | PIOc_get_vars_uint (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], unsigned int *buf) |
int | PIOc_get_vara_float (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], float *buf) |
int | PIOc_get_varm_text (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], char *buf) |
int | PIOc_get_var1_text (int ncid, int varid, const PIO_Offset index[], char *buf) |
int | PIOc_get_varm_int (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], int *buf) |
int | PIOc_get_varm_uint (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], unsigned int *buf) |
int | PIOc_get_varm (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
int | PIOc_get_vars_double (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], double *buf) |
int | PIOc_get_vara_longlong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], long long *buf) |
int | PIOc_get_var_ulonglong (int ncid, int varid, unsigned long long *buf) |
int | PIOc_get_vara_ulonglong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], unsigned long long *buf) |
int | PIOc_get_var_short (int ncid, int varid, short *buf) |
int | PIOc_get_varm_float (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], float *buf) |
int | PIOc_get_var1_long (int ncid, int varid, const PIO_Offset index[], long *buf) |
int | PIOc_get_varm_long (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], long *buf) |
int | PIOc_get_varm_ushort (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], unsigned short *buf) |
int | PIOc_get_varm_longlong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], long long *buf) |
int | PIOc_get_vars_text (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], char *buf) |
int | PIOc_get_var1_uchar (int ncid, int varid, const PIO_Offset index[], unsigned char *buf) |
int | PIOc_get_vars (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], void *buf, PIO_Offset bufcount, MPI_Datatype buftype) |
int | PIOc_get_vars_tc (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], nc_type xtype, void *buf) |
int | PIOc_get_varm_short (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], short *buf) |
int | PIOc_get_varm_ulonglong (int ncid, int varid, const PIO_Offset start[], const PIO_Offset count[], const PIO_Offset stride[], const PIO_Offset imap[], unsigned long long *buf) |
int | PIOc_get_var_schar (int ncid, int varid, signed char *buf) |
int | PIOc_iotype_available (const int iotype) |
return true if this iotype is supported in the build, 0 otherwise | |
int | PIOc_set_log_level (int level) |
Set the logging level. More... | |
int | PIOc_put_att (int ncid, int varid, const char *name, nc_type xtype, PIO_Offset len, const void *op) |
The PIO-C interface for the NetCDF function nc_put_att. More... | |
int | PIOc_get_att (int ncid, int varid, const char *name, void *ip) |
The PIO-C interface for the NetCDF function nc_get_att. More... | |
int | PIOc_inq_type (int ncid, nc_type xtype, char *name, PIO_Offset *sizep) |
The PIO-C interface for the NetCDF function nctypelen. | |
#define MPI_OFFSET MPI_LONG_LONG |
MPI_OFFSET is an integer type of size sufficient to represent the size (in bytes) of the largest file supported by MPI.
In some MPI implementations MPI_OFFSET is not properly defined.
#define PIO_EBADIOTYPE -255 |
Define error codes for PIO.
#define PIO_EINDEP (-203) |
Define the netCDF-based error codes.
Define the extra error codes for the parallel-netcdf library.
#define PIO_MAX_VARS NC_MAX_VARS |
The maximum number of variables allowed in a netCDF file.
#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.
typedef struct file_desc_t file_desc_t |
File descriptor structure.
This structure holds information associated with each open file
IO descriptor structure.
This structure defines the mapping for a given variable between compute and IO decomposition.
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.
typedef struct iosystem_desc_t iosystem_desc_t |
IO system descriptor structure.
This structure contains the general IO subsystem data and MPI structure
enum PIO_ERROR_HANDLERS |
enum PIO_IOTYPE |
These are the supported methods of reading/writing netCDF files.
(Not all methods can be used with all netCDF files.)
enum PIO_REARRANGERS |
int pio_read_darray_nc | ( | file_desc_t * | file, |
io_desc_t * | iodesc, | ||
const int | vid, | ||
void * | IOBUF | ||
) |
Read an array of data from a file to the (parallel) IO library.
file | a pointer to the open file descriptor for the file that will be written to |
iodesc | a pointer to the defined iodescriptor for the buffer |
vid | the variable id to be read |
IOBUF | the buffer to be read into from this mpi task |
int PIOc_closefile | ( | int | ncid | ) |
Close a file previously opened with PIO.
ncid | the file pointer |
int PIOc_create | ( | int | iosysid, |
const char * | filename, | ||
int | cmode, | ||
int * | ncidp | ||
) |
Open a new file using pio.
Input parameters are read on comp task 0 and ignored elsewhere.
iosysid | : A defined pio system descriptor (input) |
cmode | : The netcdf mode for the create operation |
filename | : The filename to open |
ncidp | : A pio file descriptor (output) |
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.
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__dimensions.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
idp | a pointer that will get the id of the variable or attribute. |
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.
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__variables.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
varidp | a pointer that will get the variable id |
int PIOc_def_var_chunking | ( | int | ncid, |
int | varid, | ||
int | storage, | ||
const PIO_Offset * | chunksizesp | ||
) |
Set chunksizes for a variable.
This function only applies to netCDF-4 files. When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
Chunksizes have important performance repercussions. NetCDF attempts to choose sensible chunk sizes by default, but for best performance check chunking against access patterns.
See the netCDF variable documentation for details about the operation of this function.
ncid | the ncid of the open file. |
varid | the ID of the variable to set chunksizes for. |
storage | NC_CONTIGUOUS or NC_CHUNKED. |
chunksizep | an array of chunksizes. Must have a chunksize for every variable dimension. |
Pointer to io system information.
Pointer to file information.
Return code from function calls.
Return code from MPI function codes.
int PIOc_def_var_deflate | ( | int | ncid, |
int | varid, | ||
int | shuffle, | ||
int | deflate, | ||
int | deflate_level | ||
) |
Set deflate (zlib) settings for a variable.
This function only applies to netCDF-4 files. When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
See the netCDF variable documentation for details about the operation of this function.
ncid | the ncid of the open file. |
varid | the ID of the variable. |
shuffle | non-zero to turn on shuffle filter (can be good for integer data). |
deflate | non-zero to turn on zlib compression for this variable. |
deflate_level | 1 to 9, with 1 being faster and 9 being more compressed. |
int PIOc_def_var_endian | ( | int | ncid, |
int | varid, | ||
int | endian | ||
) |
Set chunksizes for a variable.
This function only applies to netCDF-4 files. When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
See the netCDF variable documentation for details about the operation of this function.
Chunksizes have important performance repercussions. NetCDF attempts to choose sensible chunk sizes by default, but for best performance check chunking against access patterns.
ncid | the ncid of the open file. |
varid | the ID of the variable to set chunksizes for. |
storage | NC_CONTIGUOUS or NC_CHUNKED. |
chunksizep | an array of chunksizes. Must have a chunksize for every variable dimension. |
int PIOc_def_var_fill | ( | int | ncid, |
int | varid, | ||
int | no_fill, | ||
const void * | fill_value | ||
) |
Set chunksizes for a variable.
This function only applies to netCDF-4 files. When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
See the netCDF variable documentation for details about the operation of this function.
Chunksizes have important performance repercussions. NetCDF attempts to choose sensible chunk sizes by default, but for best performance check chunking against access patterns.
ncid | the ncid of the open file. |
varid | the ID of the variable to set chunksizes for. |
storage | NC_CONTIGUOUS or NC_CHUNKED. |
chunksizep | an array of chunksizes. Must have a chunksize for every variable dimension. |
int PIOc_del_att | ( | int | ncid, |
int | varid, | ||
const char * | name | ||
) |
The PIO-C interface for the NetCDF function nc_del_att.
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
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
int PIOc_deletefile | ( | const int | iosysid, |
const char | filename[] | ||
) |
Delete a file.
iosysid | : a pio system handle |
filename | : a filename |
int PIOc_enddef | ( | int | ncid | ) |
The PIO-C interface for the NetCDF function nc_enddef.
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__datasets.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
int PIOc_finalize | ( | const int | iosysid | ) |
Clean up internal data structures, free MPI resources, and exit the pio library.
iosysid | the io system ID provided by PIOc_Init_Intracomm(). |
int PIOc_get_att | ( | int | ncid, |
int | varid, | ||
const char * | name, | ||
void * | ip | ||
) |
The PIO-C interface for the NetCDF function nc_get_att.
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
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
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.
This function has no effect on netCDF classic files. Calling this function with iotype of PIO_IOTYPE_PNETCDF or PIO_IOTYPE_NETCDF returns an error.
The file chunk cache for HDF5 can be set, and will apply for any files opened or created until the program ends, or the settings are changed again. The cache settings apply only to the open file. They do not persist with the file, and must be set each time the file is opened, before it is opened, if they are to have effect.
See the netCDF variable documentation for details about the operation of this function.
Chunksizes have important performance repercussions. NetCDF attempts to choose sensible chunk sizes by default, but for best performance check chunking against access patterns.
iotype | the iotype of files to be created or opened. |
sizep | gets the size of file cache. |
nelemsp | gets the number of elements in file cache. |
preemptionp | gets the preemption setting for file cache. |
int PIOc_get_var_chunk_cache | ( | int | ncid, |
int | varid, | ||
PIO_Offset * | sizep, | ||
PIO_Offset * | nelemsp, | ||
float * | preemptionp | ||
) |
Get the variable chunk cache settings.
This function only applies to netCDF-4 files. When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
Note that these settings are not part of the data file - they apply only to the open file as long as it is open.
See the netCDF variable documentation for details about the operation of this function.
ncid | the ncid of the open file. |
varid | the ID of the variable to set chunksizes for. |
sizep | will get the size of the cache in bytes. |
nelemsp | will get the number of elements in the cache. |
preemptionp | will get the cache preemption value. |
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, | ||
int * | iosysidp | ||
) |
Library initialization used when IO tasks are distinct from compute tasks.
This is a collective call. Input parameters are read on comp_rank=0 values on other tasks are ignored. This variation of PIO_init sets up a distinct set of tasks to handle IO, these tasks do not return from this call. Instead they go to an internal loop and wait to receive further instructions from the computational tasks.
Here is the sequence of events that needs to occur when an IO operation is called from the collection of compute tasks. I'm going to use pio_put_var because write_darray has some special characteristics that make it a bit more complicated...
Compute tasks call pio_put_var with an integer argument
The MPI_Send sends a message from comp_rank=0 to io_rank=0 on union_comm (a comm defined as the union of io and compute tasks) msg is an integer which indicates the function being called, in this case the msg is PIO_MSG_PUT_VAR_INT
The iotasks now know what additional arguments they should expect to receive from the compute tasks, in this case a file handle, a variable id, the length of the array and the array itself.
The iotasks now have the information they need to complete the operation and they call the pio_put_var routine. (In pio1 this bit of code is in pio_get_put_callbacks.F90.in)
After the netcdf operation is completed (in the case of an inq or get operation) the result is communicated back to the compute tasks.
world | the communicator containing all the available tasks. |
num_io_procs | the number of processes for the IO component. |
io_proc_list | an 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_count | number of computational components |
num_procs_per_comp | an array of int, of length component_count, with the number of processors in each computation component. |
proc_list | an 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. |
iosysidp | pointer to array of length component_count that gets the iosysid for each component. |
int PIOc_InitDecomp | ( | const int | iosysid, |
const int | basetype, | ||
const int | ndims, | ||
const int | dims[], | ||
const int | maplen, | ||
const PIO_Offset * | compmap, | ||
int * | ioidp, | ||
const int * | rearranger, | ||
const PIO_Offset * | iostart, | ||
const PIO_Offset * | iocount | ||
) |
C interface to the initdecomp.
iosysid | IO system descriptor structure. (input) This structure contains the general IO subsystem data and MPI structure (input) |
basetype | the basic PIO data type used (input) |
ndims | the number of dimensions in the variable (input) |
dims[] | the global size of each dimension (input) |
maplen | the local length of the compmap array (input) |
compmap[] | a 1 based array of offsets into the array record on file. A 0 in this array indicates a value which should not be transfered. (input) |
ioidp | the io description pointer (output) |
rearranger | the rearranger to be used for this decomp or NULL to use the default (optional input) |
iostart | An optional array of start values for block cyclic decompositions (optional input) |
iocount | An optional array of count values for block cyclic decompositions (optional input) |
int PIOc_inq | ( | int | ncid, |
int * | ndimsp, | ||
int * | nvarsp, | ||
int * | ngattsp, | ||
int * | unlimdimidp | ||
) |
The PIO-C interface for the NetCDF function nc_inq.
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__datasets.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
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.
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
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
xtypep | a pointer that will get the type of the attribute. |
lenp | a pointer that will get the number of values |
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
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
idp | a pointer that will get the id of the variable or attribute. |
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
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
attnum | the attribute ID. |
int PIOc_inq_dim | ( | int | ncid, |
int | dimid, | ||
char * | name, | ||
PIO_Offset * | lenp | ||
) |
The PIO-C interface for the NetCDF function nc_inq_dim.
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__dimensions.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
lenp | a pointer that will get the number of values |
int PIOc_inq_dimid | ( | int | ncid, |
const char * | name, | ||
int * | idp | ||
) |
The PIO-C interface for the NetCDF function nc_inq_dimid.
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__dimensions.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
idp | a pointer that will get the id of the variable or attribute. |
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.
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__variables.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
xtypep | a pointer that will get the type of the attribute. |
nattsp | a pointer that will get the number of attributes |
int PIOc_inq_var_chunking | ( | int | ncid, |
int | varid, | ||
int * | storagep, | ||
PIO_Offset * | chunksizesp | ||
) |
Inquire about chunksizes for a variable.
This function only applies to netCDF-4 files. When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
See the netCDF variable documentation for details about the operation of this function.
ncid | the ncid of the open file. |
varid | the ID of the variable to set chunksizes for. |
storagep | pointer to int which will be set to either NC_CONTIGUOUS or NC_CHUNKED. |
chunksizep | pointer to memory where chunksizes will be set. There are the same number of chunksizes as there are dimensions. |
int PIOc_inq_var_deflate | ( | int | ncid, |
int | varid, | ||
int * | shufflep, | ||
int * | deflatep, | ||
int * | deflate_levelp | ||
) |
This function only applies to netCDF-4 files.
When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
Inquire about deflate (zlib compression) settings for a variable.
See the netCDF variable documentation for details about the operation of this function.
ncid | the ncid of the open file. |
varid | the ID of the variable to set chunksizes for. |
shufflep | pointer to an int that will get the status of the shuffle filter. |
deflatep | pointer to an int that will be set to non-zero if deflation is in use for this variable. |
deflate_levelp | pointer to an int that will get the deflation level (from 1-9) if deflation is in use for this variable. |
int PIOc_inq_var_endian | ( | int | ncid, |
int | varid, | ||
int * | endianp | ||
) |
Inquire about chunksizes for a variable.
This function only applies to netCDF-4 files. When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
See the netCDF variable documentation for details about the operation of this function.
ncid | the ncid of the open file. |
varid | the ID of the variable to set chunksizes for. |
storagep | pointer to int which will be set to either NC_CONTIGUOUS or NC_CHUNKED. |
chunksizep | pointer to memory where chunksizes will be set. There are the same number of chunksizes as there are dimensions. |
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.
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__variables.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
int PIOc_inq_varid | ( | int | ncid, |
const char * | name, | ||
int * | varidp | ||
) |
The PIO-C interface for the NetCDF function nc_inq_varid.
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__variables.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
varidp | a pointer that will get the variable id |
int PIOc_open | ( | int | iosysid, |
const char * | path, | ||
int | mode, | ||
int * | ncidp | ||
) |
Open an existing file using PIO library.
Input parameters are read on comp task 0 and ignored elsewhere.
iosysid | A defined pio system descriptor |
path | The filename to open |
mode | The netcdf mode for the open operation |
ncidp | pointer to int where ncid will go |
int PIOc_openfile | ( | const int | iosysid, |
int * | ncidp, | ||
int * | iotype, | ||
const char * | filename, | ||
const int | mode | ||
) |
Open an existing file using PIO library.
Input parameters are read on comp task 0 and ignored elsewhere.
iosysid | : A defined pio system descriptor (input) |
ncidp | : A pio file descriptor (output) |
iotype | : A pio output format (input) |
filename | : The filename to open |
mode | : The netcdf mode for the open operation |
int PIOc_put_att | ( | int | ncid, |
int | varid, | ||
const char * | name, | ||
nc_type | xtype, | ||
PIO_Offset | len, | ||
const void * | op | ||
) |
The PIO-C interface for the NetCDF function nc_put_att.
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
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
int PIOc_put_var | ( | int | ncid, |
int | varid, | ||
const void * | buf, | ||
PIO_Offset | bufcount, | ||
MPI_Datatype | buftype | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_double | ( | int | ncid, |
int | varid, | ||
const double * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_float | ( | int | ncid, |
int | varid, | ||
const float * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_int | ( | int | ncid, |
int | varid, | ||
const int * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_long | ( | int | ncid, |
int | varid, | ||
const long * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_longlong | ( | int | ncid, |
int | varid, | ||
const long long * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_schar | ( | int | ncid, |
int | varid, | ||
const signed char * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_short | ( | int | ncid, |
int | varid, | ||
const short * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_text | ( | int | ncid, |
int | varid, | ||
const char * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_uchar | ( | int | ncid, |
int | varid, | ||
const unsigned char * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_uint | ( | int | ncid, |
int | varid, | ||
const unsigned int * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_ulonglong | ( | int | ncid, |
int | varid, | ||
const unsigned long long * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_var_ushort | ( | int | ncid, |
int | varid, | ||
const unsigned short * | op | ||
) |
Interface to netCDF data write function.
int PIOc_put_varm | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const void * | buf, | ||
PIO_Offset | bufcount, | ||
MPI_Datatype | buftype | ||
) |
PIO interface to nc_put_varm.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_double | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const double * | op | ||
) |
PIO interface to nc_put_varm_double.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_float | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const float * | op | ||
) |
PIO interface to nc_put_varm_float.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_int | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const int * | op | ||
) |
PIO interface to nc_put_varm_int.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_long | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const long * | op | ||
) |
PIO interface to nc_put_varm_long.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_longlong | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const long long * | op | ||
) |
PIO interface to nc_put_varm_longlong.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_schar | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const signed char * | op | ||
) |
PIO interface to nc_put_varm_schar.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_short | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const short * | op | ||
) |
PIO interface to nc_put_varm_short.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_text | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const char * | op | ||
) |
PIO interface to nc_put_varm_text.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_uchar | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const unsigned char * | op | ||
) |
PIO interface to nc_put_varm_uchar.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_uint | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const unsigned int * | op | ||
) |
PIO interface to nc_put_varm_uint.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_ulonglong | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const unsigned long long * | op | ||
) |
PIO interface to nc_put_varm_ulonglong.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_put_varm_ushort | ( | int | ncid, |
int | varid, | ||
const PIO_Offset | start[], | ||
const PIO_Offset | count[], | ||
const PIO_Offset | stride[], | ||
const PIO_Offset | imap[], | ||
const unsigned short * | op | ||
) |
PIO interface to nc_put_varm_ushort.
This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_read_darray | ( | const int | ncid, |
const int | vid, | ||
const int | ioid, | ||
const PIO_Offset | arraylen, | ||
void * | array | ||
) |
Read a field from a file to the IO library.
ncid | identifies the netCDF file |
vid | the variable ID to be read |
ioid | the I/O description ID as passed back by PIOc_InitDecomp(). |
arraylen | the length of the array to be read. This is the length of the distrubited array. That is, the length of the portion of the data that is on the processor. |
array | pointer to the data to be read. This is a pointer to the distributed portion of the array that is on this processor. |
int PIOc_redef | ( | int | ncid | ) |
The PIO-C interface for the NetCDF function nc_redef.
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__datasets.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
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.
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
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
int PIOc_rename_dim | ( | int | ncid, |
int | dimid, | ||
const char * | name | ||
) |
The PIO-C interface for the NetCDF function nc_rename_dim.
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__dimensions.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
int PIOc_rename_var | ( | int | ncid, |
int | varid, | ||
const char * | name | ||
) |
The PIO-C interface for the NetCDF function nc_rename_var.
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__variables.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
varid | the variable ID. |
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.
This function only applies to netCDF-4 files. When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
The file chunk cache for HDF5 can be set, and will apply for any files opened or created until the program ends, or the settings are changed again. The cache settings apply only to the open file. They do not persist with the file, and must be set each time the file is opened, before it is opened, if they are to have effect.
See the netCDF variable documentation for details about the operation of this function.
iotype | the iotype of files to be created or opened. |
size | size of file cache. |
nelems | number of elements in file cache. |
preemption | preemption setting for file cache. |
int PIOc_set_fill | ( | int | ncid, |
int | fillmode, | ||
int * | old_modep | ||
) |
The PIO-C interface for the NetCDF function nc_set_fill.
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__datasets.html
ncid | the ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile(). |
int PIOc_set_hint | ( | const int | iosysid, |
char | hint[], | ||
const char | hintval[] | ||
) |
Send a hint to the MPI-IO library.
int PIOc_set_log_level | ( | int | level | ) |
Set the logging level.
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. If the library is not built with logging, this function does nothing.
int PIOc_set_var_chunk_cache | ( | int | ncid, |
int | varid, | ||
PIO_Offset | size, | ||
PIO_Offset | nelems, | ||
float | preemption | ||
) |
Set chunksizes for a variable.
This function only applies to netCDF-4 files. When used with netCDF classic files, the error PIO_ENOTNC4 will be returned.
See the netCDF variable documentation for details about the operation of this function.
Chunksizes have important performance repercussions. NetCDF attempts to choose sensible chunk sizes by default, but for best performance check chunking against access patterns.
ncid | the ncid of the open file. |
varid | the ID of the variable to set chunksizes for. |
storage | NC_CONTIGUOUS or NC_CHUNKED. |
chunksizep | an array of chunksizes. Must have a chunksize for every variable dimension. |
int PIOc_setframe | ( | const int | ncid, |
const int | varid, | ||
const int | frame | ||
) |
Set the unlimited dimension of the given variable.
ncid | the ncid of the file. |
varid | the varid of the variable |
frame | the value of the unlimited dimension. In c 0 for the first record, 1 for the second |
int PIOc_strerror | ( | int | pioerr, |
char * | errmsg | ||
) |
Return a string description of an error code.
If zero is passed, a null is returned.
pioerr | the error code returned by a PIO function call. |
errmsg | Pointer that will get the error message. It will be PIO_MAX_NAME chars or less. |
int PIOc_sync | ( | int | ncid | ) |
PIO interface to nc_sync This routine is called collectively by all tasks in the communicator ios.union_comm.
Refer to the netcdf documentation.
int PIOc_write_darray | ( | const int | ncid, |
const int | vid, | ||
const int | ioid, | ||
const PIO_Offset | arraylen, | ||
void * | array, | ||
void * | fillvalue | ||
) |
Write a distributed array to the output file.
This routine aggregates output on the compute nodes and only sends it to the IO nodes when the compute buffer is full or when a flush is triggered.
ncid | the ncid of the open netCDF file. |
vid | the variable ID returned by PIOc_def_var(). |
ioid | the I/O description ID as passed back by PIOc_InitDecomp(). |
arraylen | the length of the array to be written. This is the length of the distrubited array. That is, the length of the portion of the data that is on the processor. |
array | pointer to the data to be written. This is a pointer to the distributed portion of the array that is on this processor. |
fillvalue | pointer to the fill value to be used for missing data. |