Changeset 1601 for XIOS/dev/dev_trunk_omp/src/io/netcdf.hpp
- Timestamp:
- 11/19/18 15:52:54 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/src/io/netcdf.hpp
r685 r1601 1 1 #ifndef __XIOS_NETCDF_HPP__ 2 2 #define __XIOS_NETCDF_HPP__ 3 #include "mpi .hpp"3 #include "mpi_std.hpp" 4 4 #define MPI_INCLUDED 5 5 #include <netcdf.h> … … 33 33 { 34 34 #if defined(USING_NETCDF_PAR) 35 return ::nc_create_par(path, cmode, comm, info, ncidp) ; 35 int status; 36 #pragma omp critical (_netcdf) 37 { 38 status = ::nc_create_par(path, cmode, comm, info, ncidp) ; 39 } 40 return status; 36 41 #else 37 42 ERROR("int nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info,int *ncidp)", … … 44 49 { 45 50 #if defined(USING_NETCDF_PAR) 46 return ::nc_open_par(path, mode, comm, info, ncidp) ; 51 int status; 52 #pragma omp critical (_netcdf) 53 { 54 status = ::nc_open_par(path, mode, comm, info, ncidp) ; 55 } 56 return status; 47 57 #else 48 58 ERROR("int nc_open_par(const char *path, int mode, MPI_Comm comm, MPI_Info info,int *ncidp)", … … 55 65 { 56 66 #if defined(USING_NETCDF_PAR) 57 return ::nc_var_par_access(ncid, varid, par_access) ; 67 int status = ::nc_var_par_access(ncid, varid, par_access) ; 68 69 return status; 58 70 #else 59 71 ERROR("int nc_var_par_access(int ncid, int varid, int par_access)",
Note: See TracChangeset
for help on using the changeset viewer.