Commit e12ffa60 authored by Martin Khannouz's avatar Martin Khannouz Committed by Berenger Bramas

Change the way it measure executing time. Add mpi barrier before starting and before ending.

parent 8ec4774c
......@@ -122,7 +122,7 @@ int main(int argc, char* argv[]){
timer.tic();
groupalgo.execute();
std::cout << "Kernel executed in in " << timer.tacAndElapsed() << "s\n";
std::cout << "Average executed in in " << timer.tacAndElapsed() << "s\n";
// Validate the result
if(FParameters::existParameter(argc, argv, LocalOptionNoValidate.options) == false){
......
......@@ -159,6 +159,7 @@ int main(int argc, char* argv[]){
// Run the algorithm
GroupKernelClass groupkernel;
GroupAlgorithm groupalgo(&groupedTree,&groupkernel, distributedMortonIndex);
mpiComm.global().barrier();
FTic timerExecute;
groupalgo.execute();
mpiComm.global().barrier();
......
......@@ -138,6 +138,7 @@ int main(int argc, char* argv[]){
const MatrixKernelClass MatrixKernel;
GroupKernelClass groupkernel(NbLevels, loader.getBoxWidth(), loader.getCenterOfBox(), &MatrixKernel);
GroupAlgorithm groupalgo(&groupedTree,&groupkernel, distributedMortonIndex);
mpiComm.global().barrier();
FTic timerExecute;
groupalgo.execute(operationsToProceed);
mpiComm.global().barrier();
......
......@@ -147,6 +147,7 @@ int main(int argc, char* argv[]){
// Run the algorithm
GroupKernelClass groupkernel;
GroupAlgorithm groupalgo(mpiComm.global(), &groupedTree,&groupkernel);
mpiComm.global().barrier();
FTic timerExecute;
groupalgo.execute();
mpiComm.global().barrier();
......
......@@ -168,6 +168,7 @@ int main(int argc, char* argv[]){
GroupKernelClass groupkernel(TreeHeight, loader.getBoxWidth(), loader.getCenterOfBox(), &MatrixKernel);
// Run the algorithm
GroupAlgorithm groupalgo(mpiComm.global(), &groupedTree,&groupkernel);
mpiComm.global().barrier();
timer.tic();
groupalgo.execute();
mpiComm.global().barrier();
......
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