Ignore:
Timestamp:
11/20/17 09:49:26 (6 years ago)
Author:
yushan
Message:

omp_dev

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

Legend:

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

    r1328 r1334  
    102102int CNetCdfInterface::openPar(const StdString& fileName, int oMode, MPI_Comm comm, MPI_Info info, int& ncId) 
    103103{ 
    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); 
     104  int status; 
     105  #pragma omp critical (_netcdf) 
     106  status = xios::nc_open_par(fileName.c_str(), oMode, comm, MPI_INFO_NULL.mpi_info, &ncId); 
     107   
    106108  if (NC_NOERR != status) 
    107109  { 
  • XIOS/dev/branch_openmp/src/io/netCdfInterface_impl.hpp

    r1328 r1334  
    8585  int CNetCdfInterface::getVaraType(int ncid, int varId, const StdSize* start, const StdSize* count, T* data) 
    8686  { 
    87     int status = ncGetVaraType(ncid, varId, start, count, data); 
     87    int status; 
     88    #pragma omp critical (_netcdf) 
     89    status = ncGetVaraType(ncid, varId, start, count, data); 
    8890    if (NC_NOERR != status) 
    8991    { 
Note: See TracChangeset for help on using the changeset viewer.