Commit bcc9c5a3 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

Update the MPI test call sites

Change-Id: If92879d67d11dfc5965ef42a8c173539801b3c98
parent 3d11639a
......@@ -8,20 +8,12 @@ if(VTK_MPI_MAX_NUMPROCS GREATER 1)
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
set(PistonMPITests TestDMPFiltering TestCompositeRender)
foreach(test ${PistonMPITests})
vtk_module_test_executable(${vtk-module}Cxx-${test} ${test}.cxx)
ExternalData_add_test(VTKData
NAME ${vtk-module}Cxx-${test}
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:${vtk-module}Cxx-${test}>
-D ${VTK_TEST_DATA_DIR}
-T ${VTK_TEST_OUTPUT_DIR}
-V DATA{../Data/Baseline/${test}.png,:}
${VTK_MPI_POSTFLAGS})
vtk_mpi_link(${vtk-module}Cxx-${test})
endforeach()
set(${vtk-module}Cxx-MPI_NUMPROCS 2)
vtk_add_test_mpi(${vtk-module}Cxx-MPI tests
TESTING_DATA
TestDMPFiltering.cxx
TestCompositeRender.cxx
)
vtk_test_mpi_executable(${vtk-module}Cxx-MPI tests)
endif()
......@@ -214,7 +214,7 @@ void MyProcess::Execute()
}
int main(int argc, char **argv)
int TestCompositeRender(int argc, char *argv[])
{
// This is here to avoid false leak messages from vtkDebugLeaks when
// using mpich. It appears that the root process which spawns all the
......
......@@ -225,7 +225,7 @@ void MyMain(vtkMultiProcessController *controller, void *arg)
elev->Delete();
}
int main(int argc, char *argv[])
int TestDMPFiltering(int argc, char *argv[])
{
// This is here to avoid false leak messages from vtkDebugLeaks when
// using mpich. It appears that the root process which spawns all the
......
include(vtkMPI)
vtk_add_test_mpi(DistributedData.cxx TESTING_DATA)
vtk_add_test_mpi(DistributedDataRenderPass.cxx TESTING_DATA)
vtk_add_test_mpi(TransmitImageData.cxx TESTING_DATA)
vtk_add_test_mpi(TransmitImageDataRenderPass.cxx TESTING_DATA)
vtk_add_test_mpi(TransmitRectilinearGrid.cxx TESTING_DATA)
vtk_add_test_mpi(TransmitStructuredGrid.cxx TESTING_DATA)
vtk_add_test_mpi(ParallelResampling.cxx)
vtk_add_test_mpi(${vtk-module}CxxTests-MPI tests
TESTING_DATA
DistributedData.cxx
DistributedDataRenderPass.cxx
TransmitImageData.cxx
TransmitImageDataRenderPass.cxx
TransmitRectilinearGrid.cxx
TransmitStructuredGrid.cxx
)
vtk_add_test_mpi(${vtk-module}CxxTests-MPI no_data_tests
ParallelResampling.cxx
)
vtk_mpi_link(TransmitImageData)
vtk_mpi_link(TransmitImageDataRenderPass)
vtk_mpi_link(TransmitRectilinearGrid)
vtk_mpi_link(TransmitStructuredGrid)
vtk_mpi_link(ParallelResampling)
set(all_tests
${tests}
${no_data_tests}
)
vtk_test_mpi_executable(${vtk-module}CxxTests-MPI all_tests)
......@@ -48,6 +48,9 @@
#include "vtkProcess.h"
namespace
{
class MyProcess : public vtkProcess
{
public:
......@@ -315,7 +318,9 @@ void MyProcess::Execute()
prm->Delete();
}
int main(int argc, char **argv)
}
int DistributedData(int argc, char *argv[])
{
int retVal = 1;
......
......@@ -60,6 +60,9 @@
#include "vtkProcess.h"
namespace
{
class MyProcess : public vtkProcess
{
public:
......@@ -390,7 +393,9 @@ void MyProcess::Execute()
prm->Delete();
}
int main(int argc, char **argv)
}
int DistributedDataRenderPass(int argc, char *argv[])
{
int retVal = 1;
......
......@@ -36,6 +36,9 @@
#include "vtkDataSetSurfaceFilter.h"
#include <mpi.h>
namespace
{
class MyProcess : public vtkProcess
{
public:
......@@ -133,7 +136,9 @@ void MyProcess::Execute()
}
}
int main(int argc, char **argv)
}
int ParallelResampling(int argc, char *argv[])
{
// This is here to avoid false leak messages from vtkDebugLeaks when
// using mpich. It appears that the root process which spawns all the
......
......@@ -45,6 +45,9 @@
#include "vtkProcess.h"
namespace
{
class MyProcess : public vtkProcess
{
public:
......@@ -234,7 +237,9 @@ void MyProcess::Execute()
prm->Delete();
}
int main(int argc, char **argv)
}
int TransmitImageData(int argc, char *argv[])
{
// This is here to avoid false leak messages from vtkDebugLeaks when
// using mpich. It appears that the root process which spawns all the
......
......@@ -50,6 +50,9 @@
#include <mpi.h>
namespace
{
class MyProcess : public vtkProcess
{
public:
......@@ -252,7 +255,9 @@ void MyProcess::Execute()
renderer->Delete();
}
int main(int argc, char **argv)
}
int TransmitImageDataRenderPass(int argc, char *argv[])
{
// This is here to avoid false leak messages from vtkDebugLeaks when
// using mpich. It appears that the root process which spawns all the
......
......@@ -43,6 +43,9 @@
#include "vtkCamera.h"
#include "vtkProcess.h"
namespace
{
class MyProcess : public vtkProcess
{
public:
......@@ -223,7 +226,9 @@ void MyProcess::Execute()
prm->Delete();
}
int main(int argc, char **argv)
}
int TransmitRectilinearGrid(int argc, char *argv[])
{
// This is here to avoid false leak messages from vtkDebugLeaks when
// using mpich. It appears that the root process which spawns all the
......
......@@ -43,6 +43,9 @@
#include "vtkProcess.h"
namespace
{
class MyProcess : public vtkProcess
{
public:
......@@ -222,7 +225,9 @@ void MyProcess::Execute()
prm->Delete();
}
int main(int argc, char **argv)
}
int TransmitStructuredGrid(int argc, char *argv[])
{
// This is here to avoid false leak messages from vtkDebugLeaks when
// using mpich. It appears that the root process which spawns all the
......
......@@ -9,6 +9,7 @@ vtk_module(vtkFiltersParallel
vtkFiltersGeometry
TEST_DEPENDS
vtkParallelMPI
vtkTestingCore
vtkTestingRendering
vtkInteractionStyle
vtkRenderingOpenGL
......
vtk_module_test_executable(TestPStream TestPStream.cxx)
ExternalData_add_test(VTKData
NAME ${vtk-module}Cxx-TestPStream-image
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:TestPStream>
-D ${VTK_TEST_DATA_DIR}
-T ${VTK_TEST_OUTPUT_DIR}
-V DATA{../Data/Baseline/TestPStream.cxx.png,:}
${VTK_MPI_POSTFLAGS})
vtk_module_test_executable(TestPStreamGeometry TestVectorFieldSource.cxx
TestPStreamGeometry.cxx)
add_test(NAME ${vtk-module}Cxx-TestPStreamGeometry
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:TestPStreamGeometry>
${VTK_MPI_POSTFLAGS})
vtk_module_test_executable(TestPParticleTracers TestPParticleTracers.cxx)
add_test(NAME ${vtk-module}Cxx-TestPParticleTracers
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:TestPParticleTracers>
${VTK_MPI_POSTFLAGS})
vtk_module_test_executable(TestPStreamAMR TestPStreamAMR.cxx)
add_test(NAME ${vtk-module}Cxx-TestPStreamAMR
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:TestPStreamAMR>
-D ${VTK_TEST_DATA_DIR}
${VTK_MPI_POSTFLAGS})
set(TestPStream_NUMPROCS 2)
set(TestPStreamGeometry_NUMPROCS 4)
set(TestPParticleTracers_NUMPROCS 2)
set(TestPStreamAMR_NUMPROCS 4)
vtk_add_test_mpi(${vtk-module}CxxTests-MPI tests
TestPStream.cxx,TESTING_DATA
TestPStreamGeometry.cxx
TestPParticleTracers.cxx
TestPStreamAMR
)
vtk_test_mpi_executable(${vtk-module}CxxTests-MPI tests
TestVectorFieldSource.cxx)
......@@ -464,7 +464,7 @@ int TestPStreaklineFilter(vtkMPIController* c, int staticOption)
}
int main(int argc, char* argv[])
int TestPParticleTracers(int argc, char* argv[])
{
vtkSmartPointer<vtkMPIController> c=vtkSmartPointer<vtkMPIController>::New();
vtkMultiProcessController::SetGlobalController(c);
......
......@@ -218,7 +218,7 @@ void MyMain( vtkMultiProcessController *controller, void *arg )
Mapper6->Delete();
}
int main( int argc, char* argv[] )
int TestPStream( int argc, char* argv[] )
{
vtkMPIController* contr = vtkMPIController::New();
contr->Initialize(&argc, &argv);
......
......@@ -153,7 +153,7 @@ vtkStandardNewMacro(TestAMRVectorSource);
int main( int argc, char* argv[] )
int TestPStreamAMR( int argc, char* argv[] )
{
vtkNew<vtkMPIController> c;
......
......@@ -55,7 +55,7 @@ inline double ComputeLength(vtkIdList* poly, vtkPoints* pts)
int main( int argc, char* argv[] )
int TestPStreamGeometry( int argc, char* argv[] )
{
vtkNew<vtkMPIController> c;
vtkMultiProcessController::SetGlobalController(c.GetPointer());
......
include(vtkMPI)
vtk_add_test_mpi(TestPStructuredGridConnectivity.cxx)
vtk_mpi_link(TestPStructuredGridConnectivity)
vtk_add_test_mpi(TestPStructuredGridGhostDataGenerator.cxx)
vtk_add_test_mpi(TestPUniformGridGhostDataGenerator.cxx)
vtk_add_test_mpi(TestPUnstructuredGridConnectivity.cxx)
vtk_mpi_link(TestPUnstructuredGridConnectivity)
vtk_add_test_mpi(TestPUnstructuredGridGhostDataGenerator.cxx)
vtk_mpi_link(TestPUnstructuredGridGhostDataGenerator)
\ No newline at end of file
vtk_add_test_mpi(${vtk-module}CxxTests-MPI tests
TestPStructuredGridConnectivity.cxx
TestPStructuredGridGhostDataGenerator.cxx
TestPUnstructuredGridConnectivity.cxx
TestPUnstructuredGridGhostDataGenerator.cxx
)
vtk_test_mpi_executable(${vtk-module}CxxTests-MPI tests
UnstructuredGhostZonesCommon.cxx)
......@@ -46,6 +46,9 @@
#include "vtkXMLPMultiBlockDataWriter.h"
#include "vtkStreamingDemandDrivenPipeline.h"
namespace
{
//------------------------------------------------------------------------------
// G L O B A L D A T A
//------------------------------------------------------------------------------
......@@ -491,9 +494,11 @@ int TestGhostLayerCreation( int factor, int ng )
return 0;
}
}
//------------------------------------------------------------------------------
// Program main
int main( int argc, char **argv )
int TestPStructuredGridConnectivity( int argc, char *argv[] )
{
int rc = 0;
......
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