Changeset 1323


Ignore:
Timestamp:
10/31/17 19:48:35 (4 years ago)
Author:
oabramkina
Message:

Improving the algorithm for registering a context.

(It's just a forgotten commit.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/server.cpp

    r1271 r1323  
    617617       static std::vector<int> counts ; 
    618618       static std::vector<bool> isEventRegistered ; 
     619       static std::vector<bool> isEventQueued ; 
    619620       MPI_Request request; 
    620621 
     
    636637         MPI_Irecv((void*)(buffers.back()),counts.back(),MPI_CHAR,root,2,intraComm,&(requests.back())) ; 
    637638         isEventRegistered.push_back(false); 
     639         isEventQueued.push_back(false); 
    638640         nbContexts++; 
    639641       } 
     
    649651         } 
    650652         // (3) If event has been scheduled, call register context 
    651          if (eventScheduler->queryEvent(ctxNb,hashId)) 
     653         if (eventScheduler->queryEvent(ctxNb,hashId) && !isEventQueued[ctxNb]) 
    652654         { 
    653655           registerContext(buffers[ctxNb],counts[ctxNb]) ; 
     656           isEventQueued[ctxNb] = true; 
    654657           delete [] buffers[ctxNb] ; 
    655658         } 
Note: See TracChangeset for help on using the changeset viewer.