Commit 85a48758 authored by Vít Hanousek's avatar Vít Hanousek
Browse files

Improve of Distributed Grid Performance Testing Application

parent 09827410
Loading
Loading
Loading
Loading
+20 −8
Original line number Diff line number Diff line
@@ -166,9 +166,6 @@ class DistributedGrid <GridType,1>
                   localsize.x()+=2*overlap.x();
                         
           }                   
                     
           
                      
       };
       
       void SetupGrid( GridType& grid)
@@ -182,7 +179,12 @@ 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)
@@ -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)
+26 −0
Original line number Diff line number Diff line
    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" )
+23 −4
Original line number Diff line number Diff line
@@ -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;
@@ -137,6 +152,10 @@ int main ( int argc, char *argv[])
  {
	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;