Changeset 1639 for XIOS/trunk/src/io
- Timestamp:
- 01/22/19 16:43:32 (5 years ago)
- Location:
- XIOS/trunk/src/io
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/io/inetcdf4.cpp
r1638 r1639 7 7 namespace xios 8 8 { 9 CINetCDF4::CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/,9 CINetCDF4::CINetCDF4(const StdString& filename, const MPI_Comm* comm /*= NULL*/, bool multifile /*= true*/, 10 10 bool readMetaDataPar /*= false*/, const StdString& timeCounterName /*= "time_counter"*/) 11 11 { … … 14 14 { 15 15 int commSize = 0; 16 ep_lib::MPI_Comm_size(*comm, &commSize);16 MPI_Comm_size(*comm, &commSize); 17 17 if (commSize <= 1) 18 18 comm = NULL; … … 23 23 // even if Parallel NetCDF ends up being used. 24 24 if (mpi) 25 CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *comm, EP_INFO_NULL, this->ncidp);25 CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *comm, MPI_INFO_NULL, this->ncidp); 26 26 else 27 27 CNetCdfInterface::open(filename, NC_NOWRITE, this->ncidp); -
XIOS/trunk/src/io/inetcdf4.hpp
r1638 r1639 22 22 public: 23 23 /// Constructors /// 24 CINetCDF4(const StdString& filename, const ep_lib::MPI_Comm* comm = NULL, bool multifile = true,24 CINetCDF4(const StdString& filename, const MPI_Comm* comm = NULL, bool multifile = true, 25 25 bool readMetaDataPar = false, const StdString& timeCounterName = "time_counter"); 26 26 -
XIOS/trunk/src/io/nc4_data_input.cpp
r1638 r1639 10 10 namespace xios 11 11 { 12 CNc4DataInput::CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective /*= true*/,12 CNc4DataInput::CNc4DataInput(const StdString& filename, MPI_Comm comm_file, bool multifile, bool isCollective /*= true*/, 13 13 bool readMetaDataPar /*= false*/, bool ugridConvention /*= false*/, const StdString& timeCounterName /*= "time_counter"*/) 14 14 : SuperClass() -
XIOS/trunk/src/io/nc4_data_input.hpp
r1638 r1639 23 23 24 24 /// Constructors /// 25 CNc4DataInput(const StdString& filename, ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective = true,25 CNc4DataInput(const StdString& filename, MPI_Comm comm_file, bool multifile, bool isCollective = true, 26 26 bool readMetaDataPar = false, bool ugridConvention = false, const StdString& timeCounterName = "time_counter"); 27 27 CNc4DataInput(const CNc4DataInput& dataInput); // Not implemented. … … 70 70 private: 71 71 /// Private attributes /// 72 ep_lib::MPI_Comm comm_file;72 MPI_Comm comm_file; 73 73 const StdString filename; 74 74 bool isCollective; -
XIOS/trunk/src/io/nc4_data_output.cpp
r1638 r1639 28 28 CNc4DataOutput::CNc4DataOutput 29 29 (CFile* file, const StdString & filename, bool exist, bool useClassicFormat, bool useCFConvention, 30 ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective, const StdString& timeCounterName)30 MPI_Comm comm_file, bool multifile, bool isCollective, const StdString& timeCounterName) 31 31 : SuperClass() 32 32 , SuperClassWriter(filename, exist, useClassicFormat, useCFConvention, &comm_file, multifile, timeCounterName) -
XIOS/trunk/src/io/nc4_data_output.hpp
r1638 r1639 27 27 (CFile* file, const StdString & filename, bool exist, bool useClassicFormat, 28 28 bool useCFConvention, 29 ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective = true,29 MPI_Comm comm_file, bool multifile, bool isCollective = true, 30 30 const StdString& timeCounterName = "time_counter"); 31 31 … … 117 117 118 118 /// Propriétés privées /// 119 ep_lib::MPI_Comm comm_file;119 MPI_Comm comm_file; 120 120 const StdString filename; 121 121 std::map<Time, StdSize> timeToRecordCache; -
XIOS/trunk/src/io/netCdfInterface.cpp
r1638 r1639 10 10 #include "netCdfInterface.hpp" 11 11 #include "netCdfException.hpp" 12 #include "ep_mpi.hpp" 12 13 13 namespace xios 14 14 { … … 47 47 \return Status code 48 48 */ 49 int CNetCdfInterface::createPar(const StdString& fileName, int cMode, ep_lib::MPI_Comm comm, ep_lib::MPI_Info info, int& ncId) 50 { 51 #ifdef _usingMPI 49 int CNetCdfInterface::createPar(const StdString& fileName, int cMode, MPI_Comm comm, MPI_Info info, int& ncId) 50 { 52 51 int status = xios::nc_create_par(fileName.c_str(), cMode, comm, info, &ncId); 53 #elif _usingEP54 int status = xios::nc_create_par(fileName.c_str(), cMode, to_mpi_comm(comm->mpi_comm), to_mpi_info(info), &ncId);55 #endif56 52 if (NC_NOERR != status) 57 53 { … … 104 100 \return Status code 105 101 */ 106 int CNetCdfInterface::openPar(const StdString& fileName, int oMode, ep_lib::MPI_Comm comm, ep_lib::MPI_Info info, int& ncId) 107 { 108 #ifdef _usingMPI 102 int CNetCdfInterface::openPar(const StdString& fileName, int oMode, MPI_Comm comm, MPI_Info info, int& ncId) 103 { 109 104 int status = xios::nc_open_par(fileName.c_str(), oMode, comm, info, &ncId); 110 #elif _usingEP111 int status = xios::nc_open_par(fileName.c_str(), oMode, to_mpi_comm(comm->mpi_comm), to_mpi_info(info), &ncId);112 #endif113 105 if (NC_NOERR != status) 114 106 { -
XIOS/trunk/src/io/netCdfInterface.hpp
r1638 r1639 32 32 33 33 //! Create a netcdf file on a parallel file system 34 static int createPar(const StdString& path, int cmode, ep_lib::MPI_Comm comm, ep_lib::MPI_Info info, int& ncId);34 static int createPar(const StdString& path, int cmode, MPI_Comm comm, MPI_Info info, int& ncId); 35 35 36 36 //! Open a netcdf file … … 38 38 39 39 //! Open a netcdf file 40 static int openPar(const StdString& path, int cmode, ep_lib::MPI_Comm comm, ep_lib::MPI_Info info, int& ncId);40 static int openPar(const StdString& path, int cmode, MPI_Comm comm, MPI_Info info, int& ncId); 41 41 42 42 //! Close a netcdf file -
XIOS/trunk/src/io/onetcdf4.cpp
r1638 r1639 15 15 CONetCDF4::CONetCDF4(const StdString& filename, bool append, bool useClassicFormat, 16 16 bool useCFConvention, 17 const ep_lib::MPI_Comm* comm, bool multifile, const StdString& timeCounterName)17 const MPI_Comm* comm, bool multifile, const StdString& timeCounterName) 18 18 : path() 19 19 , wmpi(false) … … 33 33 34 34 void CONetCDF4::initialize(const StdString& filename, bool append, bool useClassicFormat, bool useCFConvention, 35 const ep_lib::MPI_Comm* comm, bool multifile, const StdString& timeCounterName)35 const MPI_Comm* comm, bool multifile, const StdString& timeCounterName) 36 36 { 37 37 this->useClassicFormat = useClassicFormat; … … 44 44 { 45 45 int commSize = 0; 46 ep_lib::MPI_Comm_size(*comm, &commSize);46 MPI_Comm_size(*comm, &commSize); 47 47 if (commSize <= 1) 48 48 comm = NULL; … … 58 58 CTimer::get("Files : create").resume(); 59 59 if (wmpi) 60 CNetCdfInterface::createPar(filename, mode, *comm, EP_INFO_NULL, this->ncidp);60 CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL, this->ncidp); 61 61 else 62 62 CNetCdfInterface::create(filename, mode, this->ncidp); … … 70 70 CTimer::get("Files : open").resume(); 71 71 if (wmpi) 72 CNetCdfInterface::openPar(filename, mode, *comm, EP_INFO_NULL, this->ncidp);72 CNetCdfInterface::openPar(filename, mode, *comm, MPI_INFO_NULL, this->ncidp); 73 73 else 74 74 CNetCdfInterface::open(filename, mode, this->ncidp); -
XIOS/trunk/src/io/onetcdf4.hpp
r1638 r1639 28 28 CONetCDF4(const StdString& filename, bool append, bool useClassicFormat = false, 29 29 bool useCFConvention = true, 30 const ep_lib::MPI_Comm* comm = NULL, bool multifile = true,30 const MPI_Comm* comm = NULL, bool multifile = true, 31 31 const StdString& timeCounterName = "time_counter"); 32 32 … … 37 37 /// Initialisation /// 38 38 void initialize(const StdString& filename, bool append, bool useClassicFormat, bool useCFConvention, 39 const ep_lib::MPI_Comm* comm, bool multifile, const StdString& timeCounterName);39 const MPI_Comm* comm, bool multifile, const StdString& timeCounterName); 40 40 void close(void); 41 41 void sync(void);
Note: See TracChangeset
for help on using the changeset viewer.