Ignore:
Timestamp:
11/21/17 10:47:57 (6 years ago)
Author:
yushan
Message:

dev_omp

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

Legend:

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

    r1328 r1338  
    5353    CArray<double,1> fieldData(grid->getWrittenDataSize()); 
    5454    if (!field->default_value.isEmpty()) fieldData = field->default_value; 
    55  
     55    #ifdef _usingEP 
     56      SuperClass::type = ONE_FILE; 
     57      printf("SuperClass::type = %d\n", SuperClass::type); 
     58    #endif 
     59         
    5660    switch (SuperClass::type) 
    5761    { 
  • XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp

    r1334 r1338  
    128128int CNetCdfInterface::close(int ncId) 
    129129{ 
    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  } 
    142145  return status; 
    143146} 
Note: See TracChangeset for help on using the changeset viewer.