Changeset 22551
- Timestamp:
- 03/16/18 15:48:35 (7 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Dakota/IssmParallelDirectApplicInterface.cpp
r21878 r22551 24 24 if(world_rank!=0){ 25 25 femmodel_init= new FemModel(argc,argv,evaluation_comm); 26 femmodel_init->profiler-> Tag(STARTCORE);26 femmodel_init->profiler->Start(CORE); 27 27 } 28 28 … … 37 37 38 38 /*Wrap up: */ 39 femmodel_init->profiler-> Tag(FINISHCORE);39 femmodel_init->profiler->Stop(CORE); 40 40 femmodel_init->CleanUp(); //only close file pointers on rank 0 of slave 1! 41 41 -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r22418 r22551 68 68 /*Start profiler: */ 69 69 this->profiler=new Profiler(); 70 profiler-> Tag(START);70 profiler->Start(TOTAL); 71 71 72 72 /*From command line arguments, retrieve different filenames needed to create the FemModel: */ … … 74 74 75 75 /*Create femmodel from input files: */ 76 profiler-> Tag(STARTINIT);76 profiler->Start(MPROCESSOR); 77 77 this->InitFromFiles(rootpath,binfilename,outbinfilename,petscfilename,lockfilename,restartfilename, solution_type,trace,NULL); 78 profiler-> Tag(FINISHINIT);78 profiler->Stop(MPROCESSOR); 79 79 80 80 /*Save communicator in the parameters dataset: */ … … 142 142 143 143 /*Create femmodel from input files, with trace activated: */ 144 profiler-> Tag(STARTINIT);144 profiler->Start(MPROCESSOR); 145 145 this->InitFromFiles(rootpath,inputfilename,outputfilename,toolkitsfilename,lockfilename,restartfilename, solution_type,traceon,X); 146 profiler-> Tag(FINISHINIT);146 profiler->Stop(MPROCESSOR); 147 147 148 148 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_ADOLC_) … … 253 253 254 254 /*Before we delete the profiler, report statistics for this run: */ 255 profiler-> Tag(FINISH); //final tagging255 profiler->Stop(TOTAL); //final tagging 256 256 _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"); 259 260 _printf0_("\n"); 260 261 _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" 264 265 ); 265 266 _printf0_("\n"); … … 826 827 827 828 /*run solution core: */ 828 profiler-> Tag(STARTCORE);829 profiler->Start(CORE); 829 830 solutioncore(this); 830 profiler-> Tag(FINISHCORE);831 profiler->Stop(CORE); 831 832 832 833 /*run AD core if needed: */ 833 profiler-> Tag(STARTADCORE);834 profiler->Start(ADCORE); 834 835 ad_core(this); 835 profiler-> Tag(FINISHADCORE);836 profiler->Stop(ADCORE); 836 837 837 838 /*some profiling results for the core: */ … … 839 840 if(profiling){ 840 841 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); 844 845 845 846 _printf0_("Core solution elapsed time : " << solution_time << " Seconds\n"); … … 853 854 854 855 #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); 858 859 859 860 _printf0_("AD Solution elapsed time : " << solution_time << " Seconds\n"); … … 4728 4729 /*Start profiler: */ 4729 4730 this->profiler=new Profiler(); 4730 profiler-> Tag(START);4731 profiler->Start(TOTAL); 4731 4732 4732 4733 /*From command line arguments, retrieve different filenames needed to create the FemModel: */ … … 4734 4735 4735 4736 /*Create femmodel from input files: */ 4736 profiler-> Tag(STARTINIT);4737 profiler->Start(START); 4737 4738 this->InitFromBuffers((char*)buffer,buffersize,toolkits, solution_type,trace,NULL); 4738 profiler-> Tag(FINISHINIT);4739 profiler->Stop(MPROCESSOR); 4739 4740 4740 4741 /*Save communicator in the parameters dataset: */ … … 4754 4755 4755 4756 /*Before we delete the profiler, report statistics for this run: */ 4756 profiler-> Tag(FINISH); //final tagging4757 profiler->Stop(TOTAL); //final tagging 4757 4758 _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"); 4760 4761 _printf0_("\n"); 4761 4762 _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" 4765 4766 ); 4766 4767 _printf0_("\n"); -
issm/trunk-jpl/src/c/classes/Profiler.cpp
r20955 r22551 3 3 */ 4 4 5 /*Include files : {{{*/5 /*Include files*/ 6 6 #ifdef HAVE_CONFIG_H 7 7 #include <config.h> … … 11 11 12 12 #include "./Profiler.h" 13 #include "./Params/DoubleParam.h"14 13 #include "../toolkits/toolkits.h" 15 /*}}}*/16 14 17 15 /*Profiler constructors and destructors:*/ 18 16 Profiler::Profiler(){/*{{{*/ 19 17 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; 23 25 } 24 26 } /*}}}*/ … … 42 44 /*Object virtual functions definitions:*/ 43 45 void Profiler::DeepEcho(void){/*{{{*/ 44 45 46 this->Echo(); 46 47 } 48 /*}}}*/ 47 }/*}}}*/ 49 48 void Profiler::Echo(void){/*{{{*/ 50 49 … … 52 51 for(int i=0;i<MAXIMUMSIZE;i++){ 53 52 _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 /*}}}*/ 61 int Profiler::Id(void){ /*{{{*/ 62 return -1; 63 } 62 64 /*}}}*/ 63 65 void Profiler::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/ 64 66 65 67 IssmDouble* pointer = NULL; 68 bool* bpointer = NULL; 66 69 67 70 MARSHALLING_ENUM(ProfilerEnum); 68 71 pointer = &this->time[0]; 69 MARSHALLING_DYNAMIC(pointer,Issm Double,MAXIMUMSIZE);72 MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXIMUMSIZE); 70 73 pointer = &this->flops[0]; 71 MARSHALLING_DYNAMIC(pointer,Issm Double,MAXIMUMSIZE);74 MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXIMUMSIZE); 72 75 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); 74 79 75 80 } /*}}}*/ 76 81 int Profiler::ObjectEnum(void){/*{{{*/ 77 78 82 return ProfilerEnum; 79 80 } 81 /*}}}*/ 83 }/*}}}*/ 82 84 83 85 /*Profiler routines:*/ 84 IssmDouble Profiler::DeltaFlops(int inittag, int finaltag){/*{{{*/ 86 IssmPDouble 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 }/*}}}*/ 95 IssmPDouble 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 /*}}}*/ 110 int Profiler::TotalTimeModHour(int tag){/*{{{*/ 111 112 IssmPDouble delta = this->TotalTime(tag); 113 return int((reCast<int,IssmPDouble>(delta))/3600); 114 115 } 116 /*}}}*/ 117 int Profiler::TotalTimeModMin(int tag){/*{{{*/ 118 119 IssmPDouble delta = this->TotalTime(tag); 120 return int(int(reCast<int,IssmPDouble>(delta))%3600/60); 121 } 122 /*}}}*/ 123 int Profiler::TotalTimeModSec(int tag){/*{{{*/ 124 125 IssmPDouble delta = this->TotalTime(tag); 126 return int(reCast<int,IssmPDouble>(delta)%60); 127 } 128 /*}}}*/ 129 IssmDouble Profiler::Memory(int tag){/*{{{*/ 85 130 86 131 /*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 147 136 return this->memory[tag]; 148 137 } 149 138 /*}}}*/ 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: */ 139 void 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: */ 158 148 if(!dontmpisync){ 159 149 ISSM_MPI_Barrier(IssmComm::GetComm()); … … 162 152 /*Capture time: */ 163 153 #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(); 167 157 #endif 168 158 169 159 /*Capture flops: */ 160 IssmPDouble f = 0.; 161 IssmPDouble m = 0.; 170 162 #ifdef _HAVE_PETSC_ 171 163 PetscGetFlops(&f); … … 176 168 177 169 /*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 }/*}}}*/ 179 void 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 7 7 8 8 /*Headers:*/ 9 /*{{{*/ 9 #include "../shared/shared.h" 10 10 #include "../datastructures/datastructures.h" 11 #include "../shared/shared.h"12 /*}}}*/13 11 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 25 19 26 20 class Profiler: public Object{ 27 21 28 22 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]; 32 30 33 /*Profiler constructors, destructors {{{*/31 /*Profiler constructors, destructors */ 34 32 Profiler(); 35 33 ~Profiler(); 36 /*}}}*/ 37 /*Object virtual functions definitions :{{{*/34 35 /*Object virtual functions definitions*/ 38 36 Object *copy(); 39 37 void DeepEcho(); 40 38 void Echo(); 41 39 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); 43 41 int ObjectEnum(); 44 /*}}}*/ 45 /*Profiler routines {{{*/46 Issm Double DeltaFlops(int inittag, int finaltag);47 Issm Double 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 Issm Double 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); 54 52 }; 55 53 -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_adjoint_linear.cpp
r16126 r22551 29 29 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 30 30 Reduceloadx(pf, Kfs, ys,true); delete Kfs; //true means spc = 0 31 32 femmodel->profiler->Start(SOLVER); 31 33 Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); delete Kff; delete pf; delete df; 34 femmodel->profiler->Stop(SOLVER); 35 32 36 Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters,true); delete ys; //true means spc0 33 37 InputUpdateFromSolutionx(femmodel,ug); -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_fct.cpp
r19386 r22551 404 404 405 405 /*Go solve lower order solution*/ 406 femmodel->profiler->Start(SOLVER); 406 407 SolverxPetsc(&u,LHS,RHS,NULL,NULL, femmodel->parameters); 408 femmodel->profiler->Stop(SOLVER); 407 409 MatFree(&LHS); 408 410 VecFree(&RHS); -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
r22285 r22551 104 104 Reduceloadx(pf,Kfs,ys); delete Kfs; 105 105 delete uf_sed; 106 107 femmodel->profiler->Start(SOLVER); 106 108 Solverx(&uf_sed,Kff,pf,uf_sed_sub_iter,df,femmodel->parameters); 109 femmodel->profiler->Stop(SOLVER); 110 107 111 delete Kff; delete pf; delete df; 108 112 delete ug_sed; … … 186 190 Reduceloadx(pf,Kfs,ys); delete Kfs; 187 191 delete uf_epl; 192 femmodel->profiler->Start(SOLVER); 188 193 Solverx(&uf_epl,Kff,pf,uf_epl_sub_iter,df,femmodel->parameters); 194 femmodel->profiler->Stop(SOLVER); 189 195 delete Kff; delete pf; delete df; 190 196 delete uf_epl_sub_iter; -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la.cpp
r19094 r22551 64 64 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 65 65 Reduceloadx(pf, Kfs, ys); delete Kfs; 66 67 femmodel->profiler->Start(SOLVER); 66 68 Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); 69 femmodel->profiler->Stop(SOLVER); 70 67 71 delete Kff; delete pf; delete df; 68 72 Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete uf; delete ys; … … 95 99 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 96 100 Reduceloadx(pf, Kfs, ys); delete Kfs; 101 102 femmodel->profiler->Start(SOLVER); 97 103 Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); 104 femmodel->profiler->Stop(SOLVER); 105 98 106 delete Kff; delete pf; delete df; 99 107 Mergesolutionfromftogx(&pug, uf,ys,femmodel->nodes,femmodel->parameters); delete uf; delete ys; -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la_theta.cpp
r19094 r22551 59 59 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 60 60 Reduceloadx(pf, Kfs, ys); delete Kfs; 61 62 femmodel->profiler->Start(SOLVER); 61 63 Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); 64 femmodel->profiler->Stop(SOLVER); 65 62 66 delete Kff; delete pf; delete df; 63 67 Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete uf; delete ys; -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_linear.cpp
r21570 r22551 35 35 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 36 36 Reduceloadx(pf, Kfs, ys); delete Kfs; 37 38 femmodel->profiler->Start(SOLVER); 37 39 Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); 40 femmodel->profiler->Stop(SOLVER); 38 41 39 42 /*Check that the solver converged nicely: */ -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_newton.cpp
r19150 r22551 63 63 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 64 64 Reduceloadx(pf,Kfs,ys);delete Kfs; 65 femmodel->profiler->Start(SOLVER); 65 66 Solverx(&uf,Kff,pf,old_uf,df,femmodel->parameters);delete df; delete Kff; delete pf; 67 femmodel->profiler->Stop(SOLVER); 66 68 Mergesolutionfromftogx(&ug,uf,ys,femmodel->nodes,femmodel->parameters);delete ys; 67 69 InputUpdateFromSolutionx(femmodel,ug); … … 81 83 82 84 CreateJacobianMatrixx(&Jff,femmodel,kmax); 85 femmodel->profiler->Start(SOLVER); 83 86 Solverx(&duf,Jff,pJf,NULL,NULL,femmodel->parameters); delete Jff; delete pJf; 87 femmodel->profiler->Stop(SOLVER); 84 88 uf->AXPY(duf, 1.0); delete duf; 85 89 Mergesolutionfromftogx(&ug,uf,ys,femmodel->nodes,femmodel->parameters);delete ys; -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_nonlinear.cpp
r21451 r22551 67 67 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 68 68 Reduceloadx(pf, Kfs, ys); delete Kfs; 69 femmodel->profiler->Start(SOLVER); 69 70 Solverx(&uf, Kff, pf, old_uf, df, femmodel->parameters); 71 femmodel->profiler->Stop(SOLVER); 70 72 Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete ys; 71 73 -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_shakti_nonlinear.cpp
r22372 r22551 52 52 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 53 53 Reduceloadx(pf, Kfs, ys); delete Kfs; 54 femmodel->profiler->Start(SOLVER); 54 55 Solverx(&uf, Kff, pf, old_uf, df, femmodel->parameters); 56 femmodel->profiler->Stop(SOLVER); 55 57 Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete ys; 56 58 -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp
r18619 r22551 68 68 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 69 69 Reduceloadx(pf_horiz, Kfs_horiz, ys); delete Kfs_horiz; 70 femmodel->profiler->Start(SOLVER); 70 71 Solverx(&uf_horiz, Kff_horiz, pf_horiz, old_uf_horiz, df_horiz,femmodel->parameters); 72 femmodel->profiler->Stop(SOLVER); 71 73 Mergesolutionfromftogx(&ug_horiz, uf_horiz,ys,femmodel->nodes,femmodel->parameters); delete ys; 72 74 InputUpdateFromSolutionx(femmodel,ug_horiz); … … 82 84 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 83 85 Reduceloadx(pf_vert, Kfs_vert, ys); delete Kfs_vert; 86 femmodel->profiler->Start(SOLVER); 84 87 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); 85 89 Mergesolutionfromftogx(&ug_vert, uf_vert,ys,femmodel->nodes,femmodel->parameters); 86 90 delete uf_vert; -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_thermal_nonlinear.cpp
r19150 r22551 77 77 CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type); 78 78 Reduceloadx(pf, Kfs, ys); delete Kfs; 79 femmodel->profiler->Start(SOLVER); 79 80 Solverx(&tf, Kff, pf, tf_old, df, femmodel->parameters); 81 femmodel->profiler->Stop(SOLVER); 80 82 Mergesolutionfromftogx(&tg, tf,ys,femmodel->nodes,femmodel->parameters); delete ys; 81 83 if(isenthalpy){
Note:
See TracChangeset
for help on using the changeset viewer.