Changeset 1150 for XIOS


Ignore:
Timestamp:
05/31/17 14:31:14 (7 years ago)
Author:
oabramkina
Message:

Initializaion in case of oasis is corrected. Not tested.

File:
1 edited

Legend:

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

    r1148 r1150  
    233233        int globalRank ; 
    234234        MPI_Comm_rank(CXios::globalComm,&globalRank); 
     235        if (rank_ == 0) 
     236          serverLeader_ = globalRank; 
    235237 
    236238        for(it=splitted.begin();it!=splitted.end();it++) 
     
    239241//        interComm.push_back(newComm) ; 
    240242          if ( !CXios::usingServer2) 
     243          { 
    241244            interCommLeft.push_back(newComm) ; 
     245            if (rank_==0) MPI_Send(&globalRank,1,MPI_INT,0,0,newComm) ; 
     246          } 
    242247          else 
    243248          { 
    244249            if (serverLevel == 1) 
    245250            { 
    246               info(50)<<"intercommCreate::server "<<rank_<<" intraCommSize : "<<size 
    247                        <<" intraCommRank :"<<rank_<<"  clientLeader "<< rank<<endl ; 
    248               MPI_Intercomm_create(intraComm, 0, localComm, rank, 0, &newComm) ; 
    249               interCommRight.push_back(newComm) ; 
    250  
     251              interCommLeft.push_back(newComm) ; 
     252              if (rank_==0) MPI_Send(&globalRank,1,MPI_INT,0,0,newComm) ; 
     253              for (int i = 0; i < nbPools; ++i) 
     254              { 
     255                int srvSndLeader = serverLeader_ + serverSize_ - nbPools + i; 
     256                info(50)<<"intercommCreate::client (server level 1) "<<globalRank<<" intraCommSize : "<<size 
     257                    <<" intraCommRank :"<<rank_<<"  clientLeader "<< srvSndLeader<<endl ; 
     258                MPI_Intercomm_create(intraComm, 0, CXios::globalComm, srvSndLeader, 0, &newComm) ; 
     259                interCommRight.push_back(newComm) ; 
     260              } 
    251261            } 
    252262            else if (serverLevel == 2) 
     
    256266              MPI_Intercomm_create(intraComm, 0, localComm, 0, 0, &newComm) ; 
    257267              interCommLeft.push_back(newComm) ; 
    258  
    259268            } 
    260  
    261           } 
    262 //          if (rank_==0) MPI_Send(&globalRank,1,MPI_INT,0,0,newComm) ; 
     269          } 
    263270//          MPI_Comm_remote_size(newComm,&size); 
    264           // Send serverLeader to client 
    265           if (rank_==0) MPI_Send(&globalRank,1,MPI_INT,0,0,interCommLeft.back()) ; 
    266271        } 
    267272              oasis_enddef() ; 
Note: See TracChangeset for help on using the changeset viewer.