Ignore:
Timestamp:
09/23/15 16:18:56 (9 years ago)
Author:
rlacroix
Message:

Fix random communication errors when using the attached mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c/icdata.cpp

    r597 r704  
    373373      CTimer::get("XIOS send field").resume(); 
    374374      CContext* context = CContext::getCurrent(); 
    375       if (!context->hasServer) context->checkBuffersAndListen(); 
     375      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     376        context->checkBuffersAndListen(); 
    376377      CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData); 
    377378      CField::get(fieldid_str)->setData(data); 
     
    389390 
    390391      CContext* context = CContext::getCurrent(); 
    391       if (!context->hasServer) context->checkBuffersAndListen(); 
     392      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     393        context->checkBuffersAndListen(); 
    392394 
    393395      CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData); 
     
    407409 
    408410      CContext* context = CContext::getCurrent(); 
    409       if (!context->hasServer) context->checkBuffersAndListen(); 
     411      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     412        context->checkBuffersAndListen(); 
    410413 
    411414      CArray<double, 2>data(data_k8, shape(data_Xsize, data_Ysize), neverDeleteData); 
     
    425428 
    426429      CContext* context = CContext::getCurrent(); 
    427       if (!context->hasServer) context->checkBuffersAndListen(); 
     430      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     431        context->checkBuffersAndListen(); 
    428432 
    429433      CArray<double, 3>data(data_k8, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData); 
     
    442446      CTimer::get("XIOS send field").resume(); 
    443447      CContext* context = CContext::getCurrent(); 
    444       if (!context->hasServer) context->checkBuffersAndListen(); 
     448      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     449        context->checkBuffersAndListen(); 
    445450 
    446451      CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData); 
     
    461466 
    462467      CContext* context = CContext::getCurrent(); 
    463       if (!context->hasServer) context->checkBuffersAndListen(); 
     468      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     469        context->checkBuffersAndListen(); 
    464470 
    465471      CArray<float, 1> data_tmp(data_k4, shape(data_Xsize), neverDeleteData); 
     
    481487 
    482488      CContext* context = CContext::getCurrent(); 
    483       if (!context->hasServer) context->checkBuffersAndListen(); 
     489      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     490        context->checkBuffersAndListen(); 
    484491 
    485492      CArray<float, 2> data_tmp(data_k4, shape(data_Xsize, data_Ysize), neverDeleteData); 
     
    501508 
    502509      CContext* context = CContext::getCurrent(); 
    503       if (!context->hasServer) context->checkBuffersAndListen(); 
     510      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     511        context->checkBuffersAndListen(); 
    504512 
    505513      CArray<float, 3> data_tmp(data_k4, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData); 
     
    523531 
    524532      CContext* context = CContext::getCurrent(); 
    525       if (!context->hasServer) context->checkBuffersAndListen(); 
     533      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     534        context->checkBuffersAndListen(); 
    526535 
    527536      CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData); 
     
    541550 
    542551      CContext* context = CContext::getCurrent(); 
    543       if (!context->hasServer) context->checkBuffersAndListen(); 
     552      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     553        context->checkBuffersAndListen(); 
    544554 
    545555      CArray<double, 2>data(data_k8, shape(data_Xsize, data_Ysize), neverDeleteData); 
     
    559569 
    560570      CContext* context = CContext::getCurrent(); 
    561       if (!context->hasServer) context->checkBuffersAndListen(); 
     571      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     572        context->checkBuffersAndListen(); 
    562573 
    563574      CArray<double, 3>data(data_k8, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData); 
     
    577588 
    578589      CContext* context = CContext::getCurrent(); 
    579       if (!context->hasServer) context->checkBuffersAndListen(); 
     590      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     591        context->checkBuffersAndListen(); 
    580592 
    581593      CArray<double, 1> data(data_Xsize); 
     
    597609 
    598610      CContext* context = CContext::getCurrent(); 
    599       if (!context->hasServer) context->checkBuffersAndListen(); 
     611      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     612        context->checkBuffersAndListen(); 
    600613 
    601614      CArray<double, 2> data(data_Xsize, data_Ysize); 
     
    617630 
    618631      CContext* context = CContext::getCurrent(); 
    619       if (!context->hasServer) context->checkBuffersAndListen(); 
     632      if (!context->hasServer && !context->client->isAttachedModeEnabled()) 
     633        context->checkBuffersAndListen(); 
    620634 
    621635      CArray<double, 3> data(data_Xsize, data_Ysize, data_Zsize); 
Note: See TracChangeset for help on using the changeset viewer.