[Paraview] Is USE_EXTERNAL_VTK supported with ParaView 5.1.2?
Christophe Trophime
christophe.trophime at lncmi.cnrs.fr
Mon Aug 29 09:28:45 EDT 2016
> From: "corinna reuter" <corinnareuter75 at gmail.com>
> To: "Utkarsh Ayachit" <utkarsh.ayachit at kitware.com>
> Cc: "ParaView" <paraview at paraview.org>
> Sent: Sunday, August 28, 2016 3:28:51 PM
> Subject: Re: [Paraview] Is USE_EXTERNAL_VTK supported with ParaView 5.1.2?
> Thank you, I will try if that works. Now that you mention it, I think I
> remember that I have been successful in a similar situation quite some time
> ago by using the build directory.
> However, the problem with this is that I would have to always copy around the
> complete build directory between production servers. At the moment I only
> install the installation directory on those servers. (The much smaller
> installation directory helps to reduce the startup time significantly.) In
> the installation directory, "VTKTargets.cmake" is missing, so that other
> projects cannot use this as VTK_DIR.
> Would it be easy for you to make the ParaView installation directory usable
> as VTK_DIR by adding the required cmake files? Or is there a more difficult
> problem underneath? The missing VTKTargets.cmake has been discussed several
> times in the past with no real solution.
Hi, just to let you know that I add try something very similar that is building my app (using Feelpp library) using Paraview/VTK instead of plain VTK.
To do so we made something like this:
if ( FEELPP_ENABLE_VTK )
# First try to find ParaView
FIND_PACKAGE(ParaView NO_MODULE
PATHS $ENV{PARAVIEW_DIR} ${MACHINE_PARAVIEW_DIR} )
if(ParaView_FOUND)
message(STATUS "[ParaView] Use file: ${PARAVIEW_USE_FILE}")
INCLUDE(${PARAVIEW_USE_FILE})
# trying to load a minimal vtk
IF (TARGET vtkParallelMPI)
FIND_PACKAGE(ParaView QUIET COMPONENTS vtkParallelMPI NO_MODULE
PATHS $ENV{PARAVIEW_DIR} ${MACHINE_PARAVIEW_DIR} )
message(STATUS "[ParaView] Loading vtkParallelMPI module")
ENDIF ()
IF (TARGET vtkPVCatalyst)
FIND_PACKAGE(ParaView COMPONENTS vtkPVCatalyst NO_MODULE
PATHS $ENV{PARAVIEW_DIR} ${MACHINE_PARAVIEW_DIR} )
message(STATUS "[ParaView] Loading vtkPVCatalyst module")
ENDIF ()
IF (TARGET vtkPVPythonCatalyst)
FIND_PACKAGE(ParaView COMPONENTS vtkPVPythonCatalyst NO_MODULE
PATHS $ENV{PARAVIEW_DIR} ${MACHINE_PARAVIEW_DIR} )
message(STATUS "[ParaView] Loading vtkPVPythonCatalyst module")
ENDIF ()
# Enable VTK exporter and insitu in config
IF (TARGET vtkPVCatalyst AND TARGET vtkPVPythonCatalyst)
set(FEELPP_VTK_INSITU_ENABLED 1)
message(STATUS "In-situ visualisation enabled (vtkPVCatalyst, vtkPVPythonCatalyst).")
ENDIF()
# Mark VTK and ParaView as available
set(FEELPP_HAS_VTK 1)
set(FEELPP_HAS_PARAVIEW 1)
# Check for version to ensure that we are able to
# use an external communicator
set(VTK_HAS_PARALLEL 0)
if( VTK_MAJOR_VERSION EQUAL 6 OR VTK_MAJOR_VERSION GREATER 6 )
set(VTK_HAS_PARALLEL 1)
endif()
INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${ParaView_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
SET(FEELPP_LIBRARIES ${ParaView_LIBRARIES} ${FEELPP_LIBRARIES})
SET(FEELPP_LIBRARIES ${VTK_LIBRARIES} ${FEELPP_LIBRARIES})
SET(FEELPP_ENABLED_OPTIONS "${FEELPP_ENABLED_OPTIONS} ParaView/VTK" )
message(STATUS "Found ParaView ${PARAVIEW_VERSION_FULL}/VTK ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
endif()
# If ParaView was not found we try to find VTK
if(NOT ParaView_FOUND)
message(STATUS "ParaView could not be found or is not compatible with Feel++. Looking for VTK...")
FIND_PACKAGE(VTK QUIET)
if( VTK_FOUND )
....
It compiles without any problem.
On Debian/Testing this won't work with packaged paraview. The package need to be reworked in order to use it for providing vtk.
It consists mainly in adding some "missing files" into the paraview-dev package.
I'm trying to fix this
However I run into a problem regarding paraview and vtk python bindings.
In a "standard" installation of paraview we end-up with the following directories:
../site-packages/paraview/vtk
../site-packages/vtk
These 2 directories contains the same python files except for the __init__.py files.
The last directory (vtk) also contains some shared libs.
Would it be possible to somehow to have only on vtk directory into site-packages?
This would avoid a clash between python-paraview package and python-vtk6 package..
or to use python-vtk6 package to provide ../site-packages/vtk as it's done right now
(Besides paraview 5.1.2 actually provides vtk7 which is not packaged so far...)
Any idea or comments to work around this problem
Best.
> Thank you
> Corinna
> On Sat, Aug 27, 2016 at 12:27 PM, Utkarsh Ayachit <
> utkarsh.ayachit at kitware.com > wrote:
> > > For this purpose I configure ParaView with the
>
> > > -DUSE_EXTERNAL_VTK=ON option, but I get a bunch of errors.
>
> > > Before I attach lengthy error logs, I'd like to ask whether this can work
> > > at
>
> > > all?
>
> > No, it's not supported and there are no indications that it will any
>
> > time soon unless someone from the community takes it up.
>
> > > The background of my request is that I need to develop a ParaView plugin
>
> > > which links a software tool that depends on VTK by itself. I couldn't
> > > find
> > > a
>
> > > possibility to link this tool against the VTK which is included in
> > > ParaView.
>
> > You should be able to set your VTK_DIR to ParaViewBuildDir/VTK.
>
> _______________________________________________
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
> Search the list archives at: http://markmail.org/search/?q=ParaView
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160829/bc313b98/attachment.html>
More information about the ParaView
mailing list