Commit c00066a1 authored by Sergey Yakovlev's avatar Sergey Yakovlev

Reordered some of the loops in timing scripts

Added extra output to the timing binaries
parent 7e84ca2b
......@@ -9,43 +9,43 @@ TimingResultsFile="./TimingResultsCGHelmSolve3D.dat"
ExecutableDumpFile="./TimingCGHelmSolve3D.dat"
MinTimeFile="./MinTimeCG3D.dat"
MaxNumModesp1=16;
MaxNumModesp1=10;
echo "% Type nElements nModes nCalls Time Time/Call L2Error L2Error(hi-res) LinfError LinfErr(hi-res) nLocCoef nGlobCoef nLocBCoef nGlobBCoef nLocDCoef nGlobDCoef nnz optlevel" > $TimingResultsFile
echo "% 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
# Loop over the element type
for Type in 1 2 3
# Loop over the mesh-size
for MeshSize in 1 2 3 4 5 6 7 8 9 10
do
# Loop over the optimisation level
for OptimisationLevel in 0 2 3
do
# Loop over the mesh-size
for MeshSize in 1 2 3 4 5 6 7 8 9 10
do
# Loop over the number of modes
for ((NumModes=2; NumModes<MaxNumModesp1; NumModes++))
do
# Initialise the minimal time to a really big value
MinTime=10000000000000000;
# Loop over the number of Loops you want to run it
for ((a=0; a<NumLoops; a++))
do
TimingCGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel
echo Nektar++ TimingCGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel
read TypeOut NumElementsOut NumModesOut NumCallsOut ElapsedTimeOut TimepCallOut L2Out L2OutBis LinfOut LinfOutBis nLocCoefOut nGlobCoefOut nLocBCoefOut nGlobBCoefOut nLocDCoefOut nGlobDCoefOut nnzOut optLevelOut< $ExecutableDumpFile
if [ $ElapsedTimeOut -lt $MinTime ];
then
MinTime=$ElapsedTimeOut
cp $ExecutableDumpFile $MinTimeFile
fi
done
cat $MinTimeFile >> $TimingResultsFile
done
done
done
# Loop over the element type: 1 - RHex, 2 - DHex, 3 - RTet
for Type in 1 3
do
# Loop over the optimisation level: 0 - ElSumFac, 2 - ElBlkMat, 3 - GlbMat
for OptimisationLevel in 0 2 3
do
# Loop over the number of modes
for ((NumModes=2; NumModes<MaxNumModesp1; NumModes++))
do
# Initialise the minimal time to a really big value
MinTime=10000000000000000;
# Loop over the number of Loops you want to run it
for ((a=0; a<NumLoops; a++))
do
TimingCGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel
echo Nektar++ TimingCGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel
read TypeOut NumElementsOut NumModesOut NumCallsOut ElapsedTimeOut TimepCallOut L2Out L2OutBis LinfOut LinfOutBis nLocCoefOut nGlobCoefOut nLocBCoefOut nGlobBCoefOut nLocDCoefOut nGlobDCoefOut nnzOut optLevelOut< $ExecutableDumpFile
if [ $ElapsedTimeOut -lt $MinTime ];
then
MinTime=$ElapsedTimeOut
cp $ExecutableDumpFile $MinTimeFile
fi
done
cat $MinTimeFile >> $TimingResultsFile
done
done
done
done
rm -f $MinTimeFile
......
......@@ -9,43 +9,43 @@ TimingResultsFile="./TimingResultsHDGHelmSolve3D.dat"
ExecutableDumpFile="./TimingHDGHelmSolve3D.dat"
MinTimeFile="./MinTimeHDG3D.dat"
MaxNumModesp1=16;
MaxNumModesp1=10;
echo "% Type nElements nModes nCalls Time Time/Call L2Error L2Error(hi-res) LinfError LinfErr(hi-res) nLocCoef nGlobCoef nLocBCoef nGlobBCoef nLocDCoef nGlobDCoef nnz optlevel" > $TimingResultsFile
echo "% 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
# Loop over the element type
for Type in 1 2 3
# Loop over the mesh-size
for MeshSize in 1 2 3 4 5 6 7 8 9 10
do
# Loop over the optimisation level
for OptimisationLevel in 0 2 3
do
# Loop over the mesh-size
for MeshSize in 1 2 3 4 5 6 7 8 9 10
do
# Loop over the number of modes
for ((NumModes=2; NumModes<MaxNumModesp1; NumModes++))
do
# Initialise the minimal time to a really big value
MinTime=10000000000000000;
# Loop over the number of Loops you want to run it
for ((a=0; a<NumLoops; a++))
do
TimingHDGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel
echo Nektar++ TimingHDGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel
read TypeOut NumElementsOut NumModesOut NumCallsOut ElapsedTimeOut TimepCallOut L2Out L2OutBis LinfOut LinfOutBis nLocCoefOut nGlobCoefOut nLocBCoefOut nGlobBCoefOut nLocDCoefOut nGlobDCoefOut nnzOut optLevelOut< $ExecutableDumpFile
if [ $ElapsedTimeOut -lt $MinTime ];
then
MinTime=$ElapsedTimeOut
cp $ExecutableDumpFile $MinTimeFile
fi
done
cat $MinTimeFile >> $TimingResultsFile
done
done
done
# Loop over the element type: 1 - RHex, 2 - DHex, 3 - RTet
for Type in 1 3
do
# Loop over the optimisation level: 0 - ElSumFac, 2 - ElBlkMat, 3 - GlbMat
for OptimisationLevel in 0 2 3
do
# Loop over the number of modes
for ((NumModes=2; NumModes<MaxNumModesp1; NumModes++))
do
# Initialise the minimal time to a really big value
MinTime=10000000000000000;
# Loop over the number of Loops you want to run it
for ((a=0; a<NumLoops; a++))
do
TimingHDGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel
echo Nektar++ TimingHDGHelmSolve3D $Type $MeshSize $NumModes $OptimisationLevel
read 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 ];
then
MinTime=$ElapsedTimeOut
cp $ExecutableDumpFile $MinTimeFile
fi
done
cat $MinTimeFile >> $TimingResultsFile
done
done
done
done
rm -f $MinTimeFile
......
......@@ -49,6 +49,7 @@ int main(int argc, char *argv[])
int MeshSize = atoi(argv[2]);
int NumModes = atoi(argv[3]);
int optLevel = atoi(argv[4]);
std::string optLevelStr;
//----------------------------------------------
// Retrieve the necessary input files
......@@ -99,16 +100,19 @@ int main(int argc, char *argv[])
case 0:
{
GlobOptFileName << "NoGlobalMat.xml";
optLevelStr = "SumFac";
}
break;
case 2:
{
GlobOptFileName << "DoBlockMat.xml";
optLevelStr = "BlkMat";
}
break;
case 3:
{
GlobOptFileName << "DoGlobalMat.xml";
optLevelStr = "GlbMat";
}
break;
case 4:
......@@ -366,12 +370,14 @@ int main(int argc, char *argv[])
int nGlobBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalBndCoeffs();
int nLocDirCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalDirBndCoeffs();
int nGlobDirCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalDirBndCoeffs();
int nGlobBandwidth = Exp->GetLocalToGlobalMap()->GetBndSystemBandWidth();
int nGlobBndRank = nGlobBndCoeffs - nGlobDirCoeffs;
MultiRegions::GlobalMatrixKey key(StdRegions::eHelmholtz,Exp->GetLocalToGlobalMap(),factors);
int nnz = Exp->GetGlobalMatrixNnz(key);
ofstream outfile("TimingCGHelmSolve3D.dat");
outfile.precision(0);
outfile << setw(10) << optLevel << " ";
outfile << setw(10) << optLevelStr << " ";
outfile << setw(10) << TypeStr << " ";
outfile << setw(10) << NumElements << " ";
outfile << setw(10) << NumModes << " ";
......@@ -391,6 +397,8 @@ int main(int argc, char *argv[])
outfile << setw(10) << nGlobBndCoeffs << " ";
outfile << setw(10) << nLocDirCoeffs << " ";
outfile << setw(10) << nGlobDirCoeffs << " ";
outfile << setw(10) << nGlobBndRank << " ";
outfile << setw(10) << nGlobBandwidth << " ";
outfile << setw(10) << nnz << " ";
outfile << endl;
......
......@@ -49,6 +49,7 @@ int main(int argc, char *argv[])
int MeshSize = atoi(argv[2]);
int NumModes = atoi(argv[3]);
int optLevel = atoi(argv[4]);
std::string optLevelStr;
//----------------------------------------------
// Retrieve the necessary input files
......@@ -99,16 +100,19 @@ int main(int argc, char *argv[])
case 0:
{
GlobOptFileName << "NoGlobalMat.xml";
optLevelStr = "SumFac";
}
break;
case 2:
{
GlobOptFileName << "DoBlockMat.xml";
optLevelStr = "BlkMat";
}
break;
case 3:
{
GlobOptFileName << "DoGlobalMat.xml";
optLevelStr = "GlbMat";
}
break;
case 4:
......@@ -445,11 +449,13 @@ int main(int argc, char *argv[])
int nGlobBndCoeffs = Exp->GetTraceMap()->GetNumGlobalBndCoeffs();
int nLocDirCoeffs = Exp->GetTraceMap()->GetNumLocalDirBndCoeffs();
int nGlobDirCoeffs = Exp->GetTraceMap()->GetNumGlobalDirBndCoeffs();
int nGlobBandwidth = Exp->GetTraceMap()->GetBndSystemBandWidth();
int nGlobBndRank = nGlobBndCoeffs - nGlobDirCoeffs;
int nnz = 0;
ofstream outfile("TimingHDGHelmSolve3D.dat");
outfile.precision(0);
outfile << setw(10) << optLevel << " ";
outfile << setw(10) << optLevelStr << " ";
outfile << setw(10) << TypeStr << " ";
outfile << setw(10) << NumElements << " ";
outfile << setw(10) << NumModes << " ";
......@@ -469,6 +475,8 @@ int main(int argc, char *argv[])
outfile << setw(10) << nGlobBndCoeffs << " ";
outfile << setw(10) << nLocDirCoeffs << " ";
outfile << setw(10) << nGlobDirCoeffs << " ";
outfile << setw(10) << nGlobBndRank << " ";
outfile << setw(10) << nGlobBandwidth << " ";
outfile << setw(10) << nnz << " ";
outfile << endl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment