Cannot Find VTK Modules Necessary for vtkPVPythonCatalyst

I am attempting to get the basic catalyst implementation in The Catalyst User’s Guide v2.0 working on the simulation framework I am working on, but I have run into issues.

I took my CMakeLists.txt from the Catalyst User’s Guide. I have copied it below.CMakeLists.txt (507 Bytes)

I have also added the CMakeCache.txt generated from the above file.
CMakeCache.txt (40.2 KB)

To preface, my machine is running Ubuntu 18.04 and I am using Paraview 5.8 which I retrieved and built from
https://www.paraview.org/Wiki/ParaView:Build_And_Install

After running cmake .. I get the following error:

CMake Warning (dev) in CMakeLists.txt:I took the CMakeLists.txt from
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a “project(Project)” command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/student/Documents/cmake-3.17.3-Linux-x86_64/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
The package name passed to find_package_handle_standard_args (MPI_C) does
not match the name of the calling package (MPI). This can lead to problems
in calling code that expects find_package result variables (e.g.,
_FOUND) to follow a certain pattern.
Call Stack (most recent call first):
/home/student/Documents/Paraview/ParaviewDr.Bauer/paraview/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/FindMPI.cmake:1695 (find_package_handle_standard_args)
/home/student/Documents/Paraview/ParaviewDr.Bauer/paraview_build/lib/cmake/paraview-4.3/vtk/VTK-vtk-module-find-packages.cmake:250 (find_package)
/home/student/Documents/Paraview/ParaviewDr.Bauer/paraview_build/lib/cmake/paraview-4.3/vtk/vtk-config.cmake:138 (include)
/home/student/Documents/Paraview/Paraview5.8/paraview_build/lib/cmake/paraview-5.8/paraview-config.cmake:53 (find_package)
/home/student/Documents/Paraview/Paraview5.8/paraview_build/paraview-config.cmake:1 (include)
CMakeLists.txt:5 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/student/Documents/Paraview/Paraview5.8/paraview_build/lib/cmake/paraview-5.8/ParaView-vtk-module-find-packages.cmake:14 (if):
Policy CMP0057 is not set: Support new IN_LIST if() operator. Run “cmake
–help-policy CMP0057” for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

IN_LIST will be interpreted as an operator when the policy is set to NEW.
Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
/home/student/Documents/Paraview/Paraview5.8/paraview_build/lib/cmake/paraview-5.8/paraview-config.cmake:78 (include)
/home/student/Documents/Paraview/Paraview5.8/paraview_build/paraview-config.cmake:1 (include)
CMakeLists.txt:5 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at /home/student/Documents/Paraview/Paraview5.8/paraview_build/lib/cmake/paraview-5.8/ParaView-vtk-module-find-packages.cmake:14 (if):
if given arguments:

"_vtk_module_component" "IN_LIST" "_vtk_module_find_package_components_checked"

Unknown arguments specified
Call Stack (most recent call first):
/home/student/Documents/Paraview/Paraview5.8/paraview_build/lib/cmake/paraview-5.8/paraview-config.cmake:78 (include)
/home/student/Documents/Paraview/Paraview5.8/paraview_build/paraview-config.cmake:1 (include)
CMakeLists.txt:5 (find_package)

CMake Error at CMakeLists.txt:5 (find_package):
Found package configuration file:

/home/student/Documents/Paraview/Paraview5.8/paraview_build/paraview-config.cmake

but it set ParaView_FOUND to FALSE so package “ParaView” is considered to
be NOT FOUND. Reason given by package:

The following imported targets are referenced, but are missing:
VTK::RenderingRayTracing VTK::IOIoss VTK::IOCONVERGECFD
** VTK::AcceleratorsVTKmFilters VTK::AcceleratorsVTKmCore**

– Configuring incomplete, errors occurred!
See also “/home/student/Documents/Athena/code/Athena-RFX.4.3.0_PS_CVersion.Catalyst.temp/src/CMakeFiles/CMakeOutput.log”.
See also “/home/student/Documents/Athena/code/Athena-RFX.4.3.0_PS_CVersion.Catalyst.temp/src/CMakeFiles/CMakeError.log”.

I believe this issue is caused by am improper build of Paraview so I will also add my Paraview’s CMakeCache file.
CMakeCache.txt (235.0 KB)

If you have issues with the formatting of this post please let me know as I am new to this.

Thank you.

@ben.boeckel @utkarsh.ayachit Any ideas? I’ve been working with Sean but couldn’t figure this out.

Here’s a potential update to the CMakeLists.txt

# FIX: add a project name
project(AthenaCatalyst)
# FIX: don't use too old a cmake version. If you use something like 2.8.8 as
#  you did, then CMake policy defaults may not work.
cmake_minimum_required(VERSION 3.16)

set(ParaView_DIR "/home/student/Docuements/Paraview/Paraview5.8/paraview_build")

# FIX: use new name of the component.
find_package(ParaView 5.8 REQUIRED COMPONENTS PythonCatalyst)

set(Adaptor_SRCS catalyst.c)

add_library(Adaptor ${Adaptor_SRCS})

# FIX: use correct module targets.
target_link_libraries(Adaptor ParaView::PythonCatalyst VTK::mpi)

add_library(AthenaCatalyst main.c FEDataStructures.c)
target_link_libraries(AthenaCatalyst LINK_PRIVATE Adaptor)

# FIXME, more all the `vtk_module_link()` etc. at the end of the file,
# this is no longer needed.

I have made those changes, but the problem still persists. I have also tried using paraview superbuild to gather all of the dependencies that I need (ex. ospray), but this does not seem to work either.