Not able to compile Paraview with OptiX

Hey Folks!

I am trying to build Paraview with OptiX support. I need to compile Paraview because i have a lot of custom filters and UI plugins which need paraview headers to build. I was able to compile VTK and Paraview myself in the past without OptiX but with OSPray (also self compiled). However, this time i miserably fail and i can’t find any guides on which steps are needed.

I am currently on Arch Linux and i tried the Paraview 5.12.0 Superbuild but i can’t find any way to enable OptiX / VisRTX. There is an option to enable cuda though. I understand that the MDL SDK and OptiX can’t be just downloaded, so i registered to nvidia and downloaded / installed the SDKs on my system. How can i now tell the superbuild to use these?

I also tried to compile VisRTX 0.1.6 with MDL 2019 and OptiX 6.0 myself (these are the versions expected by paraview 5.12 apparently) but without success, because it expects CUDA 10.0 and there are no official (and working) packages for that on Arch anymore. I could use the AUR package of cuda 11.1 (still supporting sm_30 architecure) but this needs gcc 7 (?!) which also fails to build on my config.

Its really a mess and i really don’t blame kitware for it but it seems to me that there is no straight forward way to compile paraview with optix on arch right now. How are you guys doing it? Do you keep a build server running on 5 year old software?

In the end my last resort would be to just export all the geometry of my visualization and rendering it with the release binaries of Paraview, which has a working OptiX engine.

Thanks for your help!

Kind regards, Max

There’s the USE_NONFREE_COMPONENTS flag to expose those projects. The download step is skipped if the files are in the <builddir>/downloads/ directory with the right hashes. Note that some downloads are “stripped” of various things and may not match. I recommend just removing/updating the hash for those (directions are in versions.cmake).

We use old containers with new compilers. CentOS 7 with GCC 10 via Red Hat’s scl. These toolchains are really life savers in our case: new compiler, but only expects the CentOS 7 stdlib at runtime.

Thanks a lot for your assistance! I was actually able to compile Paraview with VisRTX, OptiX and MDL enabled with your suggestions.

However, now i do not see the option to render with OptiX in the Paraview UI. If OSPray is compiled, the ray trace option is showing but only ray and path tracing from ospray is available. No sign of OptiX…

There is also no info on the terminal when starting paraview. Usually i would expect it to detect my GPU as the release binaries do.
I took a look into the build directories of the packages and it seems that optix does not have any built files, only a src folder with headers etc.

So what did you exactly mean with “stripped” downloads? Is the freely distributed version of Optix not enough to build the rendering engine for paraview? Or is there any other project i need to enable in the superbuild to get optix working?

It looks to be an OptiX 7+ thing; 6.0.0 are full SDKs. I’d have to go and look at my attempt at updating to 8 to see why I had done that.

Nevermind, i just had to export the environment variable LD_LIBRARY_PATH=superbuild-dir/install/lib. Now Paraview finds OptiX and is able to render with raytracing! :slight_smile:

Thanks very much for your support!

Ah, you’re running from the install tree directly. I recommend making a package and running that. Lots of library cross-references get fixed up in the packaging process.