Skip to content
Snippets Groups Projects
Commit 85a48758 authored by Vít Hanousek's avatar Vít Hanousek
Browse files

Improve of Distributed Grid Performance Testing Application

parent 09827410
No related branches found
No related tags found
No related merge requests found
......@@ -165,10 +165,7 @@ class DistributedGrid <GridType,1>
else
localsize.x()+=2*overlap.x();
}
}
};
void SetupGrid( GridType& grid)
......@@ -182,9 +179,14 @@ class DistributedGrid <GridType,1>
void printcoords(std::ostream& out)
{
out<<rank<<":" <<std::endl;
out<<rank<<":";
};
void printdistr(std::ostream& out)
{
out<<"("<<nproc<<"):";
};
bool isMPIUsed(void)
{
return this->mpiInUse;
......@@ -394,7 +396,12 @@ class DistributedGrid <GridType,2>
void printcoords(std::ostream& out)
{
out<<"("<<myproccoord[0]<<","<<myproccoord[1]<<"):" <<std::endl;
out<<"("<<myproccoord[0]<<","<<myproccoord[1]<<"):";
};
void printdistr(std::ostream& out)
{
out<<"("<<procsdistr[0]<<","<<procsdistr[1]<<"):";
};
bool isMPIUsed(void)
......@@ -692,7 +699,12 @@ class DistributedGrid <GridType,3>
void printcoords(std::ostream& out )
{
out<<"("<<myproccoord[0]<<","<<myproccoord[1]<<","<<myproccoord[2]<<"):" <<std::endl;
out<<"("<<myproccoord[0]<<","<<myproccoord[1]<<","<<myproccoord[2]<<"):";
};
void printdistr(std::ostream& out)
{
out<<"("<<procsdistr[0]<<","<<procsdistr[1]<<","<<procsdistr[2]<<"):";
};
bool isMPIUsed(void)
......
ADD_EXECUTABLE( tnlMeshFuncttionEvaluateTest${debugExt} ${headers} MeshFunctionEvauateTest.cpp )
TARGET_LINK_LIBRARIES( tnlMeshFuncttionEvaluateTest${debugExt} ${CPPUNIT_LIBRARIES}
tnl${mpiExt}${debugExt}-0.1 )
TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTest${debugExt} PUBLIC "-DDIMENSION=2" )
TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTest${debugExt} PUBLIC "-DXDISTR -DYDISTR" )
ADD_EXECUTABLE( tnlMeshFuncttionEvaluateTestX${debugExt} ${headers} MeshFunctionEvauateTest.cpp )
TARGET_LINK_LIBRARIES( tnlMeshFuncttionEvaluateTestX${debugExt} ${CPPUNIT_LIBRARIES}
tnl${mpiExt}${debugExt}-0.1 )
TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTestX${debugExt} PUBLIC "-DDIMENSION=2" )
TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTestX${debugExt} PUBLIC "-DXDISTR" )
ADD_EXECUTABLE( tnlMeshFuncttionEvaluateTestY${debugExt} ${headers} MeshFunctionEvauateTest.cpp )
TARGET_LINK_LIBRARIES( tnlMeshFuncttionEvaluateTestY${debugExt} ${CPPUNIT_LIBRARIES}
tnl${mpiExt}${debugExt}-0.1 )
TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTestY${debugExt} PUBLIC "-DDIMENSION=2" )
TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTestY${debugExt} PUBLIC "-DYDISTR" )
#ADD_EXECUTABLE( tnlMeshFuncttionEvaluateTestZ${debugExt} ${headers} MeshFunctionEvauateTest.cpp )
#TARGET_LINK_LIBRARIES( tnlMeshFuncttionEvaluateTestZ${debugExt} ${CPPUNIT_LIBRARIES}
# tnl${mpiExt}${debugExt}-0.1 )
#TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTestZ${debugExt} PUBLIC "-DDIMENSION=3" )
#TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTestZ${debugExt} PUBLIC "-DZDISTR" )
#ADD_EXECUTABLE( tnlMeshFuncttionEvaluateTestXY${debugExt} ${headers} MeshFunctionEvauateTest.cpp )
#TARGET_LINK_LIBRARIES( tnlMeshFuncttionEvaluateTestXY${debugExt} ${CPPUNIT_LIBRARIES}
# tnl${mpiExt}${debugExt}-0.1 )
#TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTestXY${debugExt} PUBLIC "-DDIMENSION=3" )
#TARGET_COMPILE_DEFINITIONS( tnlMeshFuncttionEvaluateTestXY${debugExt} PUBLIC "-DXDISTR -DYDISTR" )
......@@ -24,9 +24,11 @@ using namespace std;
#include <TNL/Timer.h>
#define DIMENSION 2
//#define DIMENSION 2
//#define OUTPUT
//#define XDISTR
//#define YDISTR
//#define ZDISTR
#include "../../src/UnitTests/Mpi/Functions.h"
......@@ -83,7 +85,20 @@ int main ( int argc, char *argv[])
int distr[DIMENSION];
for(int i=0;i<DIMENSION;i++)
distr[i]=0;
distr[i]=1;
#ifdef XDISTR
distr[0]=0;
#endif
#ifdef YDISTR
distr[1]=0;
#endif
#ifdef ZDISTR
distr[2]=0;
#endif
DistributedGridType distrgrid(globalGrid, distr);
SharedPointer<MeshType> gridptr;
......@@ -136,7 +151,11 @@ int main ( int argc, char *argv[])
if(MPI::COMM_WORLD.Get_rank()==0)
{
cout << sum <<endl<<endl;
cout<<"distr: ";
distrgrid.printdistr(cout);
cout << endl;
cout<<"setup: "<<setup.getRealTime() <<endl;
cout<<"evalpercycle: "<<eval.getRealTime()/cycles<<endl;
cout<<"syncpercycle: "<<sync.getRealTime()/cycles<<endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment