Ignore:
Timestamp:
03/17/17 18:02:20 (7 years ago)
Author:
yushan
Message:

backup modification

File:
1 edited

Legend:

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

    r1074 r1079  
    3838// localComm doesn't given 
    3939 
    40         printf("check : localComm == MPI_COMM_NULL = %d\n", localComm == MPI_COMM_NULL); 
    41  
    4240        if (localComm == MPI_COMM_NULL) 
    4341        { 
     
    6967          MPI_Comm_rank(CXios::globalComm,&rank); 
    7068 
    71           printf("client init : codeId = %s, xiosCodeId = %s, rank = %d(%d), size = %d\n", codeId, CXios::xiosCodeId, rank, omp_get_thread_num(), size); 
     69          printf("client init : rank = %d, size = %d\n", rank, size); 
    7270           
    7371 
     
    107105          if (CXios::usingServer) 
    108106          { 
    109             int clientLeader=leaders[hashClient] ; 
     107            //int clientLeader=leaders[hashClient] ; 
    110108            serverLeader=leaders[hashServer] ; 
    111109 
     
    116114            { 
    117115              info(50)<<"intercommCreate::client "<<rank<<" intraCommSize : "<<intraCommSize 
    118                  <<" intraCommRank :"<<intraCommRank<<"  serverLeader "<< serverLeader<<endl ;   
     116                 <<" intraCommRank :"<<intraCommRank<<"  serverLeader "<< serverLeader 
     117                 <<" globalComm : "<< &(CXios::globalComm) << endl ;   
    119118            } 
    120119             
    121120            MPI_Intercomm_create(intraComm,0,CXios::globalComm,serverLeader,0,&interComm) ; 
     121 
     122            int interCommSize, interCommRank ; 
     123            MPI_Comm_size(interComm,&interCommSize) ; 
     124            MPI_Comm_rank(interComm,&interCommRank) ; 
     125 
     126            #pragma omp critical(_output) 
     127            { 
     128              info(50)<<" interCommRank :"<<interCommRank 
     129                 <<" interCommSize : "<< interCommSize << endl ;   
     130            } 
     131 
    122132 
    123133          } 
     
    176186    void CClient::registerContext(const string& id,MPI_Comm contextComm) 
    177187    { 
     188      //info(50) << "Client "<<getRank() << " start registerContext using info output" << endl; 
     189      printf("Client %d start registerContext\n", getRank()); 
     190      //printf("Client start registerContext\n"); 
     191 
    178192      CContext::setCurrent(id) ; 
    179       CContext* context=CContext::create(id); 
     193      printf("Client %d CContext::setCurrent OK\n", getRank()); 
     194      CContext* context = CContext::create(id); 
     195      printf("Client %d context=CContext::create(%s) OK\n", getRank(), id); 
     196       
    180197      StdString idServer(id); 
    181198      idServer += "_server"; 
    182199 
    183       if (!CXios::isServer) 
     200      if (!CXios::isServer)  // server mode 
    184201      {       
    185202        int size,rank,globalRank ; 
     
    211228 
    212229        MPI_Intercomm_create(contextComm,0,CXios::globalComm,serverLeader,10+globalRank,&contextInterComm) ; 
    213         //info(10)<<"Register new Context : "<<id<<endl ; 
     230         
     231        #pragma omp critical (_output) 
     232        info(10)<<"Register new Context : "<<id<<endl ; 
    214233                       
    215234 
     
    217236        MPI_Intercomm_merge(contextInterComm,0,&inter) ; 
    218237        MPI_Barrier(inter) ; 
     238 
     239        #pragma omp critical (_output) 
     240        printf("Client %d : MPI_Intercomm_merge OK \n", getRank()) ; 
    219241         
    220242         
    221243        context->initClient(contextComm,contextInterComm) ; 
     244        #pragma omp critical (_output) 
     245        printf("Client %d : context->initClient(contextComm,contextInterComm) OK \n", getRank()) ; 
    222246         
    223247 
     
    225249        MPI_Comm_free(&inter); 
    226250      } 
    227       else 
     251      else  // attached mode 
    228252      { 
    229253        MPI_Comm contextInterComm ; 
Note: See TracChangeset for help on using the changeset viewer.