Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
debian
VTK
Commits
560fc1a6
Commit
560fc1a6
authored
Feb 04, 2016
by
Berk Geveci
Browse files
Enabled and fixed parallel examples.
It looks like parallel examples have been disabled since modularization. Fixed.
parent
fc131831
Changes
3
Show whitespace changes
Inline
Side-by-side
Examples/CMakeLists.txt
View file @
560fc1a6
...
...
@@ -51,9 +51,9 @@ else()
if
(
VTK_RENDERING_BACKEND STREQUAL
"OpenGL"
AND vtkTestingCore_LOADED
)
add_subdirectory
(
LIC/Cxx
)
endif
()
#
if(vtkParallel
Core
_LOADED)
#
add_subdirectory(ParallelProcessing/Generic)
#
endif()
if
(
vtkParallel
MPI_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
...
...
Examples/ParallelProcessing/Generic/Cxx/CMakeLists.txt
View file @
560fc1a6
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
()
Examples/ParallelProcessing/Generic/Cxx/ParallelIso.cxx
View file @
560fc1a6
...
...
@@ -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
->
Update
Piece
(
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
->
Update
Piece
(
myid
,
numProcs
,
0
);
for
(
int
i
=
1
;
i
<
numProcs
;
++
i
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment