|
AccFFT
|
#include <pnetcdf.h>#include <cstdlib>#include <string>#include <iostream>Functions | |
| void | read_pnetcdf (const std::string &filename, MPI_Offset starts[3], MPI_Offset counts[3], int gsizes[3], double *localData) |
| void | write_pnetcdf (const std::string &filename, MPI_Offset starts[3], MPI_Offset counts[3], int gsizes[3], double *localData) |
For Parallel-netCDF support
| void read_pnetcdf | ( | const std::string & | filename, |
| MPI_Offset | starts[3], | ||
| MPI_Offset | counts[3], | ||
| int | gsizes[3], | ||
| double * | localData | ||
| ) |
Read a parallel-nedcdf file.
We assume here that localData is a scalar.
Pnetcdf uses row-major format (same as FFTW).
| [in] | filename | : PnetCDF filename |
| [in] | starts | : offset to where to start reading data |
| [in] | counts | : number of elements read (3D sub-domain inside global) |
| [in] | gsizes | : global sizes |
| [out] | localData | : actual data buffer (size : nx*ny*nz*sizeof(double)) |
localData must have been allocated prior to calling this routine.
| void write_pnetcdf | ( | const std::string & | filename, |
| MPI_Offset | starts[3], | ||
| MPI_Offset | counts[3], | ||
| int | gsizes[3], | ||
| double * | localData | ||
| ) |
Write a parallel-nedcdf file.
We assume here that localData is a scalar.
Pnetcdf uses row-major format (same as FFTW).
| [in] | filename | : PnetCDF filename |
| [in] | starts | : offset to where to start reading data |
| [in] | counts | : number of elements read (3D sub-domain inside global) |
| [in] | gsizes | : global sizes |
| [in] | localData | : actual data buffer (size : nx*ny*nz*sizeof(double)) |
1.8.9.1