Building ParaView with ANARI support

We wanted to try out ANARI in ParaView. According to Jefferson Amstutz of the ANARI working group, Sankhesh Jhaveri had a merge request (https://gitlab.kitware.com/paraview/paraview/-/merge_requests/6573) of ANARI in ParaView. Since the merge didn’t make it into ParaView source, I am using the following to get a version of ParaView with ANARI,

  1. git clone --recursive https://gitlab.kitware.com/sankhesh/paraview.git
  2. cd paraview/VTK
  3. git remote add sankhesh https://gitlab.kitware.com/sankhesh/vtk.git
  4. git fetch sankhesh
  5. cd …
  6. git checkout anari
  7. git submodule update --init --recursive

Git log of VTK directory is at the following commit
c:\b\pv-anari\paraview\VTK>git log
commit c70ebb8261f6c109473e702e9bf62558acacea07 (HEAD)
Merge: b59db30f40 52b28c916f
Author: Sankhesh Jhaveri sankhesh.jhaveri@kitware.com
Date: Thu Feb 15 14:39:37 2024 +0000

Merge topic 'anari_fixes'

Git log of the ParaView directory is at the following commit
c:\b\pv-anari\paraview>git log
commit fae4d07301bc7bfe15919b93f7258a8d90e0224f (HEAD → anari, origin/anari)
Author: Sankhesh Jhaveri sankhesh.jhaveri@kitware.com
Date: Wed Mar 6 10:22:34 2024 -0500

Fix issue with anari library name string comparison

Using -DPARAVIEW_ENABLE_RAYTRACING:BOOL=ON dependencies from my ParaView Superbuild installation directories and -Danari_DIR compiled from GitHub - KhronosGroup/ANARI-SDK: ANARI Software Development Kit (SDK), I used the following cmake to configure ParaView with ANARI

c:\b\pv-anari\b>cmake …\paraview -G Ninja -DCMAKE_INSTALL_PREFIX=C:\t\pv-anari -DCMAKE_BUILD_TYPE=Release -DPARAVIEW_ENABLE_RAYTRACING:BOOL=ON -Dospray_DIR=C:/b/pvsb/b/install/lib/cmake/ospray-2.7.1 -Dembree_DIR=C:/b/pvsb/b/install/lib/cmake/embree-3.13.1 -Drkcommon_DIR=C:/b/pvsb/b/install/lib/cmake/rkcommon-1.7.0 -DTBB_ROOT=C:/b/pvsb/b/install/lib/cmake/TBB -Dopenvkl_DIR=C:/b/pvsb/b/install/lib/cmake/openvkl-1.0.1 -Danari_DIR=C:/t/anari/lib/cmake/anari-0.10.1

However, I am running into a number of cxx compilation errors. I included some of them below:

C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariRendererNode.cxx(219): error C2065: ‘u_char’: undeclared identifier
C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariRendererNode.cxx(219): error C2059: syntax error: ‘]’
C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariRendererNode.cxx(253): error C2439: ‘vtkAnariRendererNodeInternals::ColorBuffer’: member could not be initialized
C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariRendererNode.cxx(219): note: see declaration of ‘vtkAnariRendererNodeInternals::ColorBuffer’
C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariRendererNode.cxx(2081): error C2061: syntax error: identifier ‘uint’
C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariRendererNode.cxx(2081): error C2143: syntax error: missing ‘;’ before ‘}’
C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariRendererNode.cxx(2084): error C2065: ‘frameSize’: undeclared identifier

C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariPolyDataMapperNode.cxx(366): error C2976: ‘std::vector’: too few template arguments

C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariPolyDataMapperNode.cxx(70): error C2065: ‘u_int’: undeclared identifier

C:\b\pv-anari\paraview\VTK\Rendering\ANARI\vtkAnariPolyDataMapperNode.cxx(388): note: ‘_Ty *std::vector<_Ty,_Alloc>::data(void) noexcept’: cannot convert ‘this’ pointer from ‘std::vector’ to ‘std::vector<_Ty,_Alloc> &’

Am I using a wrong version of ANARI? or not checkout the right ParaView ANARI branch? Any insight into getting ParaView with ANARI compiled is greatly appreciated. TIA

thanks
-simon

I guess the best person to anwser you is @Sankhesh_Jhaveri in this case

1 Like

@simonmssu Yes, that merge request was against anari sdk v0.7.0 and since then VTK has upgraded its anari version support to v0.10.0. I plan to upgrade my MR to the latest VTK and anari within the next week.

1 Like

thank you Sankhesh. I will give anari sdk v0.7.0 a try for now and try the v0.10.0 later…

@Sankhesh_Jhaveri I was able to get your ANARI ParaView compiled on a linux with the latest ANARI version. The compilation error I mentioned above was on a windows 10 with VS 2024. I am still getting a compilation error on the windows machine even with Anari 0.7.0. But now that I have a working linux ParaView with ANARI, I am not going to worry about the windows compilation error at this time. Thanks…

@Sankhesh_Jhaveri Khronos ANARI group will be holding a ParaView/VisIT ANARI hackathon ANARI Fall 2024 Hackathon Registration (google.com) next week. We are thinking of using the opportunity to look into any outstanding issues we may have with ParaView and ANARI rendering. What would be the best version of your code to use? Is everything in the main ParaView / VTK trunk? Thank you

Hi @simonmssu, I will be at the hackathon too and my goal is to make progress on outstanding ANARI integration with ParaView. FYI - https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11514

@Sankhesh_Jhaveri currently trying to build this, but the moment i enable RAYTRACING it requires ospray - is this intended even if i only want to use anari?

@ingowald That’s a side-effect of the current implementation and is not intentional. I’ll push a fix.

Hi,
I’m also trying to build Paraview with ANARI support. I almost managed to do it through @simonmssu 's solution on the original post.

I’m probably on my final errors to fix but before posting about those here, I noticed there has been some activity recently which lead me to believe there is a different way of building Paraview with ANARI support now.

Would using @Sankhesh_Jhaveri “anari” branch of Paraview along with Jefferson Amstutz “anari_renderer_parameters” branch of VTK work? Or do I need another fork/branch of Paraview to be up to date?

Thanks in advance