Changeset 1672 for XIOS


Ignore:
Timestamp:
06/13/19 17:41:23 (5 years ago)
Author:
ymipsl
Message:

Fix problem of distribution.
The isDistributed() method for domain and is local to all process, so some deadlock can occur.
YM

Location:
XIOS/trunk/src/node
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/axis.cpp

    r1639 r1672  
    847847 
    848848      numberWrittenIndexes_[writtenCommSize] = nbWritten; 
    849       if (isDistributed()) 
     849 
     850      bool distributed_glo, distributed=isDistributed() ; 
     851      MPI_Allreduce(&distributed,&distributed_glo, 1, MPI_INT, MPI_LOR, writtenComm) ; 
     852      if (distributed_glo) 
    850853      { 
    851854              
  • XIOS/trunk/src/node/domain.cpp

    r1639 r1672  
    226226      bool distributed =  !((!ni.isEmpty() && (ni == ni_glo) && !nj.isEmpty() && (nj == nj_glo)) || 
    227227              (!i_index.isEmpty() && i_index.numElements() == ni_glo*nj_glo)); 
     228      bool distributed_glo ; 
    228229      distributed |= (1 == CContext::getCurrent()->client->clientSize); 
    229230 
     
    20612062 
    20622063      numberWrittenIndexes_[writtenCommSize] = nbWritten; 
    2063       if (isDistributed()) 
     2064      bool distributed_glo, distributed=isDistributed() ; 
     2065      MPI_Allreduce(&distributed,&distributed_glo, 1, MPI_INT, MPI_LOR, writtenComm) ; 
     2066       
     2067      if (distributed_glo) 
    20642068      { 
    20652069              
Note: See TracChangeset for help on using the changeset viewer.