Changeset 13532


Ignore:
Timestamp:
10/04/12 11:14:42 (12 years ago)
Author:
Eric.Larour
Message:

CHG: missing Config.h, which created a problem during issm initialization

Location:
issm/trunk-jpl/src/c/solutions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/solutions/EnvironmentInit.cpp

    r13530 r13532  
    22 * \brief: initialize Petsc, MPI, you name it
    33 */
     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
    410
    511void EnvironmentInit(int argc,char** argv){
  • issm/trunk-jpl/src/c/solutions/issm.cpp

    r13531 r13532  
    3535
    3636        /*time*/
    37         IssmPDouble   start, finish;
     37        IssmPDouble   finish;
    3838        IssmPDouble   start_core, finish_core;
    39         IssmPDouble   start_init, finish_init;
    4039        int      ierr;
    4140
     
    5150        EnvironmentInit(argc,argv);
    5251       
    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);
    5954       
    6055        /*First process inputs*/
     
    6964
    7065        /*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       
    7668        femmodel=new FemModel(rootpath,binfilename,outbinfilename,solution_type,analyses,numanalyses);
    7769       
     
    9688        femmodel->parameters->FindParam(&autodiff,AutodiffIsautodiffEnum);
    9789
    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);
    10392       
    10493        /*If running AD, then initialize a placeholder with which to work: */
     
    119108
    120109        _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);
    126111       
    127112        if(profiling)ProfilingStart(&Time_start,&Flops_start);
     
    162147        #endif
    163148
    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
    170151       
    171152        _pprintLine_("write results to disk:");
Note: See TracChangeset for help on using the changeset viewer.