Ignore:
Timestamp:
06/02/17 16:56:46 (4 years ago)
Author:
oabramkina
Message:

Two servel levels: correcting initialization in case of non-contiguous server ranks.
Tests on Curie: test_complete.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/client.cpp

    r1148 r1152  
    4141      if (initialized) is_MPI_Initialized=true ; 
    4242      else is_MPI_Initialized=false ; 
     43      int rank ; 
    4344 
    4445// don't use OASIS 
     
    9091          { 
    9192            if (hashAll[i] == hashString(CXios::xiosCodeId)) 
    92 //                || (hashAll[i] == hashString(CXios::xiosCodeIdPrm)) 
    93 //                || (hashAll[i] == hashString(CXios::xiosCodeIdSnd))) 
    9493            { 
    9594              CXios::setUsingServer(); 
     
    9897          } 
    9998 
    100           myColor=colors[hashClient] ; 
     99//          myColor=colors[hashClient]; 
     100          myColor=leaders[hashClient] ; 
    101101          MPI_Comm_split(CXios::globalComm,myColor,rank_,&intraComm) ; 
     102 
     103          if (CXios::usingServer2) 
     104            MPI_Allgather(&hashClient, 1, MPI_LONG, hashAll, 1, MPI_LONG, CXios::globalComm) ; 
    102105 
    103106          if (CXios::usingServer) 
     
    111114                   <<" intraCommRank :"<<intraCommRank<<"  clientLeader "<< serverLeader<<endl ; 
    112115             MPI_Intercomm_create(intraComm, 0, CXios::globalComm, serverLeader, 0, &interComm) ; 
    113              rank_ = intraCommRank; 
     116             //rank_ = intraCommRank; 
    114117          } 
    115118          else 
     
    150153        { 
    151154          MPI_Status status ; 
    152           MPI_Comm_rank(intraComm,&rank_) ; 
     155          MPI_Comm_rank(intraComm,&rank) ; 
    153156 
    154157          oasis_get_intercomm(interComm,CXios::xiosCodeId) ; 
    155           if (rank_==0) MPI_Recv(&serverLeader,1, MPI_INT, 0, 0, interComm, &status) ; 
     158          if (rank==0) MPI_Recv(&serverLeader,1, MPI_INT, 0, 0, interComm, &status) ; 
    156159          MPI_Bcast(&serverLeader,1,MPI_INT,0,intraComm) ; 
    157160 
Note: See TracChangeset for help on using the changeset viewer.