Ignore:
Timestamp:
01/31/19 12:12:52 (5 years ago)
Author:
yushan
Message:

branch merged with trunk @1645. arch file (ep&mpi) added for ADA

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_omp/src/context_client.cpp

    r1630 r1646  
    1212#include "cxios.hpp" 
    1313#include "server.hpp" 
     14#ifdef _usingEP 
    1415using namespace ep_lib; 
     16#endif 
    1517 
    1618namespace xios 
     
    9698    { 
    9799      list<int> ranks = event.getRanks(); 
    98  
     100      #pragma omp critical (_output) 
     101      { 
     102        info(100)<<"Event "<<timeLine<<" of context "<<context->getId()<<endl ; 
     103      } 
    99104      if (CXios::checkEventSync) 
    100105      { 
     
    124129        { 
    125130          event.send(timeLine, sizes, buffList); 
     131          #pragma omp critical (_output) 
     132          { 
     133            info(100)<<"Event "<<timeLine<<" of context "<<context->getId()<<"  sent"<<endl ; 
     134          } 
    126135 
    127136          checkBuffers(ranks); 
     
    140149          for (list<int>::const_iterator it = sizes.begin(); it != sizes.end(); it++) 
    141150            tmpBufferedEvent.buffers.push_back(new CBufferOut(*it)); 
    142           info(100)<<"DEBUG : temporaly event created : timeline "<<timeLine<<endl ; 
     151          #pragma omp critical (_output) 
     152          { 
     153            info(100)<<"DEBUG : temporaly event created : timeline "<<timeLine<<endl ; 
     154          } 
    143155          event.send(timeLine, tmpBufferedEvent.sizes, tmpBufferedEvent.buffers); 
     156          #pragma omp critical (_output) 
     157          { 
     158            info(100)<<"Event "<<timeLine<<" of context "<<context->getId()<<"  sent"<<endl ; 
     159          } 
    144160        } 
    145161      } 
     
    167183            (*itBuffer)->put((char*)(*it)->start(), (*it)->count()); 
    168184 
    169           info(100)<<"DEBUG : temporaly event sent "<<endl ; 
     185          #pragma omp critical (_output) 
     186          { 
     187            info(100)<<"DEBUG : temporaly event sent "<<endl ; 
     188          } 
    170189          checkBuffers(tmpBufferedEvent.ranks); 
    171190 
     
    341360       if (ratio < minBufferSizeEventSizeRatio) minBufferSizeEventSizeRatio = ratio; 
    342361     } 
     362      
     363     #ifdef _usingEP 
    343364     MPI_Allreduce(&minBufferSizeEventSizeRatio, &minBufferSizeEventSizeRatio, 1, MPI_DOUBLE, MPI_MIN, intraComm); 
     365     #elif _usingMPI 
     366     MPI_Allreduce(MPI_IN_PLACE, &minBufferSizeEventSizeRatio, 1, MPI_DOUBLE, MPI_MIN, intraComm); 
     367     #endif 
    344368 
    345369     if (minBufferSizeEventSizeRatio < 1.0) 
     
    426450      { 
    427451        #pragma omp critical (_output) 
    428         info(100)<<"DEBUG : Sent context Finalize event to rank "<<*itRank<<endl ; 
     452        { 
     453          info(100)<<"DEBUG : Sent context Finalize event to rank "<<*itRank<<endl ; 
     454        } 
    429455        event.push(*itRank, 1, msg); 
    430456      } 
     
    452478    { 
    453479      #pragma omp critical (_output) 
    454       report(10) << " Memory report : Context <" << context->getId() << "> : client side : memory used for buffer of each connection to server" << endl 
     480      { 
     481        report(10) << " Memory report : Context <" << context->getId() << "> : client side : memory used for buffer of each connection to server" << endl 
    455482                 << "  +) To server with rank " << itMap->first << " : " << itMap->second << " bytes " << endl; 
     483      } 
    456484      totalBuf += itMap->second; 
    457485    } 
    458486    #pragma omp critical (_output) 
    459     report(0) << " Memory report : Context <" << context->getId() << "> : client side : total memory used for buffer " << totalBuf << " bytes" << endl; 
     487    { 
     488      report(0) << " Memory report : Context <" << context->getId() << "> : client side : total memory used for buffer " << totalBuf << " bytes" << endl; 
     489    } 
    460490 
    461491    //releaseBuffers(); // moved to CContext::finalize() 
Note: See TracChangeset for help on using the changeset viewer.