Changeset 23222


Ignore:
Timestamp:
09/05/18 10:11:01 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: moved core profiling to md.debug.profiling

Location:
issm/trunk-jpl/src/c/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r23221 r23222  
    259259        /*Total times*/
    260260        _printf0_("   "<<setw(40)<<left<<"Total Core solution elapsed time:"<<setw(7)<<profiler->TotalTime(CORE) << "\n");
    261         /*Individual cores*/
    262         if(profiler->Used(STRESSBALANCECORE)) _printf0_("   "<<setw(40)<<left<<"Stress balance core elapsed time:"<<setw(7)<<profiler->TotalTime(STRESSBALANCECORE) << "\n");
    263         if(profiler->Used(MASSTRANSPORTCORE)) _printf0_("   "<<setw(40)<<left<<"Mass transport core elapsed time:"<<setw(7)<<profiler->TotalTime(MASSTRANSPORTCORE) << "\n");
     261
    264262        /*Linear solver only*/
    265263        _printf0_("   "<<setw(40)<<left<<"Linear solver elapsed time:"<<setw(7)<<profiler->TotalTime(SOLVER) << " ("<<setprecision(2)<<profiler->TotalTime(SOLVER)/profiler->TotalTime(CORE)*100.<<"%)\n");
     
    859857                solution_memory=profiler->Memory(CORE);
    860858
    861                 _printf0_("Core solution elapsed time    : " << solution_time   << " Seconds\n");
    862                 _printf0_("Core solution number of flops : " << solution_flops  << " Flops\n");
    863                 _printf0_("Core solution memory used     : " << solution_memory << " Bytes\n");
     859                _printf0_("\nCore solution profiling\n");
     860                _printf0_("   elapsed time    : " << solution_time   << " Seconds\n");
     861                _printf0_("   number of flops : " << solution_flops  << " Flops\n");
     862                _printf0_("   memory used     : " << solution_memory << " Bytes\n");
     863
     864                /*Individual cores*/
     865                _printf0_("Individual core profiling\n");
     866                if(profiler->Used(STRESSBALANCECORE)) _printf0_("   "<<setw(40)<<left<<"Stress balance core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(STRESSBALANCECORE) << " sec\n");
     867                if(profiler->Used(MASSTRANSPORTCORE)) _printf0_("   "<<setw(40)<<left<<"Mass transport core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(MASSTRANSPORTCORE) << " sec\n");
    864868
    865869                /*Add to results: */
     
    869873
    870874                #ifdef _HAVE_ADOLC_
    871                 solution_time=profiler->TotalTime(ADCORE);
    872                 solution_flops=profiler->TotalFlops(ADCORE);
    873                 solution_memory=profiler->Memory(ADCORE);
    874 
    875                 _printf0_("AD Solution elapsed time    : " << solution_time   << " Seconds\n");
    876                 _printf0_("AD Solution number of flops : " << solution_flops  << " Flops\n");
    877                 _printf0_("AD Solution memory used     : " << solution_memory << " Bytes\n");
     875                solution_time   = profiler->TotalTime(ADCORE);
     876                solution_flops  = profiler->TotalFlops(ADCORE);
     877                solution_memory = profiler->Memory(ADCORE);
     878
     879                _printf0_("AD profiling\n");
     880                _printf0_("   elapsed time    : " << solution_time   << " Seconds\n");
     881                _printf0_("   number of flops : " << solution_flops  << " Flops\n");
     882                _printf0_("   memory used     : " << solution_memory << " Bytes\n");
    878883                #endif
     884                _printf0_("\n");
    879885
    880886        }
  • issm/trunk-jpl/src/c/classes/Profiler.h

    r23221 r23222  
    5151                int          TotalTimeModSec(int tag);
    5252                IssmPDouble  Memory(int tag);
    53                 void         Start(int tagenum,bool dontmpisync=false);
    54                 void         Stop(int tagenum,bool dontmpisync=false);
     53                void         Start(int tagenum,bool dontmpisync=true); /*Do not call MPI barrier by default to save some ms*/
     54                void         Stop(int tagenum, bool dontmpisync=true); /*Do not call MPI barrier by default to save some ms*/
    5555                bool         Used(int tagenum);
    5656};
Note: See TracChangeset for help on using the changeset viewer.