Ignore:
Timestamp:
11/22/17 18:41:51 (7 years ago)
Author:
oabramkina
Message:

Fixing a bug in r1320 which affected writing.
test_remap: ok.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/field.cpp

    r1340 r1344  
    15571557   void CField::setContextClient(CContextClient* contextClient) 
    15581558   { 
     1559     CContext* context = CContext::getCurrent(); 
    15591560     client = contextClient; 
    1560      if (file->mode.isEmpty() || (!file->mode.isEmpty() && file->mode == CFile::mode_attr::write)) 
    1561        grid->setContextClient(contextClient); 
     1561     if (context->hasClient) 
     1562     { 
     1563       // A grid is sent by a client (both for read or write) or by primary server (write only) 
     1564       if (context->hasServer) 
     1565       { 
     1566         if (file->mode.isEmpty() || (!file->mode.isEmpty() && file->mode == CFile::mode_attr::write)) 
     1567           grid->setContextClient(contextClient); 
     1568       } 
     1569       else 
     1570           grid->setContextClient(contextClient); 
     1571     } 
    15621572   } 
    15631573 
Note: See TracChangeset for help on using the changeset viewer.