Commit 560fc1a6 authored by Berk Geveci's avatar Berk Geveci

Enabled and fixed parallel examples.

It looks like parallel examples have been disabled since
modularization. Fixed.
parent fc131831
......@@ -51,9 +51,9 @@ else()
if(VTK_RENDERING_BACKEND STREQUAL "OpenGL" AND vtkTestingCore_LOADED)
add_subdirectory(LIC/Cxx)
endif()
# if(vtkParallelCore_LOADED)
# add_subdirectory(ParallelProcessing/Generic)
# endif()
if(vtkParallelMPI_LOADED AND vtkRenderingParallel_LOADED)
add_subdirectory(ParallelProcessing/Generic)
endif()
# This may have been already built as part of the VTK build.
# If so we cannot create the target "vtkLocalExample" because
# an imported target of the same name already exists in the
......
INCLUDE_REGULAR_EXPRESSION("^(lex|vtk|png|j|Task|Pipe).*$")
IF (VTK_USE_MPI)
find_package(MPI REQUIRED)
INCLUDE_DIRECTORIES(${MPI_C_INCLUDE_PATH})
include(vtkMPI)
# Needed for mpich 2
ADD_DEFINITIONS("-DMPICH_IGNORE_CXX_SEEK")
find_package(VTK COMPONENTS
vtkImagingCore
vtkImagingGeneral
vtkFiltersCore
vtkFiltersSources
vtkParallelMPI
vtkRenderingCore
vtkRenderingParallel
vtkTestingCore
vtkTestingRendering
)
include(${VTK_USE_FILE})
IF (VTK_USE_RENDERING)
ADD_EXECUTABLE(ParallelIso ParallelIso.cxx)
TARGET_LINK_LIBRARIES(ParallelIso vtkParallel vtkHybrid
${MPI_C_LIBRARIES})
if (MPI_CXX_LIBRARIES)
TARGET_LINK_LIBRARIES(ParallelIso ${MPI_CXX_LIBRARIES})
endif()
ENDIF ()
# Needed for mpich 2
ADD_DEFINITIONS("-DMPICH_IGNORE_CXX_SEEK")
SET(TaskPara_SRCS TaskParallelism.cxx task1.cxx task2.cxx)
ADD_EXECUTABLE(ParallelIso ParallelIso.cxx)
TARGET_LINK_LIBRARIES(ParallelIso LINK_PRIVATE ${VTK_LIBRARIES})
VTK_MPI_LINK(ParallelIso)
ADD_EXECUTABLE(TaskParallelism ${TaskPara_SRCS})
TARGET_LINK_LIBRARIES (TaskParallelism vtkParallel)
SET(TaskPara_SRCS TaskParallelism.cxx task1.cxx task2.cxx)
ADD_EXECUTABLE(TaskParallelism ${TaskPara_SRCS})
TARGET_LINK_LIBRARIES (TaskParallelism ${VTK_LIBRARIES})
# ADD_EXECUTABLE(SimpleBenchmark SimpleBenchmark.cxx)
# TARGET_LINK_LIBRARIES(SimpleBenchmark vtkParallel ${MPI_LIBRARIES} )
ENDIF ()
......@@ -80,7 +80,7 @@ void SetIsoValueRMI(void *localArg, void* vtkNotUsed(remoteArg),
vtkContourFilter *iso = args->ContourFilter;
val = iso->GetValue(0);
iso->SetValue(0, val + ISO_STEP);
args->Elevation->Update(myid, numProcs, 0));
args->Elevation->UpdatePiece(myid, numProcs, 0);
contrl->Send(args->Elevation->GetOutput(), 0, ISO_OUTPUT_TAG);
}
......@@ -168,7 +168,7 @@ void MyMain( vtkMultiProcessController *controller, void *arg )
{
// set the local value
iso->SetValue(0, iso->GetValue(0) + ISO_STEP);
elev->Update(myid, numProcs, 0));
elev->UpdatePiece(myid, numProcs, 0);
for (int i = 1; i < numProcs; ++i)
{
......
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