Changeset 1338 for XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp
- Timestamp:
- 11/21/17 10:47:57 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp
r1334 r1338 128 128 int CNetCdfInterface::close(int ncId) 129 129 { 130 int status = nc_close(ncId); 131 if (NC_NOERR != status) 132 { 133 StdString errormsg(nc_strerror(status)); 134 StdStringStream sstr; 135 sstr << "Error when calling function nc_close(ncId)" << std::endl 136 << errormsg << std::endl 137 << "Unable to close file, given its id: " << ncId << std::endl; 138 StdString e = sstr.str(); 139 throw CNetCdfException(e); 140 } 141 130 int status = NC_NOERR; 131 #pragma omp master 132 { 133 status = nc_close(ncId); 134 if (NC_NOERR != status) 135 { 136 StdString errormsg(nc_strerror(status)); 137 StdStringStream sstr; 138 sstr << "Error when calling function nc_close(ncId)" << std::endl 139 << errormsg << std::endl 140 << "Unable to close file, given its id: " << ncId << std::endl; 141 StdString e = sstr.str(); 142 throw CNetCdfException(e); 143 } 144 } 142 145 return status; 143 146 }
Note: See TracChangeset
for help on using the changeset viewer.