Changeset 13532
- Timestamp:
- 10/04/12 11:14:42 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/solutions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/solutions/EnvironmentInit.cpp
r13530 r13532 2 2 * \brief: initialize Petsc, MPI, you name it 3 3 */ 4 #ifdef HAVE_CONFIG_H 5 #include <config.h> 6 #else 7 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 8 #endif 9 4 10 5 11 void EnvironmentInit(int argc,char** argv){ -
issm/trunk-jpl/src/c/solutions/issm.cpp
r13531 r13532 35 35 36 36 /*time*/ 37 IssmPDouble start,finish;37 IssmPDouble finish; 38 38 IssmPDouble start_core, finish_core; 39 IssmPDouble start_init, finish_init;40 39 int ierr; 41 40 … … 51 50 EnvironmentInit(argc,argv); 52 51 53 #ifdef _HAVE_MPI_ 54 MPI_Barrier(MPI_COMM_WORLD); start=MPI_Wtime(); 55 #else 56 start=(IssmPDouble)clock(); 57 #endif 58 52 /*Some profiling: */ 53 profiler=new Profiler(); profiler->Tag(Start); 59 54 60 55 /*First process inputs*/ … … 69 64 70 65 /*Create femmodel, using input file: */ 71 #ifdef _HAVE_MPI_ 72 MPI_Barrier(MPI_COMM_WORLD); start_init=MPI_Wtime(); 73 #else 74 start_init=(IssmPDouble)clock(); 75 #endif 66 profiler->Tag(StartInit); 67 76 68 femmodel=new FemModel(rootpath,binfilename,outbinfilename,solution_type,analyses,numanalyses); 77 69 … … 96 88 femmodel->parameters->FindParam(&autodiff,AutodiffIsautodiffEnum); 97 89 98 #ifdef _HAVE_MPI_ 99 MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime(); 100 #else 101 finish_init=(IssmPDouble)clock(); 102 #endif 90 /*Profiling: */ 91 profiler->Tag(FinishInit); 103 92 104 93 /*If running AD, then initialize a placeholder with which to work: */ … … 119 108 120 109 _pprintLine_("call computational core:"); 121 #ifdef _HAVE_MPI_ 122 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 123 #else 124 start_core=(IssmPDouble)clock(); 125 #endif 110 profiler->Tag(StartCore); 126 111 127 112 if(profiling)ProfilingStart(&Time_start,&Flops_start); … … 162 147 #endif 163 148 164 165 #ifdef _HAVE_MPI_ 166 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 167 #else 168 finish_core=(IssmPDouble)clock(); 169 #endif 149 profiler->Tag(FinishCore); 150 170 151 171 152 _pprintLine_("write results to disk:");
Note:
See TracChangeset
for help on using the changeset viewer.