29
29
 
#endif
30
30
 
31
31
 
// In some MPI implementations MPI_OFFSET is not properly defined.  
32
32
 
#ifndef MPI_OFFSET
33
33
 
#define MPI_OFFSET  MPI_LONG_LONG
34
34
 
#endif
35
35
 
36
36
 
#define PIO_OFFSET MPI_OFFSET
37
37
 
#define PIO_Offset MPI_Offset
38
38
 
#define PIO_MAX_VARS NC_MAX_VARS
39
 
-
#define PIO_MAX_REQUESTS 2000
40
39
 
41
40
 
42
41
 
/**
43
42
 
 * @brief Variable description structure
44
43
 
 *
45
44
 
 * The variable record is the index into the unlimited dimension in the netcdf file
46
45
 
 *  typically this is the time dimension.
47
46
 
 *  ndims is the number of dimensions on the file for this variable 
48
47
 
 *  request is the id of each outstanding pnetcdf request for this variable
49
48
 
 *  nreqs is the number of outstanding pnetcdf requests for this variable 
50
49
 
 *  fillbuf is a memory buffer to hold fill values for this variable (write only)
51
50
 
 *  iobuf is a memory buffer to hold (write only)
52
51
 
*/
53
52
 
typedef struct var_desc_t
54
53
 
{
55
54
 
  int record; 
56
55
 
  int ndims;
57
56
 
58
 
-
  int request[PIO_MAX_REQUESTS]; // used for pnetcdf iput calls
 
57
+
  int *request; // used for pnetcdf iput calls
59
58
 
  int nreqs;
60
59
 
  void *fillbuf;
61
60
 
  void *iobuf;
62
61
 
63
62
 
} var_desc_t;
64
63
 
65
64
 
/**
66
65
 
 * @brief io region structure
67
66
 
 *
68
67
 
 * Each IO region is a unit of data which can be described using start and count
Show more
185
184
 
 * This structure holds information associated with each open file
186
185
 
 * 
187
186
 
*/
188
187
 
typedef struct file_desc_t
189
188
 
{
190
189
 
  iosystem_desc_t *iosystem;
191
190
 
  PIO_Offset buffsize;
192
191
 
  int fh;
193
192
 
  int iotype;
194
193
 
  struct var_desc_t varlist[PIO_MAX_VARS];
195
 
-
  //  int request[PIO_MAX_REQUESTS];   // request associated with buffered data for pnetcdf (not an MPI_Request)
196
 
-
  int nreq;
197
194
 
  int mode;
198
195
 
  struct wmulti_buffer buffer;
199
196
 
  struct file_desc_t *next;
200
197
 
} file_desc_t;
201
198
 
202
199
 
/**
203
200
 
 * @brief These are the supported output formats
204
201
 
 *
205
202
 
*/
206
203