Ignore:
Timestamp:
06/04/18 19:25:08 (6 years ago)
Author:
yushan
Message:

save dev. TO DO : test with xios

Location:
XIOS/dev/branch_openmp/src/io
Files:
3 edited

Legend:

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

    r1491 r1520  
    22#include "netCdfInterface.hpp" 
    33#include "netCdf_cf_constant.hpp" 
    4  
     4#include "ep_mpi.hpp" 
    55#include <boost/algorithm/string.hpp> 
    66 
     
    2626    // even if Parallel NetCDF ends up being used. 
    2727    if (mpi) 
    28       CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *(static_cast<MPI_Comm*>(comm->mpi_comm)), *(static_cast<MPI_Info*>(info_null.mpi_info)), this->ncidp); 
    29       //CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
     28      CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, to_mpi_comm((*comm)->mpi_comm), to_mpi_info(info_null), this->ncidp); 
    3029    else 
    3130      CNetCdfInterface::open(filename, NC_NOWRITE, this->ncidp); 
  • XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp

    r1460 r1520  
    1010#include "netCdfInterface.hpp" 
    1111#include "netCdfException.hpp" 
    12  
     12#include "ep_mpi.hpp" 
    1313namespace xios 
    1414{ 
     
    4949int CNetCdfInterface::createPar(const StdString& fileName, int cMode, MPI_Comm comm, MPI_Info info, int& ncId) 
    5050{ 
    51   //int status = xios::nc_create_par(fileName.c_str(), cMode, comm, MPI_INFO_NULL.mpi_info, &ncId); 
    52   int status = xios::nc_create_par(fileName.c_str(), cMode, comm, *(static_cast< MPI_Info* >(MPI_INFO_NULL.mpi_info)), &ncId); 
     51  int status = xios::nc_create_par(fileName.c_str(), cMode, comm, to_mpi_info(MPI_INFO_NULL), &ncId); 
    5352  if (NC_NOERR != status) 
    5453  { 
     
    105104  int status; 
    106105  #pragma omp critical (_netcdf) 
    107   status = xios::nc_open_par(fileName.c_str(), oMode, comm, *(static_cast< MPI_Info* >(MPI_INFO_NULL.mpi_info)), &ncId); 
     106  status = xios::nc_open_par(fileName.c_str(), oMode, comm, to_mpi_info(MPI_INFO_NULL), &ncId); 
    108107   
    109108  if (NC_NOERR != status) 
  • XIOS/dev/branch_openmp/src/io/onetcdf4.cpp

    r1460 r1520  
    33#include "onetcdf4.hpp" 
    44#include "group_template.hpp" 
    5 //#include "mpi.hpp" 
     5#include "ep_mpi.hpp" 
    66#include "netcdf.hpp" 
    77#include "netCdfInterface.hpp" 
     
    5959            CTimer::get("Files : create").resume(); 
    6060            if (wmpi) 
    61                CNetCdfInterface::createPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), *(static_cast<MPI_Info*>(info_null.mpi_info)), this->ncidp); 
    62                //CNetCdfInterface::createPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
     61               CNetCdfInterface::createPar(filename, mode, to_mpi_comm((*comm)->mpi_comm), to_mpi_info(info_null), this->ncidp); 
    6362            else 
    6463               CNetCdfInterface::create(filename, mode, this->ncidp); 
     
    7271            CTimer::get("Files : open").resume(); 
    7372            if (wmpi) 
    74                CNetCdfInterface::openPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), *(static_cast<MPI_Info*>(info_null.mpi_info)), this->ncidp); 
    75                //CNetCdfInterface::openPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
     73               CNetCdfInterface::openPar(filename, mode, to_mpi_comm((*comm)->mpi_comm), to_mpi_info(info_null), this->ncidp); 
    7674            else 
    7775               CNetCdfInterface::open(filename, mode, this->ncidp); 
Note: See TracChangeset for help on using the changeset viewer.