Changeset 22551


Ignore:
Timestamp:
03/16/18 15:48:35 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: revised how profiling is done and added solver time to see how much time we spend solver linear systems

Location:
issm/trunk-jpl/src/c
Files:
15 edited

Legend:

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

    r21878 r22551  
    2424                if(world_rank!=0){
    2525                        femmodel_init= new FemModel(argc,argv,evaluation_comm);
    26                         femmodel_init->profiler->Tag(STARTCORE);
     26                        femmodel_init->profiler->Start(CORE);
    2727                }
    2828
     
    3737
    3838                        /*Wrap up: */
    39                         femmodel_init->profiler->Tag(FINISHCORE);
     39                        femmodel_init->profiler->Stop(CORE);
    4040                        femmodel_init->CleanUp(); //only close file pointers on rank 0 of slave 1!
    4141
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r22418 r22551  
    6868        /*Start profiler: */
    6969        this->profiler=new Profiler();
    70         profiler->Tag(START);
     70        profiler->Start(TOTAL);
    7171
    7272        /*From command line arguments, retrieve different filenames needed to create the FemModel: */
     
    7474
    7575        /*Create femmodel from input files: */
    76         profiler->Tag(STARTINIT);
     76        profiler->Start(MPROCESSOR);
    7777        this->InitFromFiles(rootpath,binfilename,outbinfilename,petscfilename,lockfilename,restartfilename, solution_type,trace,NULL);
    78         profiler->Tag(FINISHINIT);
     78        profiler->Stop(MPROCESSOR);
    7979
    8080        /*Save communicator in the parameters dataset: */
     
    142142
    143143        /*Create femmodel from input files, with trace activated: */
    144         profiler->Tag(STARTINIT);
     144        profiler->Start(MPROCESSOR);
    145145        this->InitFromFiles(rootpath,inputfilename,outputfilename,toolkitsfilename,lockfilename,restartfilename, solution_type,traceon,X);
    146         profiler->Tag(FINISHINIT);
     146        profiler->Stop(MPROCESSOR);
    147147
    148148        #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_ADOLC_)
     
    253253
    254254        /*Before we delete the profiler, report statistics for this run: */
    255         profiler->Tag(FINISH);  //final tagging
     255        profiler->Stop(TOTAL);  //final tagging
    256256        _printf0_("\n");
    257         _printf0_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<profiler->DeltaTime(STARTINIT,FINISHINIT) << "\n");
    258         _printf0_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<profiler->DeltaTime(STARTCORE,FINISHCORE) << "\n");
     257        _printf0_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<profiler->TotalTime(MPROCESSOR) << "\n");
     258        _printf0_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<profiler->TotalTime(CORE) << "\n");
     259        _printf0_("   "<<setw(40)<<left<<"Solver elapsed time:"<<profiler->TotalTime(SOLVER) << "\n");
    259260        _printf0_("\n");
    260261        _printf0_("   Total elapsed time: "
    261                                 <<profiler->DeltaTimeModHour(START,FINISH)<<" hrs "
    262                                 <<profiler->DeltaTimeModMin(START,FINISH)<<" min "
    263                                 <<profiler->DeltaTimeModSec(START,FINISH)<<" sec"
     262                                <<profiler->TotalTimeModHour(TOTAL)<<" hrs "
     263                                <<profiler->TotalTimeModMin(TOTAL)<<" min "
     264                                <<profiler->TotalTimeModSec(TOTAL)<<" sec"
    264265                                );
    265266        _printf0_("\n");
     
    826827
    827828        /*run solution core: */
    828         profiler->Tag(STARTCORE);   
     829        profiler->Start(CORE);   
    829830        solutioncore(this);
    830         profiler->Tag(FINISHCORE);
     831        profiler->Stop(CORE);
    831832
    832833        /*run AD core if needed: */
    833         profiler->Tag(STARTADCORE);
     834        profiler->Start(ADCORE);
    834835        ad_core(this);     
    835         profiler->Tag(FINISHADCORE);
     836        profiler->Stop(ADCORE);
    836837
    837838        /*some profiling results for the core: */
     
    839840        if(profiling){
    840841
    841                 solution_time=profiler->DeltaTime(STARTCORE,FINISHCORE);
    842                 solution_flops=profiler->DeltaFlops(STARTCORE,FINISHCORE);
    843                 solution_memory=profiler->Memory(FINISHCORE);
     842                solution_time=profiler->TotalTime(CORE);
     843                solution_flops=profiler->TotalFlops(CORE);
     844                solution_memory=profiler->Memory(CORE);
    844845
    845846                _printf0_("Core solution elapsed time    : " << solution_time   << " Seconds\n");
     
    853854
    854855                #ifdef _HAVE_ADOLC_
    855                 solution_time=profiler->DeltaTime(STARTADCORE,FINISHADCORE);
    856                 solution_flops=profiler->DeltaFlops(STARTADCORE,FINISHADCORE);
    857                 solution_memory=profiler->Memory(FINISHADCORE);
     856                solution_time=profiler->TotalTime(ADCORE);
     857                solution_flops=profiler->TotalFlops(ADCORE);
     858                solution_memory=profiler->Memory(ADCORE);
    858859
    859860                _printf0_("AD Solution elapsed time    : " << solution_time   << " Seconds\n");
     
    47284729        /*Start profiler: */
    47294730        this->profiler=new Profiler();
    4730         profiler->Tag(START);
     4731        profiler->Start(TOTAL);
    47314732
    47324733        /*From command line arguments, retrieve different filenames needed to create the FemModel: */
     
    47344735       
    47354736        /*Create femmodel from input files: */
    4736         profiler->Tag(STARTINIT);
     4737        profiler->Start(START);
    47374738        this->InitFromBuffers((char*)buffer,buffersize,toolkits, solution_type,trace,NULL);
    4738         profiler->Tag(FINISHINIT);
     4739        profiler->Stop(MPROCESSOR);
    47394740       
    47404741        /*Save communicator in the parameters dataset: */
     
    47544755       
    47554756        /*Before we delete the profiler, report statistics for this run: */
    4756         profiler->Tag(FINISH);  //final tagging
     4757        profiler->Stop(TOTAL);  //final tagging
    47574758        _printf0_("\n");
    4758         _printf0_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<profiler->DeltaTime(STARTINIT,FINISHINIT) << "\n");
    4759         _printf0_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<profiler->DeltaTime(STARTCORE,FINISHCORE) << "\n");
     4759        _printf0_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<profiler->TotalTime(MPROCESSOR) << "\n");
     4760        _printf0_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<profiler->TotalTime(CORE) << "\n");
    47604761        _printf0_("\n");
    47614762        _printf0_("   Total elapsed time: "
    4762                                 <<profiler->DeltaTimeModHour(START,FINISH)<<" hrs "
    4763                                 <<profiler->DeltaTimeModMin(START,FINISH)<<" min "
    4764                                 <<profiler->DeltaTimeModSec(START,FINISH)<<" sec"
     4763                                <<profiler->TotalTimeModHour(TOTAL)<<" hrs "
     4764                                <<profiler->TotalTimeModMin(TOTAL)<<" min "
     4765                                <<profiler->TotalTimeModSec(TOTAL)<<" sec"
    47654766                                );
    47664767        _printf0_("\n");
  • issm/trunk-jpl/src/c/classes/Profiler.cpp

    r20955 r22551  
    33 */
    44
    5 /*Include files: {{{*/
     5/*Include files*/
    66#ifdef HAVE_CONFIG_H
    77        #include <config.h>
     
    1111
    1212#include "./Profiler.h"
    13 #include "./Params/DoubleParam.h"
    1413#include "../toolkits/toolkits.h"
    15 /*}}}*/
    1614
    1715/*Profiler constructors and destructors:*/
    1816Profiler::Profiler(){/*{{{*/
    1917        for(int i=0;i<MAXIMUMSIZE;i++){
    20                 this->time[i]  =NAN;
    21                 this->flops[i] =NAN;
    22                 this->memory[i]=NAN;
     18                this->time[i]          = 0.;
     19                this->time_start[i]    = 0.;
     20                this->flops[i]         = 0.;
     21                this->flops_start[i]   = 0.;
     22                this->memory[i]        = 0.;
     23                this->memory_start[i]  = 0.;
     24                this->running[i]       = false;
    2325        }
    2426} /*}}}*/
     
    4244/*Object virtual functions definitions:*/
    4345void Profiler::DeepEcho(void){/*{{{*/
    44 
    4546        this->Echo();
    46 
    47 }
    48 /*}}}*/
     47}/*}}}*/
    4948void Profiler::Echo(void){/*{{{*/
    5049
     
    5251        for(int i=0;i<MAXIMUMSIZE;i++){
    5352                _printf_("    Tag "<<i<<":\n");
    54                 _printf_("       flops:  "<<this->flops[i]<<"\n");
    55                 _printf_("       memory: "<<this->memory[i]<<"\n");
    56                 _printf_("       time:   "<<this->time[i]<<"\n");
    57         }
    58 
    59 }
    60 /*}}}*/
    61 int  Profiler::Id(void){ return -1; }/*{{{*/
     53                _printf_("       flops:   "<<this->flops[i]<<"\n");
     54                _printf_("       memory:  "<<this->memory[i]<<"\n");
     55                _printf_("       time:    "<<this->time[i]<<"\n");
     56                _printf_("       running: "<<this->time[i]<<"\n");
     57        }
     58
     59}
     60/*}}}*/
     61int  Profiler::Id(void){ /*{{{*/
     62        return -1;
     63}
    6264/*}}}*/
    6365void Profiler::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
    6466
    6567        IssmDouble* pointer = NULL;
     68        bool*       bpointer = NULL;
    6669
    6770        MARSHALLING_ENUM(ProfilerEnum);
    6871        pointer = &this->time[0];
    69         MARSHALLING_DYNAMIC(pointer,IssmDouble,MAXIMUMSIZE);
     72        MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXIMUMSIZE);
    7073        pointer = &this->flops[0];
    71         MARSHALLING_DYNAMIC(pointer,IssmDouble,MAXIMUMSIZE);
     74        MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXIMUMSIZE);
    7275        pointer = &this->memory[0];
    73         MARSHALLING_DYNAMIC(pointer,IssmDouble,MAXIMUMSIZE);
     76        MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXIMUMSIZE);
     77        bpointer = &this->running[0];
     78        MARSHALLING_DYNAMIC(bpointer,bool,MAXIMUMSIZE);
    7479
    7580} /*}}}*/
    7681int  Profiler::ObjectEnum(void){/*{{{*/
    77 
    7882        return ProfilerEnum;
    79 
    80 }
    81 /*}}}*/
     83}/*}}}*/
    8284
    8385/*Profiler routines:*/
    84 IssmDouble  Profiler::DeltaFlops(int inittag, int finaltag){/*{{{*/
     86IssmPDouble  Profiler::TotalFlops(int tag){/*{{{*/
     87
     88        /*Get tag*/
     89        _assert_(tag>=0);
     90        _assert_(tag<MAXIMUMSIZE);
     91        if(this->running[tag]) _error_("Tag "<<tag<<" has not been stopped");
     92
     93        return this->flops[tag];
     94}/*}}}*/
     95IssmPDouble  Profiler::TotalTime(int tag){/*{{{*/
     96
     97        /*Get tag*/
     98        _assert_(tag>=0);
     99        _assert_(tag<MAXIMUMSIZE);
     100        if(this->running[tag]) _error_("Tag "<<tag<<" has not been stopped");
     101
     102
     103        #ifdef _HAVE_MPI_
     104        return this->time[tag];
     105        #else
     106        return this->time[tag]/CLOCKS_PER_SEC;
     107        #endif
     108}
     109/*}}}*/
     110int Profiler::TotalTimeModHour(int tag){/*{{{*/
     111
     112        IssmPDouble delta = this->TotalTime(tag);
     113        return int((reCast<int,IssmPDouble>(delta))/3600);
     114
     115}
     116/*}}}*/
     117int Profiler::TotalTimeModMin(int tag){/*{{{*/
     118
     119        IssmPDouble delta = this->TotalTime(tag);
     120        return int(int(reCast<int,IssmPDouble>(delta))%3600/60);
     121}
     122/*}}}*/
     123int Profiler::TotalTimeModSec(int tag){/*{{{*/
     124
     125        IssmPDouble delta = this->TotalTime(tag);
     126        return int(reCast<int,IssmPDouble>(delta)%60);
     127}
     128/*}}}*/
     129IssmDouble  Profiler::Memory(int tag){/*{{{*/
    85130
    86131        /*Get initial flops*/
    87         _assert_(inittag>=0);
    88         _assert_(inittag<MAXIMUMSIZE);
    89         if(xIsNan<IssmDouble>(this->flops[inittag])) _error_("Tag not set");
    90         IssmDouble init = this->flops[inittag];
    91 
    92         /*Get final flops*/
    93         _assert_(finaltag>=0);
    94         _assert_(finaltag<MAXIMUMSIZE);
    95         if(xIsNan<IssmDouble>(this->flops[finaltag])) _error_("Tag not set");
    96         IssmDouble final = this->flops[finaltag];
    97 
    98         return final-init;
    99 }
    100 /*}}}*/
    101 IssmDouble  Profiler::DeltaTime(int inittag, int finaltag){/*{{{*/
    102 
    103         /*Get initial time*/
    104         _assert_(inittag>=0);
    105         _assert_(inittag<MAXIMUMSIZE);
    106         if(xIsNan<IssmDouble>(this->time[inittag])) _error_("Tag "<<inittag<<" not set");
    107         IssmDouble init = this->time[inittag];
    108 
    109         /*Get final time*/
    110         _assert_(finaltag>=0);
    111         _assert_(finaltag<MAXIMUMSIZE);
    112         if(xIsNan<IssmDouble>(this->time[finaltag])) _error_("Tag "<<finaltag<<" not set");
    113         IssmDouble final = this->time[finaltag];
    114 
    115         #ifdef _HAVE_MPI_
    116         return final-init;
    117         #else
    118         return (final-init)/CLOCKS_PER_SEC;
    119         #endif
    120 }
    121 /*}}}*/
    122 int Profiler::DeltaTimeModHour(int inittag, int finishtag){/*{{{*/
    123 
    124         IssmDouble delta = this->DeltaTime(inittag,finishtag);
    125         return int((reCast<int,IssmDouble>(delta))/3600);
    126 
    127 }
    128 /*}}}*/
    129 int Profiler::DeltaTimeModMin(int inittag, int finishtag){/*{{{*/
    130 
    131         IssmDouble delta = this->DeltaTime(inittag,finishtag);
    132         return int(int(reCast<int,IssmDouble>(delta))%3600/60);
    133 }
    134 /*}}}*/
    135 int Profiler::DeltaTimeModSec(int inittag, int finishtag){/*{{{*/
    136 
    137         IssmDouble delta = this->DeltaTime(inittag,finishtag);
    138         return int(reCast<int,IssmDouble>(delta)%60);
    139 }
    140 /*}}}*/
    141 IssmDouble  Profiler::Memory(int tag){/*{{{*/
    142 
    143         /*Get initial flops*/
    144         _assert_(tag>=0);
    145         _assert_(tag<MAXIMUMSIZE);
    146         if(xIsNan<IssmDouble>(this->flops[tag])) _error_("Tag not set");
     132        _assert_(tag>=0);
     133        _assert_(tag<MAXIMUMSIZE);
     134        if(this->running[tag]) _error_("Tag "<<tag<<" has not been stopped");
     135
    147136        return this->memory[tag];
    148137}
    149138/*}}}*/
    150 void  Profiler::Tag(int tagenum,bool dontmpisync){/*{{{*/
    151 
    152         IssmDouble t;
    153         IssmDouble f;
    154         IssmDouble m;
    155 
    156         /*If mpisync requested, make sure all the cpus are at the same point
    157          *in the execution: */
     139void  Profiler::Start(int tag,bool dontmpisync){/*{{{*/
     140
     141        /*Check tag*/
     142        _assert_(tag>=0);
     143        _assert_(tag<MAXIMUMSIZE);
     144        if(this->running[tag]) _error_("Tag "<<tag<<" is already running");
     145
     146
     147        /*If mpisync requested, make sure all the cpus are at the same point in the execution: */
    158148        if(!dontmpisync){
    159149                ISSM_MPI_Barrier(IssmComm::GetComm());
     
    162152        /*Capture time: */
    163153        #ifdef _HAVE_MPI_
    164         t=ISSM_MPI_Wtime();
    165         #else
    166         t=(IssmPDouble)clock();
     154        IssmPDouble t=ISSM_MPI_Wtime();
     155        #else
     156        IssmPDouble t=(IssmPDouble)clock();
    167157        #endif
    168158
    169159        /*Capture flops: */
     160        IssmPDouble f = 0.;
     161        IssmPDouble m = 0.;
    170162        #ifdef _HAVE_PETSC_
    171163                PetscGetFlops(&f);
     
    176168
    177169        /*Plug into this->time: */
    178         _assert_(tagenum>=0);
    179         _assert_(tagenum<MAXIMUMSIZE);
    180         if(!xIsNan<IssmDouble>(this->time[tagenum])) _error_("Tag already exists");
    181         this->time[tagenum]  = t;
    182         if(!xIsNan<IssmDouble>(this->flops[tagenum])) _error_("Tag already exists");
    183         this->flops[tagenum] = f;
    184         if(!xIsNan<IssmDouble>(this->memory[tagenum])) _error_("Tag already exists");
    185         this->memory[tagenum]= m;
    186 
    187 }
    188 /*}}}*/
     170        _assert_(tag>=0);
     171        _assert_(tag<MAXIMUMSIZE);
     172        this->time_start[tag]   = t;
     173        this->flops_start[tag]  = f;
     174        this->memory_start[tag] = m;
     175
     176        /*turn on running*/
     177        this->running[tag] = true;
     178}/*}}}*/
     179void  Profiler::Stop(int tag,bool dontmpisync){/*{{{*/
     180
     181        /*Check tag*/
     182        _assert_(tag>=0);
     183        _assert_(tag<MAXIMUMSIZE);
     184        if(!this->running[tag]) _error_("Tag "<<tag<<" is not running");
     185
     186
     187        /*If mpisync requested, make sure all the cpus are at the same point in the execution: */
     188        if(!dontmpisync){
     189                ISSM_MPI_Barrier(IssmComm::GetComm());
     190        }
     191
     192        /*Capture time: */
     193        #ifdef _HAVE_MPI_
     194        IssmPDouble t=ISSM_MPI_Wtime();
     195        #else
     196        IssmPDouble t=(IssmPDouble)clock();
     197        #endif
     198
     199        /*Capture flops: */
     200        IssmPDouble f = 0.;
     201        IssmPDouble m = 0.;
     202        #ifdef _HAVE_PETSC_
     203        PetscGetFlops(&f);
     204        PetscMemoryGetCurrentUsage(&m);
     205        #else
     206        /*do nothing for now:*/
     207        #endif
     208
     209        /*Plug into this->time: */
     210        _assert_(tag>=0);
     211        _assert_(tag<MAXIMUMSIZE);
     212        this->time[tag]   += t - this->time_start[tag];
     213        this->flops[tag]  += f - this->flops_start[tag];
     214        this->memory[tag] += m - this->memory_start[tag];
     215
     216        /*turn off running*/
     217        this->running[tag] = false;
     218}/*}}}*/
  • issm/trunk-jpl/src/c/classes/Profiler.h

    r20810 r22551  
    77
    88/*Headers:*/
    9 /*{{{*/
     9#include "../shared/shared.h"
    1010#include "../datastructures/datastructures.h"
    11 #include "../shared/shared.h"
    12 /*}}}*/
    1311
    14 class DoubleParam;
    15 
    16 #define START 0
    17 #define STARTINIT 1
    18 #define FINISHINIT 2
    19 #define STARTCORE 3
    20 #define FINISHCORE 4
    21 #define STARTADCORE 5
    22 #define FINISHADCORE 6
    23 #define FINISH 7
    24 #define MAXIMUMSIZE 8
     12/*Macros*/
     13#define TOTAL 0      /*Profiling Total time */
     14#define MPROCESSOR 1 /*Profiling Model processor*/
     15#define CORE 2       /*Profiling solution */
     16#define SOLVER 3     /*Profiling solution */
     17#define ADCORE 4     /*Profiling AD */
     18#define MAXIMUMSIZE 5
    2519
    2620class Profiler: public Object{
    2721
    2822        public:
    29                 IssmDouble flops[MAXIMUMSIZE];
    30                 IssmDouble memory[MAXIMUMSIZE];
    31                 IssmDouble time[MAXIMUMSIZE];
     23                IssmPDouble flops[MAXIMUMSIZE];
     24                IssmPDouble flops_start[MAXIMUMSIZE];
     25                IssmPDouble memory[MAXIMUMSIZE];
     26                IssmPDouble memory_start[MAXIMUMSIZE];
     27                IssmPDouble time[MAXIMUMSIZE];
     28                IssmPDouble time_start[MAXIMUMSIZE];
     29                bool        running[MAXIMUMSIZE];
    3230
    33                 /*Profiler constructors, destructors {{{*/
     31                /*Profiler constructors, destructors */
    3432                Profiler();
    3533                ~Profiler();
    36                 /*}}}*/
    37                 /*Object virtual functions definitions:{{{ */
     34
     35                /*Object virtual functions definitions*/
    3836                Object *copy();
    3937                void    DeepEcho();
    4038                void    Echo();
    4139                int     Id();
    42                 void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
     40                void    Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
    4341                int     ObjectEnum();
    44                 /*}}}*/
    45                 /*Profiler routines {{{*/
    46                 IssmDouble  DeltaFlops(int inittag, int finaltag);
    47                 IssmDouble  DeltaTime(int inittag, int finaltag);
    48                 int     DeltaTimeModHour(int inittag, int finaltag);
    49                 int     DeltaTimeModMin(int inittag, int finaltag);
    50                 int     DeltaTimeModSec(int inittag, int finaltag);
    51                 IssmDouble  Memory(int tag);
    52                 void    Tag(int tagenum,bool dontmpisync=false);
    53                 /*}}}*/
     42
     43                /*Profiler routines*/
     44                IssmPDouble  TotalFlops(int tag);
     45                IssmPDouble  TotalTime(int tag);
     46                int          TotalTimeModHour(int tag);
     47                int          TotalTimeModMin(int tag);
     48                int          TotalTimeModSec(int tag);
     49                IssmPDouble  Memory(int tag);
     50                void         Start(int tagenum,bool dontmpisync=false);
     51                void         Stop(int tagenum,bool dontmpisync=false);
    5452};
    5553
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_adjoint_linear.cpp

    r16126 r22551  
    2929        CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    3030        Reduceloadx(pf, Kfs, ys,true); delete Kfs; //true means spc = 0
     31
     32        femmodel->profiler->Start(SOLVER);
    3133        Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); delete Kff; delete pf; delete df;
     34        femmodel->profiler->Stop(SOLVER);
     35
    3236        Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters,true); delete ys; //true means spc0
    3337        InputUpdateFromSolutionx(femmodel,ug);
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_fct.cpp

    r19386 r22551  
    404404       
    405405        /*Go solve lower order solution*/
     406        femmodel->profiler->Start(SOLVER);
    406407        SolverxPetsc(&u,LHS,RHS,NULL,NULL, femmodel->parameters);
     408        femmodel->profiler->Stop(SOLVER);
    407409        MatFree(&LHS);
    408410        VecFree(&RHS);
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp

    r22285 r22551  
    104104                                Reduceloadx(pf,Kfs,ys); delete Kfs;
    105105                                delete uf_sed;
     106
     107                                femmodel->profiler->Start(SOLVER);
    106108                                Solverx(&uf_sed,Kff,pf,uf_sed_sub_iter,df,femmodel->parameters);
     109                                femmodel->profiler->Stop(SOLVER);
     110
    107111                                delete Kff; delete pf; delete df;
    108112                                delete ug_sed;
     
    186190                                Reduceloadx(pf,Kfs,ys); delete Kfs;
    187191                                delete uf_epl;
     192                                femmodel->profiler->Start(SOLVER);
    188193                                Solverx(&uf_epl,Kff,pf,uf_epl_sub_iter,df,femmodel->parameters);
     194                                femmodel->profiler->Stop(SOLVER);
    189195                                delete Kff; delete pf; delete df;
    190196                                delete uf_epl_sub_iter;
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la.cpp

    r19094 r22551  
    6464                        CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    6565                        Reduceloadx(pf, Kfs, ys); delete Kfs;
     66
     67                        femmodel->profiler->Start(SOLVER);
    6668                        Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters);
     69                        femmodel->profiler->Stop(SOLVER);
     70
    6771                        delete Kff; delete pf; delete df;
    6872                        Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete uf; delete ys;
     
    9599                CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    96100                Reduceloadx(pf, Kfs, ys); delete Kfs;
     101
     102                femmodel->profiler->Start(SOLVER);
    97103                Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters);
     104                femmodel->profiler->Stop(SOLVER);
     105
    98106                delete Kff; delete pf; delete df;
    99107                Mergesolutionfromftogx(&pug, uf,ys,femmodel->nodes,femmodel->parameters); delete uf; delete ys;
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la_theta.cpp

    r19094 r22551  
    5959                CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    6060                Reduceloadx(pf, Kfs, ys); delete Kfs;
     61
     62                femmodel->profiler->Start(SOLVER);
    6163                Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters);
     64                femmodel->profiler->Stop(SOLVER);
     65
    6266                delete Kff; delete pf; delete df;
    6367                Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete uf; delete ys;
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_linear.cpp

    r21570 r22551  
    3535        CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    3636        Reduceloadx(pf, Kfs, ys); delete Kfs;
     37
     38        femmodel->profiler->Start(SOLVER);
    3739        Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters);
     40        femmodel->profiler->Stop(SOLVER);
    3841       
    3942        /*Check that the solver converged nicely: */
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_newton.cpp

    r19150 r22551  
    6363                        CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    6464                        Reduceloadx(pf,Kfs,ys);delete Kfs;
     65                        femmodel->profiler->Start(SOLVER);
    6566                        Solverx(&uf,Kff,pf,old_uf,df,femmodel->parameters);delete df; delete Kff; delete pf;
     67                        femmodel->profiler->Stop(SOLVER);
    6668                        Mergesolutionfromftogx(&ug,uf,ys,femmodel->nodes,femmodel->parameters);delete ys;
    6769                        InputUpdateFromSolutionx(femmodel,ug);
     
    8183
    8284                CreateJacobianMatrixx(&Jff,femmodel,kmax);
     85                femmodel->profiler->Start(SOLVER);
    8386                Solverx(&duf,Jff,pJf,NULL,NULL,femmodel->parameters); delete Jff; delete pJf;
     87                femmodel->profiler->Stop(SOLVER);
    8488                uf->AXPY(duf, 1.0); delete duf;
    8589                Mergesolutionfromftogx(&ug,uf,ys,femmodel->nodes,femmodel->parameters);delete ys;
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_nonlinear.cpp

    r21451 r22551  
    6767                CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    6868                Reduceloadx(pf, Kfs, ys); delete Kfs;
     69                femmodel->profiler->Start(SOLVER);
    6970                Solverx(&uf, Kff, pf, old_uf, df, femmodel->parameters);
     71                femmodel->profiler->Stop(SOLVER);
    7072                Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete ys;
    7173
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_shakti_nonlinear.cpp

    r22372 r22551  
    5252                CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    5353                Reduceloadx(pf, Kfs, ys); delete Kfs;
     54                femmodel->profiler->Start(SOLVER);
    5455                Solverx(&uf, Kff, pf, old_uf, df, femmodel->parameters);
     56                femmodel->profiler->Stop(SOLVER);
    5557                Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete ys;
    5658
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp

    r18619 r22551  
    6868                CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    6969                Reduceloadx(pf_horiz, Kfs_horiz, ys); delete Kfs_horiz;
     70                femmodel->profiler->Start(SOLVER);
    7071                Solverx(&uf_horiz, Kff_horiz, pf_horiz, old_uf_horiz, df_horiz,femmodel->parameters);
     72                femmodel->profiler->Stop(SOLVER);
    7173                Mergesolutionfromftogx(&ug_horiz, uf_horiz,ys,femmodel->nodes,femmodel->parameters); delete ys;
    7274                InputUpdateFromSolutionx(femmodel,ug_horiz);
     
    8284                CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    8385                Reduceloadx(pf_vert, Kfs_vert, ys); delete Kfs_vert;
     86                femmodel->profiler->Start(SOLVER);
    8487                Solverx(&uf_vert, Kff_vert, pf_vert, NULL, df_vert,femmodel->parameters); delete Kff_vert; delete pf_vert; delete df_vert;
     88                femmodel->profiler->Stop(SOLVER);
    8589                Mergesolutionfromftogx(&ug_vert, uf_vert,ys,femmodel->nodes,femmodel->parameters);
    8690                delete uf_vert;
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequence_thermal_nonlinear.cpp

    r19150 r22551  
    7777                CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
    7878                Reduceloadx(pf, Kfs, ys); delete Kfs;
     79                femmodel->profiler->Start(SOLVER);
    7980                Solverx(&tf, Kff, pf, tf_old, df, femmodel->parameters);
     81                femmodel->profiler->Stop(SOLVER);
    8082                Mergesolutionfromftogx(&tg, tf,ys,femmodel->nodes,femmodel->parameters); delete ys;
    8183                if(isenthalpy){
Note: See TracChangeset for help on using the changeset viewer.