Ignore:
Timestamp:
11/15/17 12:14:34 (6 years ago)
Author:
yushan
Message:

dev_omp

File:
1 edited

Legend:

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

    r1153 r1328  
    1010#include "netCdfInterface.hpp" 
    1111#include "netCdfException.hpp" 
    12 // mpi_std.hpp 
    1312 
    1413namespace xios 
     
    5049int CNetCdfInterface::createPar(const StdString& fileName, int cMode, MPI_Comm comm, MPI_Info info, int& ncId) 
    5150{ 
    52   int status = xios::nc_create_par(fileName.c_str(), cMode, comm, info, &ncId); 
     51  int status = xios::nc_create_par(fileName.c_str(), cMode, comm, MPI_INFO_NULL.mpi_info, &ncId); 
    5352  if (NC_NOERR != status) 
    5453  { 
     
    7574int CNetCdfInterface::open(const StdString& fileName, int oMode, int& ncId) 
    7675{ 
    77   int status = NC_NOERR; 
    78   #pragma omp critical (_netcdf) 
    79   status = nc_open(fileName.c_str(), oMode, &ncId); 
    80    
     76  int status = nc_open(fileName.c_str(), oMode, &ncId); 
    8177  if (NC_NOERR != status) 
    8278  { 
     
    106102int CNetCdfInterface::openPar(const StdString& fileName, int oMode, MPI_Comm comm, MPI_Info info, int& ncId) 
    107103{ 
    108   int status; 
    109   #pragma omp critical (_netcdf) 
    110   status = xios::nc_open_par(fileName.c_str(), oMode, comm, info, &ncId); // nc_open 
     104  //int status = xios::nc_open_par(fileName.c_str(), oMode, comm, info, &ncId); 
     105  int status = xios::nc_open_par(fileName.c_str(), oMode, comm, MPI_INFO_NULL.mpi_info, &ncId); 
    111106  if (NC_NOERR != status) 
    112107  { 
     
    131126int CNetCdfInterface::close(int ncId) 
    132127{ 
    133   int status = NC_NOERR; 
    134   #pragma omp critical (_netcdf) 
    135   //#pragma omp master 
    136   { 
    137   status = nc_close(ncId); 
     128  int status = nc_close(ncId); 
    138129  if (NC_NOERR != status) 
    139130  { 
     
    146137    throw CNetCdfException(e); 
    147138  } 
    148   } 
     139 
    149140  return status; 
    150141} 
     
    356347int CNetCdfInterface::inqDimLen(int ncid, int dimId, StdSize& dimLen) 
    357348{ 
    358   int status; 
    359   #pragma omp critical (_netcdf) 
    360   status = nc_inq_dimlen(ncid, dimId, &dimLen); 
     349  int status = nc_inq_dimlen(ncid, dimId, &dimLen); 
    361350  if (NC_NOERR != status) 
    362351  { 
Note: See TracChangeset for help on using the changeset viewer.