Changeset 13543
- Timestamp:
- 10/04/12 18:13:39 (13 years ago)
- Location:
- issm/trunk-jpl/src/c/solutions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/solutions/ad_core.cpp
r13540 r13543 33 33 int num_independents; 34 34 char* driver=NULL; 35 size_t tape_stats[11]; 35 36 36 37 /*state variables: */ … … 288 289 xDelete(anEDF_for_solverx_p->dp_Z); 289 290 xDelete(anEDF_for_solverx_p->dpp_Z); 290 291 292 /*Print statistics: {{{*/ 293 tapestats(1,tape_stats); //reading of tape statistics 294 if(VerboseAutodiff()){ 295 _pprintLine_(" ADOLC statistics: "); 296 _pprintLine_(" "<<setw(45)<<left<<"Number of independents: " <<tape_stats[0]); 297 _pprintLine_(" "<<setw(45)<<left<<"Number of dependents: " <<tape_stats[1]); 298 _pprintLine_(" "<<setw(45)<<left<<"Maximal number of live active variables: " <<tape_stats[2]); 299 _pprintLine_(" "<<setw(45)<<left<<"Size of value stack (number of overwrites): " <<tape_stats[3]); 300 _pprintLine_(" "<<setw(45)<<left<<"Buffer size (a multiple of eight): " <<tape_stats[4]); 301 _pprintLine_(" "<<setw(45)<<left<<"Total number of operations recorded: " <<tape_stats[5]); 302 } 303 if(VerboseAutodiff())_pprintLine_(" end AD core"); 304 291 305 /*Free resources: */ 292 306 xDelete(xp); 293 307 xDelete(axp); 294 295 if(VerboseAutodiff())_pprintLine_(" end AD core");296 297 308 #else 298 309 _error_("Should not be requesting AD drivers when an AD library is not available!"); -
issm/trunk-jpl/src/c/solutions/issm.cpp
r13542 r13543 15 15 FILE *petscoptionsfid = NULL; 16 16 bool waitonlock = false; 17 18 /*AD: */19 bool autodiff=false;20 size_t tape_stats[11];21 17 22 18 /*FemModel: */ … … 75 71 pfclose(petscoptionsfid,petscfilename); 76 72 77 /*get parameters: */78 femmodel->parameters->FindParam(&waitonlock,SettingsWaitonlockEnum);79 femmodel->parameters->FindParam(&autodiff,AutodiffIsautodiffEnum);80 81 /*Profiling: */82 73 profiler->Tag(FinishInit); 83 74 75 /*call cores: */ 84 76 _pprintLine_("call computational core:"); 85 77 profiler->Tag(StartCore); solutioncore(femmodel); profiler->Tag(FinishCore); … … 91 83 OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results); 92 84 93 /*If running AD, close our tape, print statistics: {{{*/94 #ifdef _HAVE_ADOLC_95 if(autodiff){96 tapestats(1,tape_stats); //reading of tape statistics97 if(VerboseAutodiff()){98 _pprintLine_(" ADOLC statistics: ");99 _pprintLine_(" "<<setw(45)<<left<<"Number of independents: " <<tape_stats[0]);100 _pprintLine_(" "<<setw(45)<<left<<"Number of dependents: " <<tape_stats[1]);101 _pprintLine_(" "<<setw(45)<<left<<"Maximal number of live active variables: " <<tape_stats[2]);102 _pprintLine_(" "<<setw(45)<<left<<"Size of value stack (number of overwrites): " <<tape_stats[3]);103 _pprintLine_(" "<<setw(45)<<left<<"Buffer size (a multiple of eight): " <<tape_stats[4]);104 _pprintLine_(" "<<setw(45)<<left<<"Total number of operations recorded: " <<tape_stats[5]);105 }106 }107 #endif /*}}}*/108 109 85 /*Close output and petsc options file and write lock file if requested*/ 110 86 pfclose(output_fid,lockfilename); 87 femmodel->parameters->FindParam(&waitonlock,SettingsWaitonlockEnum); 111 88 if (waitonlock>0){ 112 89 _pprintLine_("write lock file:");
Note:
See TracChangeset
for help on using the changeset viewer.