Ignore:
Timestamp:
02/17/17 17:55:37 (7 years ago)
Author:
yushan
Message:

ep_lib namespace specified when netcdf involved

Location:
XIOS/dev/branch_yushan/src/io
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan/src/io/inetcdf4.cpp

    r948 r1053  
    1818    } 
    1919    mpi = comm && !multifile; 
     20    MPI_Info m_info; 
    2021 
    2122    // The file format will be detected automatically by NetCDF, it is safe to always set NC_MPIIO 
    2223    // even if Parallel NetCDF ends up being used. 
    2324    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); 
    2526    else 
    2627      CNetCdfInterface::open(filename, NC_NOWRITE, this->ncidp); 
  • XIOS/dev/branch_yushan/src/io/inetcdf4.hpp

    r802 r1053  
    77#include "array_new.hpp" 
    88 
    9 #include "mpi.hpp" 
     9#include "mpi_std.hpp" 
    1010#include "netcdf.hpp" 
    1111 
  • XIOS/dev/branch_yushan/src/io/nc4_data_output.cpp

    r1037 r1053  
    2626      CNc4DataOutput::CNc4DataOutput 
    2727         (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) 
    2929            : SuperClass() 
    3030            , SuperClassWriter(filename, exist, useClassicFormat, useCFConvention, &comm_file, multifile, timeCounterName) 
     
    450450      StdString domainName = domain->name; 
    451451      domain->assignMesh(domainName, domain->nvertex); 
    452       domain->mesh->createMeshEpsilon(server->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); 
    453453 
    454454      StdString node_x = domainName + "_node_x"; 
  • XIOS/dev/branch_yushan/src/io/nc4_data_output.hpp

    r887 r1053  
    2727               (const StdString & filename, bool exist, bool useClassicFormat, 
    2828                bool useCFConvention, 
    29                 MPI_Comm comm_file, bool multifile, bool isCollective = true, 
     29                ep_lib::MPI_Comm comm_file, bool multifile, bool isCollective = true, 
    3030                const StdString& timeCounterName = "time_counter"); 
    3131 
     
    116116 
    117117            /// Propriétés privées /// 
    118             MPI_Comm comm_file; 
     118            ep_lib::MPI_Comm comm_file; 
    119119            const StdString filename; 
    120120            std::map<Time, StdSize> timeToRecordCache; 
  • XIOS/dev/branch_yushan/src/io/netCdfInterface.hpp

    r1037 r1053  
    1616#endif 
    1717 
    18 #include "mpi.hpp" 
    19 //#include <mpi.h> 
     18#include "mpi_std.hpp" 
    2019#include "netcdf.hpp" 
    2120 
  • XIOS/dev/branch_yushan/src/io/netcdf.hpp

    r685 r1053  
    11#ifndef __XIOS_NETCDF_HPP__ 
    22#define __XIOS_NETCDF_HPP__ 
    3 #include "mpi.hpp" 
     3#include "mpi_std.hpp" 
    44#define MPI_INCLUDED 
    55#include <netcdf.h> 
     
    1818extern "C" 
    1919{ 
    20 include <netcdf_par.h> 
     20  #include <netcdf_par.h> 
    2121} 
    2222#  endif 
     
    3030namespace xios 
    3131{ 
    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) 
    3333  { 
    3434#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) ; 
    3636#else 
    3737    ERROR("int nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info,int *ncidp)", 
     
    4141  } 
    4242 
    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) 
    4444  { 
    4545#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) ; 
    4747#else 
    4848    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  
    33#include "onetcdf4.hpp" 
    44#include "group_template.hpp" 
    5 //#include "mpi_std.hpp" 
    65#include "netcdf.hpp" 
    76#include "netCdfInterface.hpp" 
     
    1211      /// ////////////////////// Définitions ////////////////////// /// 
    1312 
    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) 
    1715        : path() 
    1816        , wmpi(false) 
     
    3230 
    3331      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) 
    3533      { 
    3634         this->useClassicFormat = useClassicFormat; 
     
    5856         { 
    5957            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            } 
    6162            else 
     63            { 
    6264               CNetCdfInterface::create(filename, mode, this->ncidp); 
     65               printf("creating file with create\n");   
     66            }   
     67                
    6368 
    6469            this->appendMode = false; 
     
    6873            mode |= NC_WRITE; 
    6974            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            } 
    7179            else 
     80            { 
    7281               CNetCdfInterface::open(filename, mode, this->ncidp); 
     82               printf("opening file with open\n"); 
     83            } 
    7384 
    7485            this->appendMode = true; 
  • XIOS/dev/branch_yushan/src/io/onetcdf4.hpp

    r1037 r1053  
    77#include "data_output.hpp" 
    88#include "array_new.hpp" 
    9 #include "mpi.hpp" 
    10 //#include <mpi.h> 
     9#include "mpi_std.hpp" 
    1110#include "netcdf.hpp" 
    1211 
     
    2928            CONetCDF4(const StdString& filename, bool append, bool useClassicFormat = false, 
    3029                          bool useCFConvention = true, 
    31                       const MPI_Comm* comm = NULL, bool multifile = true, 
     30                      const ep_lib::MPI_Comm* comm = NULL, bool multifile = true, 
    3231                      const StdString& timeCounterName = "time_counter"); 
    3332 
     
    3837            /// Initialisation /// 
    3938            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); 
    4140            void close(void); 
    4241            void sync(void); 
Note: See TracChangeset for help on using the changeset viewer.