Ignore:
Timestamp:
09/14/21 15:17:59 (3 years ago)
Author:
ymipsl
Message:

Fix some Dead-lock issue...
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.cpp

    r2223 r2230  
    5656  //  { 
    5757      //if (!isAttachedModeEnabled()) eventScheduler_=CXios::getPoolRessource()->getService(contextInfo.serviceId,contextInfo.partitionId)->getEventScheduler() ; 
    58       eventScheduler_=CXios::getPoolRessource()->getService(contextInfo.serviceId,contextInfo.partitionId)->getEventScheduler() ; 
    59  
     58    eventScheduler_=CXios::getPoolRessource()->getService(contextInfo.serviceId,contextInfo.partitionId)->getEventScheduler() ; 
     59    MPI_Comm_dup(intraComm, &processEventBarrier_) ; 
    6060  //  } 
    6161 
     
    9292        } 
    9393        else MPI_Comm_split(interCommMerged, interCommMergedRank, rank, &winComm); 
    94         MPI_Comm_free(&winComm) ; 
     94//       ym : Warning : intelMPI doesn't support that communicator of windows be deallocated before the windows deallocation, crash at MPI_Win_lock 
     95//            Bug or not ?           
     96        // MPI_Comm_free(&winComm) ; 
    9597      } 
    9698    } 
     
    346348        else if (isAttachedModeEnabled() || eventScheduler_->queryEvent(currentTimeLine,hashId) ) 
    347349        { 
    348           MPI_Request req ; 
    349           MPI_Status status ; 
    350  
    351           MPI_Ibarrier(intraComm,&req) ; 
    352           int flag=false ; 
    353           do   
     350 
     351          if (!eventScheduled_)  
    354352          { 
    355             eventScheduler_->checkEvent()  ; 
    356             MPI_Test(&req,&flag,&status) ; 
    357           } while (!flag) ; 
    358  
     353            MPI_Ibarrier(processEventBarrier_,&processEventRequest_) ; 
     354            eventScheduled_=true ; 
     355            return ; 
     356          } 
     357          else  
     358          { 
     359            MPI_Status status ; 
     360            int flag ; 
     361            MPI_Test(&processEventRequest_, &flag, &status) ; 
     362            if (!flag) return ; 
     363            eventScheduled_=false ; 
     364          } 
     365 
     366          if (!isAttachedModeEnabled()) eventScheduler_->popEvent() ; 
    359367          //MPI_Barrier(intraComm) ; 
    360368         // When using attached mode, synchronise the processes to avoid that differents event be scheduled by differents processes 
     
    469477    } 
    470478  } 
     479 
     480  bool CContextServer::isCollectiveEvent(CEventServer& event) 
     481  { 
     482    if (event.classId==CField::GetType()) return CField::isCollectiveEvent(event); 
     483    else return true ; 
     484  } 
    471485} 
Note: See TracChangeset for help on using the changeset viewer.