Changeset 1328 for XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp
- Timestamp:
- 11/15/17 12:14:34 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp
r1153 r1328 10 10 #include "netCdfInterface.hpp" 11 11 #include "netCdfException.hpp" 12 // mpi_std.hpp13 12 14 13 namespace xios … … 50 49 int CNetCdfInterface::createPar(const StdString& fileName, int cMode, MPI_Comm comm, MPI_Info info, int& ncId) 51 50 { 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); 53 52 if (NC_NOERR != status) 54 53 { … … 75 74 int CNetCdfInterface::open(const StdString& fileName, int oMode, int& ncId) 76 75 { 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); 81 77 if (NC_NOERR != status) 82 78 { … … 106 102 int CNetCdfInterface::openPar(const StdString& fileName, int oMode, MPI_Comm comm, MPI_Info info, int& ncId) 107 103 { 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); 111 106 if (NC_NOERR != status) 112 107 { … … 131 126 int CNetCdfInterface::close(int ncId) 132 127 { 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); 138 129 if (NC_NOERR != status) 139 130 { … … 146 137 throw CNetCdfException(e); 147 138 } 148 } 139 149 140 return status; 150 141 } … … 356 347 int CNetCdfInterface::inqDimLen(int ncid, int dimId, StdSize& dimLen) 357 348 { 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); 361 350 if (NC_NOERR != status) 362 351 {
Note: See TracChangeset
for help on using the changeset viewer.