Ignore:
Timestamp:
09/26/14 14:52:09 (10 years ago)
Author:
mhnguyen
Message:

Removing using_server from iodef.xml file. From now on, XIOS is capable of dectectin automatically server mode

+) Check whether server is in the MPI global group
+) Add some more methods to set/unset using_server
+) Do some cleaning stuff

Test
+) On Curie
+) All test passed correctly without using_server id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/client.cpp

    r490 r491  
    7373          } 
    7474 
     75          // Verify whether we are on server mode or not 
     76          CXios::setNotUsingServer(); 
     77          for (i=0; i < size; ++i) 
     78          { 
     79            if (hashServer == hashAll[i]) 
     80            { 
     81              CXios::setUsingServer(); 
     82              break; 
     83            } 
     84          } 
     85 
    7586          myColor=colors[hashClient] ; 
    7687 
     
    116127        CTimer::get("XIOS init").resume() ; 
    117128 
     129          // Verify whether we are on server mode or not 
     130        CXios::setNotUsingServer(); 
     131        int interCommSize = 0, intraCommSize = 0; 
     132        oasis_get_intercomm(interComm,CXios::xiosCodeId); 
     133        MPI_Comm_size(interComm, &interCommSize); 
     134        MPI_Comm_size(intraComm, &intraCommSize); 
     135        if (interCommSize == intraCommSize) CXios::setUsingServer(); 
     136 
    118137        if (CXios::usingServer) 
    119138        { 
    120139          MPI_Status status ; 
    121             MPI_Comm_rank(intraComm,&rank) ; 
     140          MPI_Comm_rank(intraComm,&rank) ; 
    122141          oasis_get_intercomm(interComm,CXios::xiosCodeId) ; 
    123142          if (rank==0) MPI_Recv(&serverLeader,1, MPI_INT, 0, 0, interComm, &status) ; 
     
    224243       std::filebuf* fb = m_infoStream.rdbuf(); 
    225244       StdStringStream fileNameClient; 
    226        fileNameClient << fileName <<"_client_" << getRank() << ".txt"; 
     245       fileNameClient << fileName <<"_client_" << getRank() << ".out"; 
    227246       fb->open(fileNameClient.str().c_str(), std::ios::out); 
    228247       if (!fb->is_open()) 
Note: See TracChangeset for help on using the changeset viewer.