19#include "pism/util/io/NC4_Par.hh"
20#include "pism/util/error_handling.hh"
21#include "pism/util/io/IO_Flags.hh"
29#include <netcdf_meta.h>
31#if (NC_HAS_PARALLEL4 != 1)
32#error "Selected NetCDF library does not support parallel I/O"
35#include <netcdf_par.h>
43 if (return_code != NC_NOERR) {
49 MPI_Info info = MPI_INFO_NULL;
53 open_mode = open_mode | NC_MPIIO;
55 stat = nc_open_par(fname.c_str(), open_mode,
m_com, info, &
m_file_id);
61 MPI_Info info = MPI_INFO_NULL;
64 stat = nc_create_par(fname.c_str(),
65 NC_NETCDF4 | NC_MPIIO,
75 stat = nc_var_par_access(
m_file_id, varid, NC_COLLECTIVE);
unsigned int m_compression_level
virtual void set_compression_level_impl(int level) const
virtual void open_impl(const std::string &filename, io::Mode mode)
virtual void set_access_mode(int varid) const
virtual void create_impl(const std::string &filename)
#define PISM_ERROR_LOCATION
@ PISM_READONLY
open an existing file for reading only
static void check(const ErrorLocation &where, int return_code)
Prints an error message; for debugging.