Changeset 1328 for XIOS/dev/branch_openmp/src/io/inetcdf4.cpp
- Timestamp:
- 11/15/17 12:14:34 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/io/inetcdf4.cpp
r1287 r1328 4 4 5 5 #include <boost/algorithm/string.hpp> 6 // mpi_std.hpp7 #ifdef _usingEP8 #include "ep_declaration.hpp"9 #endif10 6 11 7 namespace xios 12 8 { 13 CINetCDF4::CINetCDF4(const StdString& filename, const MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/, const StdString& timeCounterName /*= "time_counter"*/)9 CINetCDF4::CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/, const StdString& timeCounterName /*= "time_counter"*/) 14 10 { 15 11 // Don't use parallel mode if there is only one process … … 17 13 { 18 14 int commSize = 0; 19 MPI_Comm_size(*comm, &commSize);15 ep_lib::MPI_Comm_size(*comm, &commSize); 20 16 if (commSize <= 1) 21 17 comm = NULL; 22 18 } 23 24 19 mpi = comm && !multifile; 25 MPI_Info m_info = MPI_INFO_NULL.mpi_info;20 ep_lib::MPI_Info info_null; 26 21 27 22 // The file format will be detected automatically by NetCDF, it is safe to always set NC_MPIIO 28 23 // even if Parallel NetCDF ends up being used. 29 24 if (mpi) 30 CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *comm, m_info, this->ncidp); 25 //CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *comm, info_null, this->ncidp); 26 CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, static_cast<MPI_Comm>(comm->mpi_comm), info_null.mpi_info, this->ncidp); 31 27 else 32 28 CNetCdfInterface::open(filename, NC_NOWRITE, this->ncidp);
Note: See TracChangeset
for help on using the changeset viewer.