Changeset 1053 for XIOS/dev/branch_yushan/src/io
- Timestamp:
- 02/17/17 17:55:37 (7 years ago)
- Location:
- XIOS/dev/branch_yushan/src/io
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/src/io/inetcdf4.cpp
r948 r1053 18 18 } 19 19 mpi = comm && !multifile; 20 MPI_Info m_info; 20 21 21 22 // The file format will be detected automatically by NetCDF, it is safe to always set NC_MPIIO 22 23 // even if Parallel NetCDF ends up being used. 23 24 if (mpi) 24 CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *comm, MPI_INFO_NULL, this->ncidp);25 CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *comm, m_info, this->ncidp); 25 26 else 26 27 CNetCdfInterface::open(filename, NC_NOWRITE, this->ncidp); -
XIOS/dev/branch_yushan/src/io/inetcdf4.hpp
r802 r1053 7 7 #include "array_new.hpp" 8 8 9 #include "mpi .hpp"9 #include "mpi_std.hpp" 10 10 #include "netcdf.hpp" 11 11 -
XIOS/dev/branch_yushan/src/io/nc4_data_output.cpp
r1037 r1053 26 26 CNc4DataOutput::CNc4DataOutput 27 27 (const StdString & filename, bool exist, bool useClassicFormat, bool useCFConvention, 28 MPI_Comm comm_file, bool multifile, bool isCollective, const StdString& timeCounterName)28 ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective, const StdString& timeCounterName) 29 29 : SuperClass() 30 30 , SuperClassWriter(filename, exist, useClassicFormat, useCFConvention, &comm_file, multifile, timeCounterName) … … 450 450 StdString domainName = domain->name; 451 451 domain->assignMesh(domainName, domain->nvertex); 452 domain->mesh->createMeshEpsilon(s erver->intraComm, domain->lonvalue_srv, domain->latvalue_srv, domain->bounds_lon_srv, domain->bounds_lat_srv);452 domain->mesh->createMeshEpsilon(static_cast<MPI_Comm>(server->intraComm.mpi_comm), domain->lonvalue_srv, domain->latvalue_srv, domain->bounds_lon_srv, domain->bounds_lat_srv); 453 453 454 454 StdString node_x = domainName + "_node_x"; -
XIOS/dev/branch_yushan/src/io/nc4_data_output.hpp
r887 r1053 27 27 (const StdString & filename, bool exist, bool useClassicFormat, 28 28 bool useCFConvention, 29 MPI_Comm comm_file, bool multifile, bool isCollective = true,29 ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective = true, 30 30 const StdString& timeCounterName = "time_counter"); 31 31 … … 116 116 117 117 /// Propriétés privées /// 118 MPI_Comm comm_file;118 ep_lib::MPI_Comm comm_file; 119 119 const StdString filename; 120 120 std::map<Time, StdSize> timeToRecordCache; -
XIOS/dev/branch_yushan/src/io/netCdfInterface.hpp
r1037 r1053 16 16 #endif 17 17 18 #include "mpi.hpp" 19 //#include <mpi.h> 18 #include "mpi_std.hpp" 20 19 #include "netcdf.hpp" 21 20 -
XIOS/dev/branch_yushan/src/io/netcdf.hpp
r685 r1053 1 1 #ifndef __XIOS_NETCDF_HPP__ 2 2 #define __XIOS_NETCDF_HPP__ 3 #include "mpi .hpp"3 #include "mpi_std.hpp" 4 4 #define MPI_INCLUDED 5 5 #include <netcdf.h> … … 18 18 extern "C" 19 19 { 20 #include <netcdf_par.h>20 #include <netcdf_par.h> 21 21 } 22 22 # endif … … 30 30 namespace xios 31 31 { 32 inline int nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info,int *ncidp)32 inline int nc_create_par(const char *path, int cmode, ep_lib::MPI_Comm comm, MPI_Info info,int *ncidp) 33 33 { 34 34 #if defined(USING_NETCDF_PAR) 35 return ::nc_create_par(path, cmode, comm, info, ncidp) ;35 return ::nc_create_par(path, cmode, static_cast<MPI_Comm>(comm.mpi_comm), info, ncidp) ; 36 36 #else 37 37 ERROR("int nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info,int *ncidp)", … … 41 41 } 42 42 43 inline int nc_open_par(const char *path, int mode, MPI_Comm comm, MPI_Info info,int *ncidp)43 inline int nc_open_par(const char *path, int mode, ep_lib::MPI_Comm comm, MPI_Info info,int *ncidp) 44 44 { 45 45 #if defined(USING_NETCDF_PAR) 46 return ::nc_open_par(path, mode, comm, info, ncidp) ;46 return ::nc_open_par(path, mode, static_cast<MPI_Comm>(comm.mpi_comm), info, ncidp) ; 47 47 #else 48 48 ERROR("int nc_open_par(const char *path, int mode, MPI_Comm comm, MPI_Info info,int *ncidp)", -
XIOS/dev/branch_yushan/src/io/onetcdf4.cpp
r1037 r1053 3 3 #include "onetcdf4.hpp" 4 4 #include "group_template.hpp" 5 //#include "mpi_std.hpp"6 5 #include "netcdf.hpp" 7 6 #include "netCdfInterface.hpp" … … 12 11 /// ////////////////////// Définitions ////////////////////// /// 13 12 14 CONetCDF4::CONetCDF4(const StdString& filename, bool append, bool useClassicFormat, 15 bool useCFConvention, 16 const MPI_Comm* comm, bool multifile, const StdString& timeCounterName) 13 CONetCDF4::CONetCDF4(const StdString& filename, bool append, bool useClassicFormat, bool useCFConvention, 14 const ep_lib::MPI_Comm* comm, bool multifile, const StdString& timeCounterName) 17 15 : path() 18 16 , wmpi(false) … … 32 30 33 31 void CONetCDF4::initialize(const StdString& filename, bool append, bool useClassicFormat, bool useCFConvention, 34 const MPI_Comm* comm, bool multifile, const StdString& timeCounterName)32 const ep_lib::MPI_Comm* comm, bool multifile, const StdString& timeCounterName) 35 33 { 36 34 this->useClassicFormat = useClassicFormat; … … 58 56 { 59 57 if (wmpi) 60 CNetCdfInterface::createPar(filename, mode, *comm, info_null, this->ncidp); 58 { 59 CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), info_null, this->ncidp); 60 printf("creating file with createPar\n"); 61 } 61 62 else 63 { 62 64 CNetCdfInterface::create(filename, mode, this->ncidp); 65 printf("creating file with create\n"); 66 } 67 63 68 64 69 this->appendMode = false; … … 68 73 mode |= NC_WRITE; 69 74 if (wmpi) 70 CNetCdfInterface::openPar(filename, mode, *comm, info_null, this->ncidp); 75 { 76 CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), info_null, this->ncidp); 77 printf("opening file with openPar\n"); 78 } 71 79 else 80 { 72 81 CNetCdfInterface::open(filename, mode, this->ncidp); 82 printf("opening file with open\n"); 83 } 73 84 74 85 this->appendMode = true; -
XIOS/dev/branch_yushan/src/io/onetcdf4.hpp
r1037 r1053 7 7 #include "data_output.hpp" 8 8 #include "array_new.hpp" 9 #include "mpi.hpp" 10 //#include <mpi.h> 9 #include "mpi_std.hpp" 11 10 #include "netcdf.hpp" 12 11 … … 29 28 CONetCDF4(const StdString& filename, bool append, bool useClassicFormat = false, 30 29 bool useCFConvention = true, 31 const MPI_Comm* comm = NULL, bool multifile = true,30 const ep_lib::MPI_Comm* comm = NULL, bool multifile = true, 32 31 const StdString& timeCounterName = "time_counter"); 33 32 … … 38 37 /// Initialisation /// 39 38 void initialize(const StdString& filename, bool append, bool useClassicFormat, bool useCFConvention, 40 const MPI_Comm* comm, bool multifile, const StdString& timeCounterName);39 const ep_lib::MPI_Comm* comm, bool multifile, const StdString& timeCounterName); 41 40 void close(void); 42 41 void sync(void);
Note: See TracChangeset
for help on using the changeset viewer.