Changeset 23232


Ignore:
Timestamp:
09/10/18 01:18:13 (7 years ago)
Author:
rueckamp
Message:

CHG: added core solution profiling

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

Legend:

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

    r23229 r23232  
    865865                _printf0_("Individual core profiling\n");
    866866                if(profiler->Used(THERMALCORE)) _printf0_("   "<<setw(40)<<left<<"Thermal core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(THERMALCORE) << " sec\n");
     867                if(profiler->Used(HYDROLOGYCORE)) _printf0_("   "<<setw(40)<<left<<"Hydrology core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(HYDROLOGYCORE) << " sec\n");
    867868                if(profiler->Used(STRESSBALANCECORE)) _printf0_("   "<<setw(40)<<left<<"Stress balance core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(STRESSBALANCECORE) << " sec\n");
     869                if(profiler->Used(DAMAGECORE)) _printf0_("   "<<setw(40)<<left<<"Damage core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(DAMAGECORE) << " sec\n");
     870                if(profiler->Used(MOVINGFRONTCORE)) _printf0_("   "<<setw(40)<<left<<"Moving front core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(MOVINGFRONTCORE) << " sec\n");
    868871                if(profiler->Used(MASSTRANSPORTCORE)) _printf0_("   "<<setw(40)<<left<<"Mass transport core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(MASSTRANSPORTCORE) << " sec\n");
     872                if(profiler->Used(SMBCORE)) _printf0_("   "<<setw(40)<<left<<"SMB core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(SMBCORE) << " sec\n");
     873                if(profiler->Used(GROUNDINGLINECORE)) _printf0_("   "<<setw(40)<<left<<"Groundingline migration core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(GROUNDINGLINECORE) << " sec\n");
     874                if(profiler->Used(GIACORE)) _printf0_("   "<<setw(40)<<left<<"GIA core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(GIACORE) << " sec\n");
     875                if(profiler->Used(ESACORE)) _printf0_("   "<<setw(40)<<left<<"ESA core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(ESACORE) << " sec\n");
     876                if(profiler->Used(SLRCORE)) _printf0_("   "<<setw(40)<<left<<"SLR core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(SLRCORE) << " sec\n");
    869877               
    870 
    871878                /*Add to results: */
    872879                results->AddObject(new GenericExternalResult<IssmDouble>(results->Size()+1, ProfilingSolutionTimeEnum,  solution_time));
  • issm/trunk-jpl/src/c/classes/Profiler.h

    r23228 r23232  
    1616#define SOLVER             3 /*Profiling solution */
    1717#define ADCORE             4 /*Profiling AD */
    18 #define THERMALCORE        5 /*Profiling THERMAL */
    19 #define STRESSBALANCECORE  6 /*Profiling STRESSBALANCE */
    20 #define MASSTRANSPORTCORE  7 /*Profiling MASSTRANSPORT */
    21 #define MAXPROFSIZE        8 /*Used to initialize static arrays*/
     18#define THERMALCORE                     5 /*Profiling THERMAL */
     19#define HYDROLOGYCORE           6 /*Profiling HYDROLOGY */
     20#define STRESSBALANCECORE       7 /*Profiling STRESSBALANCE */
     21#define DAMAGECORE                      8 /*Profiling DAMAGE */
     22#define MOVINGFRONTCORE         9 /*Profiling MOVINGFRONT */
     23#define MASSTRANSPORTCORE       10 /*Profiling MASSTRANSPORT */
     24#define SMBCORE                         11 /*Profiling SMB */
     25#define GROUNDINGLINECORE       12 /*Profiling GROUDINGLINE MIGRATION */
     26#define GIACORE                         13 /*Profiling GIA */
     27#define ESACORE                         14 /*Profiling ESA */
     28#define SLRCORE                         15 /*Profiling SLR */
     29#define MAXPROFSIZE                     16 /*Used to initialize static arrays*/
    2230
    2331class Profiler: public Object{
  • issm/trunk-jpl/src/c/cores/damage_core.cpp

    r23066 r23232  
    1111
    1212void damage_core(FemModel* femmodel){
    13 
     13       
     14        /*Start profiler*/
     15        femmodel->profiler->Start(DAMAGECORE);
     16       
    1417        /*intermediary*/
    1518        bool   save_results;
     
    4851                xDelete<char*>(requested_outputs);
    4952        }
     53       
     54        /*End profiler*/
     55        femmodel->profiler->Stop(DAMAGECORE);
    5056}
  • issm/trunk-jpl/src/c/cores/esa_core.cpp

    r23066 r23232  
    1111
    1212void esa_core(FemModel* femmodel){ /*{{{*/
     13
     14        /*Start profiler*/
     15        femmodel->profiler->Start(ESACORE);
    1316
    1417        Vector<IssmDouble> *U_radial  = NULL;
     
    112115                if(numoutputs){for(int i=0;i<numoutputs;i++){xDelete<char>(requested_outputs[i]);} xDelete<char*>(requested_outputs);}
    113116        }
     117       
     118        /*End profiler*/
     119        femmodel->profiler->Stop(ESACORE);
    114120
    115121}
  • issm/trunk-jpl/src/c/cores/gia_core.cpp

    r23066 r23232  
    1010#include "../solutionsequences/solutionsequences.h"
    1111void gia_core(FemModel* femmodel){
     12
     13        /*Start profiler*/
     14        femmodel->profiler->Start(GIACORE);
    1215
    1316        Vector<IssmDouble> *wg    = NULL;
     
    5659        xDelete<IssmDouble>(x);
    5760        xDelete<IssmDouble>(y);
     61       
     62        /*End profiler*/
     63        femmodel->profiler->Stop(GIACORE);
    5864}
  • issm/trunk-jpl/src/c/cores/hydrology_core.cpp

    r23093 r23232  
    1212void hydrology_core(FemModel* femmodel){
    1313
     14        /*Start profiler*/
     15        femmodel->profiler->Start(HYDROLOGYCORE);
     16       
    1417        /*intermediary*/
    1518        int          hydrology_model;
     
    150153                xDelete<char*>(requested_outputs);
    151154        }
     155       
     156        /*End profiler*/
     157        femmodel->profiler->Stop(HYDROLOGYCORE);
    152158}
  • issm/trunk-jpl/src/c/cores/movingfront_core.cpp

    r22989 r23232  
    1111
    1212void movingfront_core(FemModel* femmodel){
     13       
     14        /*Start profiler*/
     15        femmodel->profiler->Start(MOVINGFRONTCORE);
    1316
    1417        /* intermediaries */
     
    98101                femmodel->RequestedOutputsx(&femmodel->results,&outputs[0],1);
    99102        }
     103       
     104        /*End profiler*/
     105        femmodel->profiler->Stop(MOVINGFRONTCORE);
    100106}
  • issm/trunk-jpl/src/c/cores/sealevelrise_core.cpp

    r23066 r23232  
    1313void sealevelrise_core(FemModel* femmodel){ /*{{{*/
    1414
     15        /*Start profiler*/
     16        femmodel->profiler->Start(SLRCORE);
     17
    1518        /*Parameters, variables:*/
    1619        bool save_results;
     
    5457        /*requested dependents: */
    5558        if(solution_type==SealevelriseSolutionEnum)femmodel->RequestedDependentsx();
     59       
     60        /*End profiler*/
     61        femmodel->profiler->Stop(SLRCORE);
    5662}
    5763/*}}}*/
  • issm/trunk-jpl/src/c/cores/smb_core.cpp

    r23066 r23232  
    1111
    1212void smb_core(FemModel* femmodel){
    13 
     13       
     14        /*Start profiler*/
     15        femmodel->profiler->Start(SMBCORE);
     16       
    1417        /*parameters: */
    1518        Analysis* analysis=NULL;
     
    4548        /*Free ressources:*/
    4649        if(numoutputs){for(int i=0;i<numoutputs;i++){xDelete<char>(requested_outputs[i]);} xDelete<char*>(requested_outputs);}
     50
     51        /*End profiler*/
     52        femmodel->profiler->Stop(SMBCORE);
    4753}
  • issm/trunk-jpl/src/c/cores/transient_core.cpp

    r23081 r23232  
    401401
    402402                if(isgroundingline){
     403               
     404                        /*Start profiler*/
     405                        femmodel->profiler->Start(GROUNDINGLINECORE);
     406               
    403407                        if(VerboseSolution()) _printf0_("   computing new grounding line position\n");
    404408                        GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
     
    410414                        femmodel->parameters->SetParam(SurfaceEnum,InputToExtrudeEnum);
    411415                        extrudefrombase_core(femmodel);
     416                       
     417                        /*Stop profiler*/
     418                        femmodel->profiler->Stop(GROUNDINGLINECORE);
    412419
    413420                        if(save_results){
Note: See TracChangeset for help on using the changeset viewer.