Ignore:
Timestamp:
05/21/12 17:57:22 (12 years ago)
Author:
ymipsl
Message:
  • Supress lot of shared_ptr
  • instrument code for vampir-trace and timer diagnostic

YM

File:
1 edited

Legend:

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

    r346 r347  
    55#include "context.hpp" 
    66#include "object_template_impl.hpp" 
    7 #include "tree_manager.hpp" 
    87#include "oasis_cinterface.hpp" 
    98#include <boost/functional/hash.hpp> 
    109#include <boost/algorithm/string.hpp> 
    1110#include <mpi.h> 
     11#include "tracer.hpp" 
     12#include "timer.hpp" 
    1213 
    1314namespace xios 
     
    132133        else MPI_Finalize() ; 
    133134      } 
     135      report(0)<<"Performance report : Time spent for XIOS : "<<CTimer::get("XIOS server").getCumulatedTime()<<endl  ; 
     136      report(0)<<"Performance report : Time spent in processing events : "<<CTimer::get("Process events").getCumulatedTime()<<endl  ; 
     137      report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl  ; 
    134138    } 
    135139     
     
    138142       bool stop=false ; 
    139143        
     144       CTimer::get("XIOS server").resume() ; 
    140145       while(!stop) 
    141146       { 
     
    154159         if (finished && contextList.empty()) stop=true ; 
    155160       } 
    156       
     161       CTimer::get("XIOS server").suspend() ; 
    157162     } 
    158163      
     
    166171        { 
    167172           MPI_Status status ; 
     173           traceOff() ; 
    168174           MPI_Iprobe(0,0,*it,&flag,&status) ; 
     175           traceOn() ; 
    169176           if (flag==true) 
    170177           { 
     
    199206        int msg ; 
    200207         
     208        traceOff() ; 
    201209        MPI_Iprobe(0,4,intraComm, &flag, &status) ; 
     210        traceOn() ; 
    202211        if (flag==true) 
    203212        { 
     
    220229       if (recept==false) 
    221230       { 
     231         traceOff() ; 
    222232         MPI_Iprobe(MPI_ANY_SOURCE,1,CXios::globalComm, &flag, &status) ; 
     233         traceOn() ; 
    223234         if (flag==true)  
    224235         { 
     
    232243       else 
    233244       { 
     245         traceOff() ; 
    234246         MPI_Test(&request,&flag,&status) ; 
     247         traceOn() ; 
    235248         if (flag==true) 
    236249         { 
     
    304317       if (recept==false) 
    305318       { 
     319         traceOff() ; 
    306320         MPI_Iprobe(root,2,intraComm, &flag, &status) ; 
     321         traceOn() ; 
    307322         if (flag==true)  
    308323         { 
     
    346361              <<"Context has already been registred") ; 
    347362       
    348       shared_ptr<CContext> context=CContext::create(contextId) ; 
    349       contextList[contextId]=context.get() ; 
     363      CContext* context=CContext::create(contextId) ; 
     364      contextList[contextId]=context ; 
    350365      context->initServer(intraComm,contextIntercomm) ; 
    351366              
Note: See TracChangeset for help on using the changeset viewer.