YAKL
YAKL_pnetcdf.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <vector>
5 #include "YAKL.h"
6 #include "mpi.h"
7 #include <pnetcdf.h>
8 #include <stdexcept>
9 
11 namespace yakl {
12 
13  //Error reporting routine for the PNetCDF I/O
15  inline void ncmpiwrap( int ierr , int line ) {
16  if (ierr != NC_NOERR) {
17  std::cerr << "PNetCDF ERROR at line: " << line << std::endl;
18  throw std::runtime_error(ncmpi_strerror(ierr));
19  }
20  }
21 
22 
24  // ncmpi_put_var
26 
27  void pnetcdf_put_var(int ncid , int varid , signed char const *data) {
28  ncmpiwrap( ncmpi_put_var_schar( ncid , varid , data ) , __LINE__ );
29  }
31  void pnetcdf_put_var(int ncid , int varid , unsigned char const *data) {
32  ncmpiwrap( ncmpi_put_var_uchar( ncid , varid , data ) , __LINE__ );
33  }
35  void pnetcdf_put_var(int ncid , int varid , short const *data) {
36  ncmpiwrap( ncmpi_put_var_short( ncid , varid , data ) , __LINE__ );
37  }
39  void pnetcdf_put_var(int ncid , int varid , unsigned short const *data) {
40  ncmpiwrap( ncmpi_put_var_ushort( ncid , varid , data ) , __LINE__ );
41  }
43  void pnetcdf_put_var(int ncid , int varid , int const *data) {
44  ncmpiwrap( ncmpi_put_var_int( ncid , varid , data ) , __LINE__ );
45  }
47  void pnetcdf_put_var(int ncid , int varid , unsigned int const *data) {
48  ncmpiwrap( ncmpi_put_var_uint( ncid , varid , data ) , __LINE__ );
49  }
51  void pnetcdf_put_var(int ncid , int varid , long long const *data) {
52  ncmpiwrap( ncmpi_put_var_longlong( ncid , varid , data ) , __LINE__ );
53  }
55  void pnetcdf_put_var(int ncid , int varid , unsigned long long const *data) {
56  ncmpiwrap( ncmpi_put_var_ulonglong( ncid , varid , data ) , __LINE__ );
57  }
59  void pnetcdf_put_var(int ncid , int varid , float const *data) {
60  ncmpiwrap( ncmpi_put_var_float( ncid , varid , data ) , __LINE__ );
61  }
63  void pnetcdf_put_var(int ncid , int varid , double const *data) {
64  ncmpiwrap( ncmpi_put_var_double( ncid , varid , data ) , __LINE__ );
65  }
66 
67 
69  // ncmpi_put_var1
71 
72  void pnetcdf_put_var1(int ncid , int varid , signed char const *data) {
73  ncmpiwrap( ncmpi_put_var1_schar( ncid , varid , 0 , data ) , __LINE__ );
74  }
76  void pnetcdf_put_var1(int ncid , int varid , unsigned char const *data) {
77  ncmpiwrap( ncmpi_put_var1_uchar( ncid , varid , 0 , data ) , __LINE__ );
78  }
80  void pnetcdf_put_var1(int ncid , int varid , short const *data) {
81  ncmpiwrap( ncmpi_put_var1_short( ncid , varid , 0 , data ) , __LINE__ );
82  }
84  void pnetcdf_put_var1(int ncid , int varid , unsigned short const *data) {
85  ncmpiwrap( ncmpi_put_var1_ushort( ncid , varid , 0 , data ) , __LINE__ );
86  }
88  void pnetcdf_put_var1(int ncid , int varid , int const *data) {
89  ncmpiwrap( ncmpi_put_var1_int( ncid , varid , 0 , data ) , __LINE__ );
90  }
92  void pnetcdf_put_var1(int ncid , int varid , unsigned int const *data) {
93  ncmpiwrap( ncmpi_put_var1_uint( ncid , varid , 0 , data ) , __LINE__ );
94  }
96  void pnetcdf_put_var1(int ncid , int varid , long long const *data) {
97  ncmpiwrap( ncmpi_put_var1_longlong( ncid , varid , 0 , data ) , __LINE__ );
98  }
100  void pnetcdf_put_var1(int ncid , int varid , unsigned long long const *data) {
101  ncmpiwrap( ncmpi_put_var1_ulonglong( ncid , varid , 0 , data ) , __LINE__ );
102  }
104  void pnetcdf_put_var1(int ncid , int varid , float const *data) {
105  ncmpiwrap( ncmpi_put_var1_float( ncid , varid , 0 , data ) , __LINE__ );
106  }
108  void pnetcdf_put_var1(int ncid , int varid , double const *data) {
109  ncmpiwrap( ncmpi_put_var1_double( ncid , varid , 0 , data ) , __LINE__ );
110  }
111 
112 
114  // ncmpi_put_vara
116 
117  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , signed char const *data) {
118  ncmpiwrap( ncmpi_put_vara_schar( ncid , varid , start , count , data ) , __LINE__ );
119  }
121  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , unsigned char const *data) {
122  ncmpiwrap( ncmpi_put_vara_uchar( ncid , varid , start , count , data ) , __LINE__ );
123  }
125  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , short const *data) {
126  ncmpiwrap( ncmpi_put_vara_short( ncid , varid , start , count , data ) , __LINE__ );
127  }
129  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , unsigned short const *data) {
130  ncmpiwrap( ncmpi_put_vara_ushort( ncid , varid , start , count , data ) , __LINE__ );
131  }
133  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , int const *data) {
134  ncmpiwrap( ncmpi_put_vara_int( ncid , varid , start , count , data ) , __LINE__ );
135  }
137  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , unsigned int const *data) {
138  ncmpiwrap( ncmpi_put_vara_uint( ncid , varid , start , count , data ) , __LINE__ );
139  }
141  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , long long const *data) {
142  ncmpiwrap( ncmpi_put_vara_longlong( ncid , varid , start , count , data ) , __LINE__ );
143  }
145  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , unsigned long long const *data) {
146  ncmpiwrap( ncmpi_put_vara_ulonglong( ncid , varid , start , count , data ) , __LINE__ );
147  }
149  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , float const *data) {
150  ncmpiwrap( ncmpi_put_vara_float( ncid , varid , start , count , data ) , __LINE__ );
151  }
153  void pnetcdf_put_vara(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , double const *data) {
154  ncmpiwrap( ncmpi_put_vara_double( ncid , varid , start , count , data ) , __LINE__ );
155  }
156 
157 
159  // ncmpi_put_vara_all
161 
162  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , signed char const *data) {
163  ncmpiwrap( ncmpi_put_vara_schar_all( ncid , varid , start , count , data ) , __LINE__ );
164  }
166  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , unsigned char const *data) {
167  ncmpiwrap( ncmpi_put_vara_uchar_all( ncid , varid , start , count , data ) , __LINE__ );
168  }
170  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , short const *data) {
171  ncmpiwrap( ncmpi_put_vara_short_all( ncid , varid , start , count , data ) , __LINE__ );
172  }
174  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , unsigned short const *data) {
175  ncmpiwrap( ncmpi_put_vara_ushort_all( ncid , varid , start , count , data ) , __LINE__ );
176  }
178  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , int const *data) {
179  ncmpiwrap( ncmpi_put_vara_int_all( ncid , varid , start , count , data ) , __LINE__ );
180  }
182  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , unsigned int const *data) {
183  ncmpiwrap( ncmpi_put_vara_uint_all( ncid , varid , start , count , data ) , __LINE__ );
184  }
186  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , long long const *data) {
187  ncmpiwrap( ncmpi_put_vara_longlong_all( ncid , varid , start , count , data ) , __LINE__ );
188  }
190  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , unsigned long long const *data) {
191  ncmpiwrap( ncmpi_put_vara_ulonglong_all( ncid , varid , start , count , data ) , __LINE__ );
192  }
194  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , float const *data) {
195  ncmpiwrap( ncmpi_put_vara_float_all( ncid , varid , start , count , data ) , __LINE__ );
196  }
198  void pnetcdf_put_vara_all(int ncid , int varid , MPI_Offset const start[] , MPI_Offset const count[] , double const *data) {
199  ncmpiwrap( ncmpi_put_vara_double_all( ncid , varid , start , count , data ) , __LINE__ );
200  }
201 
202 
205  protected:
206 
208  int ncid;
209 
210  public:
211 
213  ncid = -1;
214  }
215 
216 
218  close();
219  }
220 
221 
223  SimplePNetCDF(SimplePNetCDF &&in) = delete;
225  SimplePNetCDF(SimplePNetCDF const &in) = delete;
227  SimplePNetCDF &operator=(SimplePNetCDF &&in) = delete;
229  SimplePNetCDF &operator=(SimplePNetCDF const &in) = delete;
230 
231 
233  void open(std::string fname) {
234  close();
235  ncmpiwrap( ncmpi_open( MPI_COMM_WORLD , fname.c_str() , NC_WRITE , MPI_INFO_NULL , &ncid ) , __LINE__ );
236  }
237 
238 
240  void create(std::string fname , int flag = -1 ) {
241  close();
242  if (flag >= 0) {
243  ncmpiwrap( ncmpi_create( MPI_COMM_WORLD , fname.c_str() , flag , MPI_INFO_NULL , &ncid ) , __LINE__ );
244  } else {
245  ncmpiwrap( ncmpi_create( MPI_COMM_WORLD , fname.c_str() , NC_CLOBBER , MPI_INFO_NULL , &ncid ) , __LINE__ );
246  }
247  }
248 
249 
251  void close() {
252  if (ncid != -1) {
253  ncmpiwrap( ncmpi_close(ncid) , __LINE__ );
254  }
255  ncid = -1;
256  }
257 
258 
260  int get_dim_id( std::string dimName ) const {
261  int dimid;
262  ncmpiwrap( ncmpi_inq_dimid( ncid , dimName.c_str() , &dimid) , __LINE__ );
263  return dimid;
264  }
265 
266 
268  int get_var_id( std::string varName ) const {
269  int varid;
270  ncmpiwrap( ncmpi_inq_varid( ncid , varName.c_str() , &varid) , __LINE__ );
271  return varid;
272  }
273 
274 
276  bool var_exists( std::string varName ) const {
277  int varid;
278  int ierr = ncmpi_inq_varid( ncid , varName.c_str() , &varid);
279  if (ierr == NC_NOERR) {
280  return true;
281  } else {
282  return false;
283  }
284  }
285 
286 
288  bool dim_exists( std::string dimName ) const {
289  int dimid;
290  int ierr = ncmpi_inq_dimid( ncid , dimName.c_str() , &dimid);
291  if (ierr == NC_NOERR) {
292  return true;
293  } else {
294  return false;
295  }
296  }
297 
298 
300  MPI_Offset get_dim_size( std::string dimName ) const {
301  int dimid;
302  MPI_Offset dimlen;
303  ncmpiwrap( ncmpi_inq_dimid ( ncid , dimName.c_str() , &dimid) , __LINE__ );
304  ncmpiwrap( ncmpi_inq_dimlen( ncid , dimid , &dimlen ) , __LINE__ );
305  return dimlen;
306  }
307 
308 
310  template <class T>
311  void create_var( std::string varName , std::vector<std::string> dnames ) {
312  int ndims = dnames.size();
313  std::vector<int> dimids(ndims);
314  for (int i=0; i < ndims; i++) {
315  dimids[i] = get_dim_id( dnames[i] );
316  }
317  nc_type xtype = getType<T>();
318  int varid;
319  ncmpiwrap( ncmpi_def_var( ncid , varName.c_str() , xtype , ndims , dimids.data() , &varid ) , __LINE__ );
320  }
321 
322 
324  void create_dim( std::string dimName , MPI_Offset len ) {
325  int dimid;
326  ncmpiwrap( ncmpi_def_dim( ncid , dimName.c_str() , len , &dimid ) , __LINE__ );
327  }
328 
329 
331  void create_unlim_dim( std::string dimName ) {
332  int dimid;
333  ncmpiwrap( ncmpi_def_dim( ncid , dimName.c_str() , NC_UNLIMITED , &dimid ) , __LINE__ );
334  }
335 
336 
338  void enddef() {
339  ncmpiwrap( ncmpi_enddef(ncid) , __LINE__ );
340  }
341 
342 
345  ncmpiwrap( ncmpi_begin_indep_data(ncid) , __LINE__ );
346  }
347 
348 
350  void end_indep_data() {
351  ncmpiwrap( ncmpi_end_indep_data(ncid) , __LINE__ );
352  }
353 
354 
356  template <class T, int rank, int myMem, int myStyle>
357  void write(Array<T,rank,myMem,myStyle> const &arr , std::string varName) {
358  int varid = get_var_id( varName );
359  pnetcdf_put_var( ncid , varid , arr.data() );
360  }
361 
362 
364  template <class T, int rank, int myMem, int myStyle>
365  void write_all(Array<T,rank,myMem,myStyle> const &arr , std::string varName , std::vector<MPI_Offset> start ) {
366  if (rank != start .size()) { yakl_throw("start.size() != Array's rank"); }
367  std::vector<MPI_Offset> count(rank);
368  for (int i=0; i < rank; i++) {
369  count[i] = arr.extent(i);
370  }
371 
372  int varid = get_var_id(varName);
373 
374  if (myMem == memDevice) {
375  pnetcdf_put_vara_all( ncid , varid , start.data() , count.data() , arr.createHostCopy().data() );
376  } else {
377  pnetcdf_put_vara_all( ncid , varid , start.data() , count.data() , arr.data() );
378  }
379  }
380 
381 
383  template <class T, typename std::enable_if<std::is_arithmetic<T>::value,int>::type = 0 >
384  void write1(T val , std::string varName , int ind , std::string ulDimName="unlim" ) {
385  int varid = get_var_id(varName);
386 
387  std::vector<MPI_Offset> start(1);
388  std::vector<MPI_Offset> count(1);
389  start[0] = ind;
390  count[0] = 1;
391 
392  pnetcdf_put_vara( ncid , varid , start.data() , count.data() , &val );
393  }
394 
395 
397  template <class T, int rank, int myMem, int myStyle>
398  void write1(Array<T,rank,myMem,myStyle> const &arr , std::string varName ,
399  int ind , std::string ulDimName="unlim" ) {
400  std::vector<MPI_Offset> start(rank+1);
401  std::vector<MPI_Offset> count(rank+1);
402  start[0] = ind;
403  count[0] = 1;
404  for (int i=1; i < rank+1; i++) {
405  start[i] = 0;
406  count[i] = arr.extent(i-1);
407  }
408 
409  int varid = get_var_id(varName);
410 
411  if (myMem == memDevice) {
412  pnetcdf_put_vara( ncid , varid , start.data() , count.data() , arr.createHostCopy().data() );
413  } else {
414  pnetcdf_put_vara( ncid , varid , start.data() , count.data() , arr.data() );
415  }
416  }
417 
418 
420  template <class T, int rank, int myMem, int myStyle>
421  void write1_all(Array<T,rank,myMem,myStyle> const &arr , std::string varName ,
422  int ind , std::vector<MPI_Offset> start_in , std::string ulDimName="unlim" ) {
423  if (rank != start_in.size()) { yakl_throw("start_in.size() != Array's rank"); }
424  std::vector<MPI_Offset> start(rank+1);
425  std::vector<MPI_Offset> count(rank+1);
426  start[0] = ind;
427  count[0] = 1;
428  for (int i=1; i < rank+1; i++) {
429  start[i] = start_in[i-1];
430  count[i] = arr.extent(i-1);
431  }
432 
433  int varid = get_var_id(varName);
434 
435  if (myMem == memDevice) {
436  pnetcdf_put_vara_all( ncid , varid , start.data() , count.data() , arr.createHostCopy().data() );
437  } else {
438  pnetcdf_put_vara_all( ncid , varid , start.data() , count.data() , arr.data() );
439  }
440  }
441 
442 
443  // /***************************************************************************************************
444  // Serially read an entire Array
445  // ***************************************************************************************************/
446  // template <class T, int rank, int myMem, int myStyle>
447  // void read(Array<T,rank,myMem,myStyle> &arr , std::string varName) {
448 
449  // auto var = file->getVar(varName);
450 
451  // if (myMem == memDevice) {
452  // auto arrHost = arr.createHostCopy();
453  // var.getVar(arrHost.data());
454  // arrHost.deep_copy_to(arr);
455  // } else {
456  // var.getVar(arr.data());
457  // }
458  // }
459 
460 
461  // /***************************************************************************************************
462  // Collectively read an entire Array
463  // ***************************************************************************************************/
464  // template <class T, int rank, int myMem, int myStyle>
465  // void read_all(Array<T,rank,myMem,myStyle> &arr , std::string varName , std::vector<MPI_Offset> start ) {
466  // if (start.size() != rank) { yakl_throw("ERROR: start.size() != arr's rank"); }
467 
468  // auto var = file->getVar(varName);
469 
470  // std::vector<MPI_Offset> count(rank);
471  // for (int i=0; i < rank; i++) {
472  // count[i] = arr.extent(i);
473  // }
474 
475  // if (myMem == memDevice) {
476  // auto arrHost = arr.createHostCopy();
477  // var.getVar_all( start , count , arrHost.data() );
478  // arrHost.deep_copy_to(arr);
479  // } else {
480  // var.getVar_all( start , count , arr.data() );
481  // }
482  // }
483 
484 
485  // /***************************************************************************************************
486  // Read a single scalar value
487  // ***************************************************************************************************/
488  // template <class T>
489  // void read(T &arr , std::string varName) {
490  // auto var = file->getVar(varName);
491  // var.getVar(&arr);
492  // }
493 
494 
495  // /***************************************************************************************************
496  // Write a single scalar value
497  // ***************************************************************************************************/
498  // template <class T>
499  // void write(T arr , std::string varName) {
500  // auto var = file->getVar(varName);
501  // var.putVar(&arr);
502  // }
503 
504 
505  /***************************************************************************************************
506  Determine the type of a template T
507  ***************************************************************************************************/
509  template <class T> nc_type getType() const {
510  if ( std::is_same<T, char>::value ) { return NC_CHAR; }
511  else if ( std::is_same<T,unsigned char>::value ) { return NC_UBYTE; }
512  else if ( std::is_same<T, short>::value ) { return NC_SHORT; }
513  else if ( std::is_same<T,unsigned short>::value ) { return NC_USHORT; }
514  else if ( std::is_same<T, int>::value ) { return NC_INT; }
515  else if ( std::is_same<T,unsigned int>::value ) { return NC_UINT; }
516  else if ( std::is_same<T, long>::value ) { return NC_INT64; }
517  else if ( std::is_same<T,unsigned long>::value ) { return NC_UINT64; }
518  else if ( std::is_same<T, float>::value ) { return NC_FLOAT; }
519  else if ( std::is_same<T, double>::value ) { return NC_DOUBLE; }
520  else { yakl_throw("Invalid type"); }
521  return -1;
522  }
523 
524  };
525 
526 }
528 
529 
yakl::SimplePNetCDF::create_dim
void create_dim(std::string dimName, MPI_Offset len)
Create a dimension with the given size.
Definition: YAKL_pnetcdf.h:324
yakl::intrinsics::size
YAKL_INLINE int size(T const &arr, int dim)
Definition: YAKL_intrinsics_size.h:9
yakl::memDevice
constexpr int memDevice
Specifies a device memory address space for a yakl::Array object.
Definition: YAKL_memory_spaces.h:13
yakl::SimplePNetCDF::open
void open(std::string fname)
Open a file.
Definition: YAKL_pnetcdf.h:233
yakl::SimplePNetCDF::get_var_id
int get_var_id(std::string varName) const
Get variable ID of a variable name.
Definition: YAKL_pnetcdf.h:268
yakl::SimplePNetCDF::write1_all
void write1_all(Array< T, rank, myMem, myStyle > const &arr, std::string varName, int ind, std::vector< MPI_Offset > start_in, std::string ulDimName="unlim")
Collectively write one entry of an Array into the unlimited index.
Definition: YAKL_pnetcdf.h:421
YAKL.h
yakl::intrinsics::count
int count(Array< bool, rank, memHost, myStyle > const &mask)
Definition: YAKL_intrinsics_count.h:10
yakl::SimplePNetCDF::write
void write(Array< T, rank, myMem, myStyle > const &arr, std::string varName)
Serially write an entire Array at once.
Definition: YAKL_pnetcdf.h:357
yakl::SimplePNetCDF::write1
void write1(Array< T, rank, myMem, myStyle > const &arr, std::string varName, int ind, std::string ulDimName="unlim")
Serially write one entry of an Array into the unlimited index.
Definition: YAKL_pnetcdf.h:398
yakl::SimplePNetCDF::create_unlim_dim
void create_unlim_dim(std::string dimName)
Create an unlimited dimension.
Definition: YAKL_pnetcdf.h:331
yakl::SimplePNetCDF
Simple way to write yakl::Array objects to NetCDF files in parallel.
Definition: YAKL_pnetcdf.h:204
__YAKL_NAMESPACE_WRAPPER_BEGIN__
#define __YAKL_NAMESPACE_WRAPPER_BEGIN__
Definition: YAKL.h:19
yakl::SimplePNetCDF::enddef
void enddef()
End "define mode".
Definition: YAKL_pnetcdf.h:338
yakl::SimplePNetCDF::dim_exists
bool dim_exists(std::string dimName) const
Determine if a dimension exists.
Definition: YAKL_pnetcdf.h:288
yakl::SimplePNetCDF::create
void create(std::string fname, int flag=-1)
Create a file with an optional flag parameter.
Definition: YAKL_pnetcdf.h:240
yakl::SimplePNetCDF::write1
void write1(T val, std::string varName, int ind, std::string ulDimName="unlim")
Serially write one entry of a scalar into the unlimited index.
Definition: YAKL_pnetcdf.h:384
yakl::SimplePNetCDF::var_exists
bool var_exists(std::string varName) const
Determine if a variable exists.
Definition: YAKL_pnetcdf.h:276
yakl::SimplePNetCDF::get_dim_id
int get_dim_id(std::string dimName) const
Get dimension ID of a dimension name.
Definition: YAKL_pnetcdf.h:260
yakl::SimplePNetCDF::SimplePNetCDF
SimplePNetCDF()
Definition: YAKL_pnetcdf.h:212
yakl::yakl_throw
YAKL_INLINE void yakl_throw(const char *msg)
Throw an error message. Works from the host or device.
Definition: YAKL_error.h:17
yakl::SimplePNetCDF::write_all
void write_all(Array< T, rank, myMem, myStyle > const &arr, std::string varName, std::vector< MPI_Offset > start)
Collectively write an entire Array at once.
Definition: YAKL_pnetcdf.h:365
yakl::SimplePNetCDF::create_var
void create_var(std::string varName, std::vector< std::string > dnames)
Create a variable with the given dimension names.
Definition: YAKL_pnetcdf.h:311
yakl::Array
This declares the yakl::Array class. Please see the yakl::styleC and yakl::styleFortran template spec...
Definition: YAKL_Array.h:40
yakl::SimplePNetCDF::begin_indep_data
void begin_indep_data()
Begin independent data writing mode (non-collective data writing)
Definition: YAKL_pnetcdf.h:344
yakl::SimplePNetCDF::~SimplePNetCDF
~SimplePNetCDF()
Definition: YAKL_pnetcdf.h:217
yakl
yakl::SimplePNetCDF::end_indep_data
void end_indep_data()
End independent data writing mode (non-collective data writing)
Definition: YAKL_pnetcdf.h:350
yakl::SimplePNetCDF::get_dim_size
MPI_Offset get_dim_size(std::string dimName) const
Get the size of a dimension name.
Definition: YAKL_pnetcdf.h:300
yakl::SimplePNetCDF::close
void close()
Close a file.
Definition: YAKL_pnetcdf.h:251