--- trunk/src/profiling/mdProfile.cpp 2005/01/12 22:41:40 246 +++ trunk/src/profiling/mdProfile.cpp 2006/05/17 21:51:42 963 @@ -1,4 +1,4 @@ - /* +/* * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. * * The University of Notre Dame grants you ("Licensee") a @@ -67,10 +67,10 @@ namespace mdProfileSpace { struct timeval startTime[N_PROFILES]; struct timeval endTime[N_PROFILES]; - double accumTime[N_PROFILES]; + RealType accumTime[N_PROFILES]; #ifdef IS_MPI - double globalTime[N_PROFILES]; + RealType globalTime[N_PROFILES]; #endif //is_mpi @@ -78,8 +78,8 @@ extern "C"{ extern "C"{ - void F90_FUNC(gettimes, GETTIMES)(double* forceTime, - double* commTime); + void FC_FUNC(gettimes, GETTIMES)(RealType* forceTime, + RealType* commTime); } @@ -118,15 +118,15 @@ void endProfile( proNames theProfile ){ void endProfile( proNames theProfile ){ struct timezone tz; - double startVal, endVal; + RealType startVal, endVal; gettimeofday( &endTime[theProfile], &tz ); - startVal = (double)startTime[theProfile].tv_sec - + (double)startTime[theProfile].tv_usec / 1000000.0; + startVal = (RealType)startTime[theProfile].tv_sec + + (RealType)startTime[theProfile].tv_usec / 1000000.0; - endVal = (double)endTime[theProfile].tv_sec - + (double)endTime[theProfile].tv_usec / 1000000.0; + endVal = (RealType)endTime[theProfile].tv_sec + + (RealType)endTime[theProfile].tv_usec / 1000000.0; accumTime[theProfile] += endVal - startVal; } @@ -135,25 +135,25 @@ void writeProfiles( void ){ void writeProfiles( void ){ int i; - double totalTime; - double percentTime[N_PROFILES]; + RealType totalTime; + RealType percentTime[N_PROFILES]; int days, hours, minutes, secs, msecs; - double donkey; + RealType donkey; - double forceTime, commTime; + RealType forceTime, commTime; #ifdef IS_MPI int j; MPI_Status istatus; - double nodeTime, nodeForceTime, nodeCommTime; - double nodeAccum[N_PROFILES]; - double nodePercent[N_PROFILES]; + RealType nodeTime, nodeForceTime, nodeCommTime; + RealType nodeAccum[N_PROFILES]; + RealType nodePercent[N_PROFILES]; - double globalTime, globalForceTime, globalCommTime; - double globalAccum[N_PROFILES]; - double globalPercent[N_PROFILES]; + RealType globalTime, globalForceTime, globalCommTime; + RealType globalAccum[N_PROFILES]; + RealType globalPercent[N_PROFILES]; #endif // is_mpi @@ -191,7 +191,7 @@ void writeProfiles( void ){ secs = (int)donkey; msecs = (int)( (donkey - secs) * 1000 ); - F90_FUNC(gettimes, GETTIMES)(&forceTime, &commTime); + FC_FUNC(gettimes, GETTIMES)(&forceTime, &commTime); fprintf( stdout, "----------------------------------------------------------------------------\n" @@ -211,8 +211,8 @@ void writeProfiles( void ){ if( worldRank == 0 ){ - double *nodeTots = new double[mpiSim->getNProcessors()]; - double *nodePercentTots = new double[mpiSim->getNProcessors()]; + RealType *nodeTots = new RealType[mpiSim->getNProcessors()]; + RealType *nodePercentTots = new RealType[mpiSim->getNProcessors()]; totalTime = 0.0; for(i=0;i