Ignore:
Timestamp:
05/19/11 23:51:02 (13 years ago)
Author:
hozdoba
Message:
 
Location:
XMLIO_V2/dev/dev_rv/src/xmlio
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/buffer_list.cpp

    r198 r199  
    3636                  if (SuperClass::operator[](i-1).isAvailable(size)) 
    3737                  { 
    38                      std::cout << "Données reçues de " << i << std::endl; 
     38                     //std::cout << "Données reçues de " << i << std::endl; 
    3939                     CMPIManager::ReceiveCircularBuffer 
    4040                        (com_client_server, i, SuperClass::operator[](i-1)); 
     
    5151         } 
    5252          
    53          static int u = 0; 
    54          std::cout << "Nouvelle requête disponible " << u++ << std::endl; 
     53         //static int u = 0; 
     54         //std::cout << "Nouvelle requête disponible " << u++ << std::endl; 
    5555         /*if (u == 3046) 
    5656            for (int i = 1; i < CMPIManager::GetCommSize(com_client_server); i++) 
     
    6767         for (StdSize i = 0; i < this->nbbuffer; i++) 
    6868         { 
    69             std::cout << "Récupération de la requête " << (i+1) << std::endl; 
     69            //std::cout << "Récupération de la requête " << (i+1) << std::endl; 
    7070            lbuffer.push_back(SuperClass::operator[](i).getNextRequest()); 
    7171         } 
  • XMLIO_V2/dev/dev_rv/src/xmlio/buffer_pair.hpp

    r198 r199  
    6565                                          const long int & methodId, 
    6666                                          A1 * arg1, A2 * arg2, A3 * arg3, A4 * arg4) 
    67       { 
    68          static int recurse = 0; 
    69          if (recurse > 1) 
    70          { 
    71             std::cout << "putain :" <<  recurse << "," << this->mustBeSent()  
    72                       << "," << currentBuffer << "," << first.getUsedSize() << "," << second.getUsedSize(); 
    73             if ((currentBuffer  ==  0) && (first.getUsedSize()  != 0) && (second_request != -1)) 
    74                std::cout << "," << CMPIManager::Test (second_request); 
    75             if ((currentBuffer  ==  1) && (second.getUsedSize()  != 0) && (first_request != -1)) 
    76                std::cout << "," << CMPIManager::Test (first_request); 
    77             std::cout << "," << second_request << "," << first_request << std::endl; 
    78          } 
    79           
    80          if (recurse == 10) exit (-1); 
    81           
     67      {        
    8268         if (this->mustBeSent())  
    8369            this->sendCurrentBuffer(); 
    84  
    8570            
    8671         CLinearBuffer & cbuffer = this->getCurrentBuffer(); 
     
    10287         { 
    10388            cbuffer.appendRequestInfos(managerId, methodId, nbargs); 
    104             recurse = 0;        
    10589         } 
    10690         else 
    10791         { 
    108             int o = this->wait(); 
    109             recurse ++; 
    110             if (recurse > 1) 
    111             { 
    112                 
    113                std::cout << "putain bis:" <<  recurse << "," << this->mustBeSent()  << "," << CMPIManager::Test (o) 
    114                          << "," << currentBuffer << "," << first.getUsedSize() << "," << second.getUsedSize(); 
    115                if ((currentBuffer  ==  0) && (first.getUsedSize()  != 0) && (second_request != -1)) 
    116                   std::cout << "," << CMPIManager::Test (second_request); 
    117                if ((currentBuffer  ==  1) && (second.getUsedSize()  != 0) && (first_request != -1)) 
    118                   std::cout << "," << CMPIManager::Test (first_request); 
    119                std::cout << "," << second_request << "," << first_request << "," << o << std::endl; 
    120             } 
     92            this->wait(); 
    12193            this->prepareRequest(managerId, methodId, arg1, arg2, arg3, arg4); 
    12294         } 
  • XMLIO_V2/dev/dev_rv/src/xmlio/circular_buffer.cpp

    r198 r199  
    6969         this->movePRead(currsize); 
    7070         this->nbrequest--; 
    71          std::cout <<  this->nbrequest << std::endl; 
     71         //std::cout <<  this->nbrequest << std::endl; 
    7272         
    7373         return (CLinearBuffer(SuperClass::getData(startpos), currsize)); 
     
    118118         { 
    119119            this->clear(); 
     120            return; 
    120121         } 
    121122          
     
    206207 
    207208      StdSize CCircularBuffer::getNumberOfRequest(void) const 
    208       { return (this->nbrequest); } 
     209      {  
     210         return (this->nbrequest);  
     211      } 
     212 
     213      //--------------------------------------------------------------- 
    209214 
    210215      StdSize CCircularBuffer::getReadPosition(void) const 
    211       { return (this->p_read); } 
     216      {  
     217         return (this->p_read);  
     218      } 
     219 
     220      //--------------------------------------------------------------- 
    212221 
    213222      StdSize CCircularBuffer::getWritePosition(void) const 
    214       { return (this->p_write); } 
     223      {  
     224         return (this->p_write);  
     225      } 
     226 
     227      //--------------------------------------------------------------- 
    215228 
    216229      StdSize CCircularBuffer::getUnusedPosition(void) const 
    217       { return (this->p_unused); } 
     230      {  
     231         return (this->p_unused);  
     232      } 
    218233 
    219234      //--------------------------------------------------------------- 
  • XMLIO_V2/dev/dev_rv/src/xmlio/client.cpp

    r196 r199  
    1010   CClient::CClient(MPIComm comm_client_server) 
    1111      : bpair(comm_client_server) 
    12    { /* Ne rien faire de plus */ }   
     12   {  
     13      this->initialize(); 
     14   }   
    1315         
    1416   CClient::~CClient(void) 
    15    { /* Ne rien faire de plus */ }  
     17   {  
     18      this->finalize(); 
     19   }  
    1620    
    1721   ///-------------------------------------------------------------- 
     
    4246                                       CLinearBuffer::NULL_ARG); 
    4347      // Pas d'argument à ajouter. 
    44       this->bpair.sendCurrentBuffer();  
     48      this->bpair.sendCurrentBuffer(); 
     49      comm::CMPIManager::Barrier(); 
    4550   } 
    4651    
  • XMLIO_V2/dev/dev_rv/src/xmlio/client.hpp

    r190 r199  
    2727         /// Accesseur /// 
    2828         const CBufferPair & getBufferPair(void) const; 
    29           
    30       public : 
    31        
     29               
    3230         /// Appels distants///    
    3331         void initialize(void); // manager 0, method 0 
    3432         void finalize(void);   // manager 0, method 1 
    35               
     33          
     34      public :  
     35        
    3636         void setContext(const StdString & idContext); // manager 1, method 0 
    3737         void updateCalendar(long int timestep);       // manager 1, method 1 
    3838          
    39          void sendData(const StdString & fieldId, const ARRAY(float, 1) dataArray); // manager 2, method 0 
     39         void sendData(const StdString & fieldId, const ARRAY(float, 1)  dataArray); // manager 2, method 0 
    4040         void sendData(const StdString & fieldId, const ARRAY(double, 1) dataArray); // manager 2, method 1 
    4141          
  • XMLIO_V2/dev/dev_rv/src/xmlio/config/properties.conf

    r198 r199  
    1515 
    1616/// Buffer Size /// 
    17 DECLARE_PROPERTY (StdSize, BUFFER_CLIENT_SIZE, 1E6) // 1 Mo 
     17DECLARE_PROPERTY (StdSize, BUFFER_CLIENT_SIZE,  1E6) // 1 Mo 
    1818DECLARE_PROPERTY (StdSize, BUFFER_SERVER_SIZE, 10E6) // 10 Mo 
    1919 
  • XMLIO_V2/dev/dev_rv/src/xmlio/main_server.cpp

    r198 r199  
    1515   try 
    1616   { 
    17       ARRAY_CREATE(value0, double, 1, [200]); 
    18       ARRAY_CREATE(value1, double, 1, [1000]); 
    19       ARRAY_CREATE(value2, double, 1, [2000]); 
    20       comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connecté 
    21        
    22       if (comm::CMPIManager::IsMaster(comm::CMPIManager::GetCommWorld())) 
    23       { 
    24          comm::CServer server(comm::CMPIManager::GetCommWorld()); 
    25          server.run(); 
    26          std::cout << "fin serveur" << std::endl; 
    27          comm::CMPIManager::Barrier(); 
    28           
    29       } 
    30       else 
    31       { 
    32           
    33          comm::CClient client(comm::CMPIManager::GetCommWorld()); 
    34          client.initialize(); 
    35          client.setContext("lol"); 
    36           
    37          for (int j = 0; j < 10000; j++) 
    38          { 
    39             client.updateCalendar(j); 
    40             client.sendData("mon_champ0", value0); 
    41             client.sendData("mon_champ1", value1); 
    42             client.sendData("mon_champ2", value2); 
    43          } 
    44          client.finalize(); 
    45          comm::CMPIManager::Barrier(); 
    46       } 
    47        
    48       comm::CMPIManager::Finalize(); // < seulement en mode connecté 
     17      //comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connecté 
     18      //comm::CMPIManager::Finalize();               // < seulement en mode connecté 
    4919       
    5020      
    51       /*CXIOSManager::Initialise(CXIOSManager::CLIENT_SERVER, &argc, &argv); 
    52        
     21      CXIOSManager::Initialise(CXIOSManager::CLIENT_SERVER, &argc, &argv);       
    5322      CXIOSManager::AddClient("nemo"    , 4, 2, &nemo_fake_entry); 
    5423      //CXIOSManager::AddClient("orchidee", 1, 1, &orchidee_fake_entry); 
    5524      //CXIOSManager::AddClient("lmdz"    , 4, 2, &lmdz_fake_entry); 
    5625      CXIOSManager::RunClientServer(comm::CMPIManager::GetCommWorld()); 
    57       CXIOSManager::Finalize();*/ 
    58        
    59        
    60  
     26      CXIOSManager::Finalize();      
    6127   } 
    6228   catch (CException & exc) 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp

    r185 r199  
    346346      const int ibegin_srv = this->domain->ibegin.getValue(); 
    347347      const int jbegin_srv = this->domain->jbegin.getValue(); 
     348      const int zoom_ni_srv   = this->domain->zoom_ni.getValue(); 
     349      const int zoom_nj_srv   = this->domain->zoom_nj.getValue(); 
    348350       
    349351      const int ibegin_zoom_srv = this->domain->zoom_ibegin_loc.getValue(); 
     
    379381         } 
    380382                   
    381          dn += storeIndex_cl->size(); 
    382                   
     383         dn += storeIndex_cl->size();                  
     384      } 
     385            
     386      if (storeIndex_srv->size() != 0) 
     387      { 
     388         const int ibegin_t =  
     389            *std::min_element(out_i_index_srv->begin(), out_i_index_srv->end()); 
     390         const int iend_t   = 
     391            *std::max_element(out_i_index_srv->begin(), out_i_index_srv->end()); 
     392         const int jbegin_t =    
     393            *std::min_element(out_j_index_srv->begin(), out_j_index_srv->end()); 
     394         const int jend_t   = 
     395            *std::max_element(out_j_index_srv->begin(), out_j_index_srv->end()); 
     396             
     397         if (ibegin_t < 0)  
     398         { 
     399            std::cout << "Erreur 1 " << std::endl; 
     400         } 
     401         if (jbegin_t < 0)  
     402         { 
     403            std::cout << "Erreur 2 " <<  std::endl; 
     404         } 
     405         if (iend_t >= zoom_ni_srv) 
     406         { 
     407            std::cout << "Erreur 3 " << std::endl; 
     408         } 
     409         if (jend_t >= zoom_nj_srv)  
     410         { 
     411            std::cout << "Erreur 4 " << std::endl; 
     412         } 
    383413      } 
    384414       
     
    392422      //~ } 
    393423      //~ ofs.close(); 
     424      this->storeIndex.resize(1); 
     425      this->out_i_index.resize(1); 
     426      this->out_j_index.resize(1); 
     427      this->out_l_index.resize(1); 
    394428       
    395429   } 
  • XMLIO_V2/dev/dev_rv/src/xmlio/server.cpp

    r198 r199  
    112112   void CServer::initialize(void) // manager 0, method 0 
    113113   { 
    114       std::cout << "initialize called " << std::endl; 
     114      // Ne rien faire de plus 
    115115   } 
    116116    
     
    119119   void CServer::finalize(void) // manager 0, method 1 
    120120   { 
    121       std::cout << "finalize called " << std::endl; 
     121       comm::CMPIManager::Barrier(); 
    122122   }    
    123123    
     
    159159         } 
    160160         else timestep = timestep_; 
    161           
    162161      } 
    163162      std::cout << "updateCalendar called " << timestep <<std::endl; 
Note: See TracChangeset for help on using the changeset viewer.