Commit c246e10c authored by Dave Moxey's avatar Dave Moxey
Browse files

Merge branch 'master' into feature/refactor-assemblymaps

parents 74a9a4aa ca52f498
......@@ -2,7 +2,7 @@ FIND_LIBRARY(WIN32_BLAS NAMES libblas PATHS ${TPSRC})
FIND_LIBRARY(WIN32_LAPACK NAMES liblapack PATHS ${TPSRC})
IF (NOT WIN32_BLAS OR NOT WIN32_LAPACK)
IF (CMAKE_CL64)
IF (CMAKE_CL_64)
SET(WIN_ZIP_FILE "win64-blas-lapack.zip")
SET(WIN_ZIP_MD5_VALUE "b5ad4f7335ca964bbdafab129e44a046")
SET(WIN_ZIP_SHA1_VALUE "adb331fa195db264e95e46b902887f12971dbf48")
......@@ -58,4 +58,4 @@ GET_FILENAME_COMPONENT(LAPACK_DIR ${WIN32_LAPACK} PATH CACHE)
LINK_DIRECTORIES(${LAPACK_DIR})
MESSAGE(STATUS "Found Win32 BLAS: ${WIN32_BLAS}")
MESSAGE(STATUS "Found Win32 Lapack: ${WIN32_LAPACK}")
\ No newline at end of file
MESSAGE(STATUS "Found Win32 Lapack: ${WIN32_LAPACK}")
......@@ -52,6 +52,7 @@ IF( NEKTAR_USE_MPI )
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND
${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_BUILD_TYPE:STRING=Debug
......
......@@ -15,6 +15,7 @@ IF (THIRDPARTY_BUILD_METIS)
TMP_DIR ${TPBUILD}/modmetis-5.1.0-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
......
......@@ -19,6 +19,7 @@ IF (THIRDPARTY_BUILD_TINYXML)
TMP_DIR ${TPBUILD}/tinyxml-2.4.3-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
......
......@@ -21,7 +21,12 @@ IF( NEKTAR_USE_VTK )
BINARY_DIR ${TPBUILD}/vtk-5.10.1
TMP_DIR ${TPBUILD}/vtk-5.10.1-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${TPDIST} -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release ${TPSRC}/vtk-5.10.1
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_BUILD_TYPE:STRING=Release
${TPSRC}/vtk-5.10.1
)
SET(VTK_DIR ${TPDIST}/lib/vtk-5.10)
SET(VTK_FOUND 1)
......
......@@ -40,6 +40,7 @@ IF (THIRDPARTY_BUILD_ZLIB)
TMP_DIR ${TPBUILD}/zlib-1.2.7-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_C_FLAGS:STRING=-fPIC
......
......@@ -29,7 +29,7 @@ There are two ways to obtain the source code for \nekpp:
\item Using authenticated access. This will allow you to directly contribute
back into the code.
\begin{lstlisting}[style=BashInputStyle]
git clone git@gitlab.nektar.info:nektar.git nektar++
git clone git@gitlab.nektar.info:nektar/nektar.git nektar++
\end{lstlisting}
\begin{tipbox}
You can easily switch to using the authenticated access from anonymous
......
......@@ -11,7 +11,7 @@ MinTimeFile="./MinTimeCG2D.dat"
MaxNumModesp1=16;
echo "% Solver optlevel Type nElements nModes Time nCalls Time/Call L2Error ppL2Error L2Error(hi-res) LinfError ppLinfErr LinfErr(hi-res) nLocCoef nGlobCoef nLocBCoef nGlobBCoef nLocDCoef nGlobDCoef GlobRank GlobBndwth nnz" > $TimingResultsFile
echo "% Solver optlevel Type nElements nModes Time nCalls Time/Call L2Error ppL2Error L2Error(hi-res) LinfError ppLinfErr LinfErr(hi-res) nLocCoef nGlobCoef nLocBCoef nGlobBCoef nLocDCoef nGlobDCoef GlobRank GlobBndwth nnz FullSolveTime ppTime" > $TimingResultsFile
# Loop over the mesh-size
for MeshSize in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
......@@ -37,8 +37,9 @@ do
TimingCGHelmSolve2D $Type $MeshSize $NumModes $OptimisationLevel $LinSysSolver
echo Nektar++ TimingCGHelmSolve2D $Type $MeshSize $NumModes $OptimisationLevel $LinSysSolver
read LinSysSolverOut optLevelOut TypeOut NumElementsOut NumModesOut ElapsedTimeOut NumCallsOut TimepCallOut L2Out ppL2Out L2OutBis LinfOut ppLinfOut LinfOutBis nLocCoefOut nGlobCoefOut nLocBCoefOut nGlobBCoefOut nLocDCoefOut nGlobDCoefOut GlobRankOut GlobBndwthOut nnzOut< $ExecutableDumpFile
if [ $ElapsedTimeOut -lt $MinTime ];
read LinSysSolverOut optLevelOut TypeOut NumElementsOut NumModesOut ElapsedTimeOut NumCallsOut TimepCallOut L2Out ppL2Out L2OutBis LinfOut ppLinfOut LinfOutBis nLocCoefOut nGlobCoefOut nLocBCoefOut nGlobBCoefOut nLocDCoefOut nGlobDCoefOut GlobRankOut GlobBndwthOut nnzOut FullSolveTimeOut ppTimeOut< $ExecutableDumpFile
comp=`echo "$ElapsedTimeOut < $MinTime" | bc -l`
if [ $comp -eq 1 ];
then
MinTime=$ElapsedTimeOut
cp $ExecutableDumpFile $MinTimeFile
......
......@@ -38,7 +38,8 @@ do
echo Nektar++ TimingCGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel $LinSysSolver
read LinSysSolverOut optLevelOut TypeOut NumElementsOut NumModesOut ElapsedTimeOut NumCallsOut TimepCallOut L2Out ppL2Out L2OutBis LinfOut ppLinfOut LinfOutBis nLocCoefOut nGlobCoefOut nLocBCoefOut nGlobBCoefOut nLocDCoefOut nGlobDCoefOut GlobRankOut GlobBndwthOut nnzOut FullSolveTimeOut ppTimeOut< $ExecutableDumpFile
if [ $ElapsedTimeOut -lt $MinTime ];
comp=`echo "$ElapsedTimeOut < $MinTime" | bc -l`
if [ $comp -eq 1 ];
then
MinTime=$ElapsedTimeOut
cp $ExecutableDumpFile $MinTimeFile
......
......@@ -11,7 +11,7 @@ MinTimeFile="./MinTimeHDG2D.dat"
MaxNumModesp1=16;
echo "% Solver optlevel Type nElements nModes Time nCalls Time/Call L2Error ppL2Error L2Error(hi-res) LinfError ppLinfErr LinfErr(hi-res) nLocCoef nGlobCoef nLocBCoef nGlobBCoef nLocDCoef nGlobDCoef GlobRank GlobBndwth nnz" > $TimingResultsFile
echo "% Solver optlevel Type nElements nModes Time nCalls Time/Call L2Error ppL2Error L2Error(hi-res) LinfError ppLinfErr LinfErr(hi-res) nLocCoef nGlobCoef nLocBCoef nGlobBCoef nLocDCoef nGlobDCoef GlobRank GlobBndwth nnz FullSolveTime ppTime" > $TimingResultsFile
# Loop over the mesh-size
for MeshSize in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
......@@ -37,8 +37,9 @@ do
TimingHDGHelmSolve2D $Type $MeshSize $NumModes $OptimisationLevel $LinSysSolver
echo Nektar++ TimingHDGHelmSolve2D $Type $MeshSize $NumModes $OptimisationLevel $LinSysSolver
read LinSysSolverOut optLevelOut TypeOut NumElementsOut NumModesOut ElapsedTimeOut NumCallsOut TimepCallOut L2Out ppL2Out L2OutBis LinfOut ppLinfOut LinfOutBis nLocCoefOut nGlobCoefOut nLocBCoefOut nGlobBCoefOut nLocDCoefOut nGlobDCoefOut GlobRankOut GlobBndwthOut nnzOut< $ExecutableDumpFile
if [ $ElapsedTimeOut -lt $MinTime ];
read LinSysSolverOut optLevelOut TypeOut NumElementsOut NumModesOut ElapsedTimeOut NumCallsOut TimepCallOut L2Out ppL2Out L2OutBis LinfOut ppLinfOut LinfOutBis nLocCoefOut nGlobCoefOut nLocBCoefOut nGlobBCoefOut nLocDCoefOut nGlobDCoefOut GlobRankOut GlobBndwthOut nnzOut FullSolveTimeOut ppTimeOut< $ExecutableDumpFile
comp=`echo "$ElapsedTimeOut < $MinTime" | bc -l`
if [ $comp -eq 1 ];
then
MinTime=$ElapsedTimeOut
cp $ExecutableDumpFile $MinTimeFile
......
......@@ -38,7 +38,8 @@ do
echo Nektar++ TimingHDGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel $LinSysSolver
read LinSysSolverOut optLevelOut TypeOut NumElementsOut NumModesOut ElapsedTimeOut NumCallsOut TimepCallOut L2Out ppL2Out L2OutBis LinfOut ppLinfOut LinfOutBis nLocCoefOut nGlobCoefOut nLocBCoefOut nGlobBCoefOut nLocDCoefOut nGlobDCoefOut GlobRankOut GlobBndwthOut nnzOut FullSolveTimeOut ppTimeOut< $ExecutableDumpFile
if [ $ElapsedTimeOut -lt $MinTime ];
comp=`echo "$ElapsedTimeOut < $MinTime" | bc -l`
if [ $comp -eq 1 ];
then
MinTime=$ElapsedTimeOut
cp $ExecutableDumpFile $MinTimeFile
......
#include <sstream>
#include <time.h>
#include <sys/time.h>
#include <LibUtilities/BasicUtils/Timer.h>
#include <iomanip>
#include <boost/filesystem/path.hpp>
......@@ -24,6 +23,9 @@ int main(int argc, char *argv[])
Array<OneD,NekDouble> xc0,xc1,xc2;
NekDouble lambda;
vector<string> vFilenames;
//defining timing variables
Timer timer;
NekDouble exeTime, fullTime, ppTime = 0.0;
if(argc < 6)//< allows to parse "verbose" option
{
......@@ -197,6 +199,9 @@ int main(int argc, char *argv[])
ASSERTL0(false,"Unrecognised system solver");
}
}
//timing the whole solve including mesh loading
timer.Start();
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph2D = MemoryManager<SpatialDomains::MeshGraph2D>::AllocateSharedPtr(vSession);
......@@ -264,6 +269,9 @@ int main(int argc, char *argv[])
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
//----------------------------------------------
//end of full solve timing
timer.Stop();
fullTime = timer.TimePerTest(1);
//----------------------------------------------
// See if there is an exact solution, if so
......@@ -338,23 +346,16 @@ int main(int argc, char *argv[])
//----------------------------------------------
//----------------------------------------------
// Do the timings
timeval timer1, timer2;
NekDouble time1, time2;
NekDouble exeTime;
// We first do a single run in order to estimate the number of calls
// we are going to make
gettimeofday(&timer1, NULL);
timer.Start();
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
timer.Stop();
exeTime = timer.TimePerTest(1);
int NumCalls = (int) ceil(1.0e6/exeTime);
int NumCalls = (int) ceil(1.0/exeTime);
if(NumCalls < 1)
{
NumCalls = 1;
......@@ -370,14 +371,15 @@ int main(int argc, char *argv[])
chudStartRemotePerfMonitor("TimingCGHelmSolve2D");
#endif
gettimeofday(&timer1, NULL);
timer.Start();
for(i = 0; i < NumCalls; ++i)
{
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
gettimeofday(&timer2, NULL);
timer.Stop();
exeTime = timer.TimePerTest(1);
#ifdef SHARK
chudStopRemotePerfMonitor();
......@@ -385,11 +387,6 @@ int main(int argc, char *argv[])
chudCleanup();
#endif
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
int nLocCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalCoeffs();
int nGlobCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalCoeffs();
int nLocBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalBndCoeffs();
......@@ -408,10 +405,12 @@ int main(int argc, char *argv[])
outfile << setw(10) << TypeStr << " ";
outfile << setw(10) << NumElements << " ";
outfile << setw(10) << NumModes << " ";
outfile << setw(10) << fixed << noshowpoint << exeTime << " ";
outfile.precision(7);
outfile << setw(10) << fixed << exeTime << " ";
outfile.precision(0);
outfile << setw(10) << NumCalls << " ";
outfile << setw(10) << fixed << noshowpoint << ((NekDouble) (exeTime/((NekDouble)NumCalls))) << " ";
outfile.precision(7);
outfile << setw(10) << fixed << ((NekDouble) (exeTime/((NekDouble)NumCalls))) << " ";
outfile << setw(15) << scientific << noshowpoint << L2Error << " ";
outfile << setw(15) << scientific << noshowpoint << L2Error << " ";
outfile << setw(15) << scientific << noshowpoint << L2ErrorBis << " ";
......@@ -427,6 +426,8 @@ int main(int argc, char *argv[])
outfile << setw(10) << nGlobBndRank << " ";
outfile << setw(10) << nGlobBandwidth << " ";
outfile << setw(10) << nnz << " ";
outfile << setw(10) << fixed << fullTime << " ";
outfile << setw(10) << fixed << ppTime << " ";
outfile << endl;
outfile.close();
......
#include <sstream>
#include <time.h>
#include <sys/time.h>
#include <LibUtilities/BasicUtils/Timer.h>
#include <iomanip>
#include <boost/filesystem/path.hpp>
......@@ -25,8 +24,7 @@ int main(int argc, char *argv[])
NekDouble lambda;
vector<string> vFilenames;
//defining timing variables
timeval timer1, timer2;
NekDouble time1, time2;
Timer timer;
NekDouble exeTime, fullTime, ppTime = 0.0;
if(argc < 6)//< is added to be able to submit "verbose" option
......@@ -203,7 +201,7 @@ int main(int argc, char *argv[])
}
//timing the whole solve including mesh loading
gettimeofday(&timer1, NULL);
timer.Start();
//----------------------------------------------
// Read in mesh from input file
......@@ -273,10 +271,8 @@ int main(int argc, char *argv[])
MultiRegions::eGlobal);
//----------------------------------------------
//end of full solve timing
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
fullTime = (time2-time1);
timer.Stop();
fullTime = timer.TimePerTest(1);
//----------------------------------------------
// See if there is an exact solution, if so
......@@ -358,16 +354,14 @@ int main(int argc, char *argv[])
// We first do a single run in order to estimate the number of calls
// we are going to make
gettimeofday(&timer1, NULL);
timer.Start();
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
timer.Stop();
exeTime = timer.TimePerTest(1);
int NumCalls = (int) ceil(1.0e6/exeTime);
int NumCalls = (int) ceil(1.0/exeTime);
if(NumCalls < 1)
{
NumCalls = 1;
......@@ -383,14 +377,14 @@ int main(int argc, char *argv[])
chudStartRemotePerfMonitor("TimingCGHelmSolve3D");
#endif
gettimeofday(&timer1, NULL);
timer.Start();
for(i = 0; i < NumCalls; ++i)
{
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
gettimeofday(&timer2, NULL);
timer.Stop();
#ifdef SHARK
chudStopRemotePerfMonitor();
......@@ -398,10 +392,7 @@ int main(int argc, char *argv[])
chudCleanup();
#endif
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
exeTime = timer.TimePerTest(1);
int nLocCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalCoeffs();
int nGlobCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalCoeffs();
......@@ -421,10 +412,12 @@ int main(int argc, char *argv[])
outfile << setw(10) << TypeStr << " ";
outfile << setw(10) << NumElements << " ";
outfile << setw(10) << NumModes << " ";
outfile << setw(10) << fixed << noshowpoint << exeTime << " ";
outfile.precision(7);
outfile << setw(10) << fixed << exeTime << " ";
outfile.precision(0);
outfile << setw(10) << NumCalls << " ";
outfile << setw(10) << fixed << noshowpoint << ((NekDouble) (exeTime/((NekDouble)NumCalls))) << " ";
outfile.precision(7);
outfile << setw(10) << fixed << ((NekDouble) (exeTime/((NekDouble)NumCalls))) << " ";
outfile << setw(15) << scientific << noshowpoint << L2Error << " ";
outfile << setw(15) << scientific << noshowpoint << L2Error << " ";
outfile << setw(15) << scientific << noshowpoint << L2ErrorBis << " ";
......@@ -440,9 +433,8 @@ int main(int argc, char *argv[])
outfile << setw(10) << nGlobBndRank << " ";
outfile << setw(10) << nGlobBandwidth << " ";
outfile << setw(10) << nnz << " ";
outfile.precision(0);
outfile << setw(10) << fixed << noshowpoint << fullTime << " ";
outfile << setw(10) << fixed << noshowpoint << ppTime << " ";
outfile << setw(10) << fixed << fullTime << " ";
outfile << setw(10) << fixed << ppTime << " ";
outfile << endl;
outfile.close();
......
#include <sstream>
#include <time.h>
#include <sys/time.h>
#include <LibUtilities/BasicUtils/Timer.h>
#include <iomanip>
#include <boost/filesystem/path.hpp>
......@@ -24,6 +23,9 @@ int main(int argc, char *argv[])
Array<OneD,NekDouble> xc0,xc1,xc2;
NekDouble lambda;
vector<string> vFilenames;
//defining timing variables
Timer timer;
NekDouble exeTime, fullTime, ppTime;
if(argc < 6)//< allows to parse "verbose" option
{
......@@ -195,6 +197,8 @@ int main(int argc, char *argv[])
ASSERTL0(false,"Unrecognised system solver");
}
}
//timing the whole solve including mesh loading
timer.Start();
//----------------------------------------------
// Read in mesh from input file
......@@ -262,6 +266,9 @@ int main(int argc, char *argv[])
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys());
//----------------------------------------------
//end of full solve timing
timer.Stop();
fullTime = timer.TimePerTest(1);
//----------------------------------------------
// See if there is an exact solution, if so
......@@ -330,6 +337,8 @@ int main(int argc, char *argv[])
//////////////////////////////////////////////////////////////////////////////////////
// postprocessing and error computation
//////////////////////////////////////////////////////////////////////////////////////
//timing postprocessing
timer.Start();
int num_points = NumModes + 1;
//Triangle
......@@ -404,6 +413,10 @@ int main(int argc, char *argv[])
PostProc->EvaluateHDGPostProcessing(PostProc->UpdateCoeffs());
PostProc->BwdTrans_IterPerExp(PostProc->GetCoeffs(),PostProc->UpdatePhys());
//end postprocessing timing
timer.Stop();
ppTime = timer.TimePerTest(1);
NekDouble L2ErrorPostProc = PostProc->L2(PostProc->GetPhys(),ppSol);
NekDouble LinfErrorPostProc = PostProc->Linf(PostProc->GetPhys(),ppSol);
......@@ -419,22 +432,15 @@ int main(int argc, char *argv[])
//----------------------------------------------
//----------------------------------------------
// Do the timings
timeval timer1, timer2;
NekDouble time1, time2;
NekDouble exeTime;
// We first do a single run in order to estimate the number of calls
// we are going to make
gettimeofday(&timer1, NULL);
timer.Start();
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys());
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
timer.Stop();
exeTime = timer.TimePerTest(1);
int NumCalls = (int) ceil(1.0e6/exeTime);
int NumCalls = (int) ceil(1.0/exeTime);
if(NumCalls < 1)
{
NumCalls = 1;
......@@ -450,13 +456,14 @@ int main(int argc, char *argv[])
chudStartRemotePerfMonitor("TimingHDGHelmSolve2D");
#endif
gettimeofday(&timer1, NULL);
timer.Start();
for(i = 0; i < NumCalls; ++i)
{
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys());
}
gettimeofday(&timer2, NULL);
timer.Stop();
exeTime = timer.TimePerTest(1);
#ifdef SHARK
chudStopRemotePerfMonitor();
......@@ -464,11 +471,6 @@ int main(int argc, char *argv[])
chudCleanup();
#endif
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
int nLocCoeffs = Exp->GetTraceMap()->GetNumLocalCoeffs();
int nGlobCoeffs = Exp->GetTraceMap()->GetNumGlobalCoeffs();
int nLocBndCoeffs = Exp->GetTraceMap()->GetNumLocalBndCoeffs();
......@@ -486,10 +488,12 @@ int main(int argc, char *argv[])
outfile << setw(10) << TypeStr << " ";
outfile << setw(10) << NumElements << " ";
outfile << setw(10) << NumModes << " ";
outfile << setw(10) << fixed << noshowpoint << exeTime << " ";
outfile.precision(7);
outfile << setw(10) << fixed << exeTime << " ";
outfile.precision(0);
outfile << setw(10) << NumCalls << " ";
outfile << setw(10) << fixed << noshowpoint << ((NekDouble) (exeTime/((NekDouble)NumCalls))) << " ";
outfile.precision(7);
outfile << setw(10) << fixed << ((NekDouble) (exeTime/((NekDouble)NumCalls))) << " ";
outfile << setw(15) << scientific << noshowpoint << L2Error << " ";
outfile << setw(15) << scientific << noshowpoint << L2ErrorPostProc << " ";
outfile << setw(15) << scientific << noshowpoint << L2ErrorBis << " ";
......@@ -505,6 +509,8 @@ int main(int argc, char *argv[])
outfile << setw(10) << nGlobBndRank << " ";
outfile << setw(10) << nGlobBandwidth << " ";
outfile << setw(10) << nnz << " ";
outfile << setw(10) << fixed << fullTime << " ";
outfile << setw(10) << fixed << ppTime << " ";
outfile << endl;
outfile.close();
......
#include <sstream>
#include <time.h>
#include <sys/time.h>
#include <LibUtilities/BasicUtils/Timer.h>
#include <iomanip>
#include <boost/filesystem/path.hpp>
......@@ -25,8 +24,7 @@ int main(int argc, char *argv[])
NekDouble lambda;
vector<string> vFilenames;
//defining timing variables
timeval timer1, timer2;
NekDouble time1, time2;
Timer timer;
NekDouble exeTime, fullTime, ppTime;
if(argc < 6)//< is used to be able to submit "verbose" option
......@@ -205,8 +203,7 @@ int main(int argc, char *argv[])
}
//timing the whole solve including mesh loading
gettimeofday(&timer1, NULL);
timer.Start();
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph3D = MemoryManager<SpatialDomains::MeshGraph3D>::AllocateSharedPtr(vSession);
......@@ -274,10 +271,8 @@ int main(int argc, char *argv[])
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys());
//----------------------------------------------
//end of full solve timing
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
fullTime = (time2-time1);
timer.Stop();
fullTime = timer.TimePerTest(1);
//----------------------------------------------
// See if there is an exact solution, if so
......@@ -349,7 +344,7 @@ int main(int argc, char *argv[])
// postprocessing and error computation
//////////////////////////////////////////////////////////////////////////////////////
//timing postprocessing
gettimeofday(&timer1, NULL);
timer.Start();
int num_points = NumModes + 1;
//Tetrahedron
......@@ -404,10 +399,8 @@ int main(int argc, char *argv[])
PostProc->EvaluateHDGPostProcessing(PostProc->UpdateCoeffs());
PostProc->BwdTrans_IterPerExp(PostProc->GetCoeffs(),PostProc->UpdatePhys());
//end postprocessing timing
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
ppTime = (time2-time1);
timer.Stop();
ppTime = timer.TimePerTest(1);
//computing postprocessing error
int ppCoordim = PostProc->GetCoordim(0);
......@@ -450,15 +443,13 @@ int main(int argc, char *argv[])
// We first do a single run in order to estimate the number of calls
// we are going to make
gettimeofday(&timer1, NULL);
timer.Start();
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys());
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
timer.Stop();
exeTime = timer.TimePerTest(1);
int NumCalls = (int) ceil(1.0e6/exeTime);
int NumCalls = (int) ceil(1.0/exeTime);
if(NumCalls < 1)
{
NumCalls = 1;
......@@ -474,13 +465,14 @@ int main(int argc, char *argv[])
chudStartRemotePerfMonitor("TimingHDGHelmSolve3D");
#endif
gettimeofday(&timer1, NULL);
timer.Start();
for(i = 0; i < NumCalls; ++i)
{
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys());
}
gettimeofday(&timer2, NULL);
timer.Stop();
exeTime = timer.TimePerTest(1);
#ifdef SHARK
chudStopRemotePerfMonitor();
......@@ -489,10 +481,6 @@ int main(int argc, char *argv[])
#endif