# Building Paraview through spack

**URL:** https://discourse.paraview.org/t/building-paraview-through-spack/7901
**Category:** ParaView Support
**Created:** [September 1, 2021, 11:57am UTC](https://discourse.paraview.org/t/building-paraview-through-spack/7901 "2021-09-01T11:57:58Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [September 1, 2021, 11:57am UTC](https://discourse.paraview.org/t/building-paraview-through-spack/7901/1 "2021-09-01T11:57:58Z")

</div>

Has anyone ever installed paraview for off-screen GPU rendering through spack?  
I’d love to learn how to do that and was unable to find documentation for the build parameters,  
because

> [@Failing to build ParaView on the Theta supercomputer](https://discourse.paraview.org/t/failing-to-build-paraview-on-the-theta-supercomputer/6309/2):
>
> Previous installs we’ve done there used ParaView Superbuild, because spack was in early stages. We should move to spack though.

All I found was

- [https://spack.readthedocs.io/en/latest/package\_list.html#paraview](https://spack.readthedocs.io/en/latest/package_list.html#paraview)
- [spack/var/spack/repos/builtin/packages/paraview/package.py at develop · spack/spack · GitHub](https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/paraview/package.py)

---

<div class="post-metadata">

### Author: ![jcbowden](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jcbowden](https://discourse.paraview.org/u/jcbowden)
#### Post date: [September 14, 2021, 12:42pm UTC](https://discourse.paraview.org/t/building-paraview-through-spack/7901/2 "2021-09-14T12:42:03Z")

</div>

Sorry, I was going to comment, however my experience is with osmesa rendring, not off-screen GPU rendering.

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [September 14, 2021, 1:14pm UTC](https://discourse.paraview.org/t/building-paraview-through-spack/7901/3 "2021-09-14T13:14:27Z")

</div>

I know we’ve been working on it but only for the new spack concretizer.  
[@Chuck Atkins](mailto:chuck.atkins@kitware.com) What is the status of that work?

---

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [November 30, 2022, 3:48pm UTC](https://discourse.paraview.org/t/building-paraview-through-spack/7901/4 "2022-11-30T15:48:57Z")

</div>

I have also been trying to build 5.11 with spack for Cray systems, where no X windows is available. My current cmake flags (working and already installed in production) use, for GPU systems

```auto
-DVTK_OPENGL_HAS_EGL=ON -DVTK_USE_X=OFF 

```

or for nodes without GPUs

```auto
-DVTK_OPENGL_HAS_OSMESA=ON -DVTK_USE_X=OFF -DOPENGL_gl_LIBRARY= -DOPENGL_glu_LIBRARY= 

```

Now the current paraview package on the spack repo does not include any VTK\_OPENGL\_HAS\_EGL option. Is that in the works?

---

<div class="post-metadata">

### Author: ![Ryan\_Krattiger](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ryan_krattiger/32/10495_2.png) [@Ryan\_Krattiger](https://discourse.paraview.org/u/Ryan_Krattiger)
#### Post date: [November 30, 2022, 4:41pm UTC](https://discourse.paraview.org/t/building-paraview-through-spack/7901/5 "2022-11-30T16:41:46Z")

</div>

Currently Spack does not support the EGL frontend. This is something that has been asked for a couple of times but required changes to how Spack handled OpenGL frontend/backend. These changes have started, but adding EGL support requires additional work to get it working correctly across numerous packages.

A spec you could try that I have used before, it is assuming that you are only building ParaView and nothing else.

```bash
spack install "paraview +osmesa ~qt 
  ^mesa +osmesa +llvm
    ^llvm ~clang ~flang ~lldb ~lld ~libcxx ~gold +llvm_dylib"

```

The best that is currently available is OSMesa. If you use this backend you will also want to specify `mesa +osmesa +llvm`. The LLVM extensions provide needed acceleration to make CPU rendering tolerable.

To help speed up the LLVM build, you should turn off most of the stuff it tries to provide. I have used `llvm ~clang ~flang ~lldb ~lld ~libcxx ~gold +llvm_dylib`

---

<div class="post-metadata">

### Author: ![Kenneth](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/94ad74/32.png) [@Kenneth](https://discourse.paraview.org/u/Kenneth)
#### Post date: [November 23, 2024, 5:01pm UTC](https://discourse.paraview.org/t/building-paraview-through-spack/7901/6 "2024-11-23T17:01:42Z")

</div>

Hi Ryan, I know I have succeeded with your tips in the past but this time on 5.13.1 I am getting

```auto
spack install "paraview +osmesa ~qt 
  ^mesa +osmesa +llvm
    ^llvm ~clang ~flang ~lldb ~lld ~libcxx ~gold +llvm_dylib"
==> Error: No such variant {'osmesa'} for spec: 'paraview+osmesa~qt ^llvm~clang~flang~gold~libcxx~lld~lldb+llvm_dylib ^mesa+llvm+osmesa

```

I am trying this is sub-steps as well

```auto
spack install mesa +osmesa ~qt
==> Error: No such variant {'qt'} for spec: 'mesa+osmesa~qt'

```

but one step lower does work

```auto
spack install mesa +osmesa

```

succeeds but it looks like the paraview through spack does not support mesa???

````auto
spack info paraview
CMakePackage: paraview

Description:
    ParaView is an open-source, multi-platform data analysis and
    visualization application. This package includes the Catalyst in-situ
    library for versions 5.7 and greater, otherwise use the catalyst
    package.

Homepage: https://www.paraview.org

Preferred version:  
    5.13.1 http://www.paraview.org/files/v5.13/ParaView-v5.13.1.tar.xz

Safe versions:  
    master [git] https://gitlab.kitware.com/paraview/paraview.git on branch master
    5.13.1 http://www.paraview.org/files/v5.13/ParaView-v5.13.1.tar.xz
    5.13.0 http://www.paraview.org/files/v5.13/ParaView-v5.13.0.tar.xz
    5.12.1 http://www.paraview.org/files/v5.12/ParaView-v5.12.1.tar.xz
    5.12.0 http://www.paraview.org/files/v5.12/ParaView-v5.12.0.tar.xz
    5.11.2 http://www.paraview.org/files/v5.11/ParaView-v5.11.2.tar.xz
    5.11.1 http://www.paraview.org/files/v5.11/ParaView-v5.11.1.tar.xz
    5.11.0 http://www.paraview.org/files/v5.11/ParaView-v5.11.0.tar.xz
    5.10.1 http://www.paraview.org/files/v5.10/ParaView-v5.10.1.tar.xz
    5.10.0 http://www.paraview.org/files/v5.10/ParaView-v5.10.0.tar.xz
    5.9.1 http://www.paraview.org/files/v5.9/ParaView-v5.9.1.tar.xz
    5.9.0 http://www.paraview.org/files/v5.9/ParaView-v5.9.0.tar.xz
    5.8.1 http://www.paraview.org/files/v5.8/ParaView-v5.8.1.tar.xz
    5.8.0 http://www.paraview.org/files/v5.8/ParaView-v5.8.0.tar.xz
    5.7.0 http://www.paraview.org/files/v5.7/ParaView-v5.7.0.tar.xz
    5.6.2 http://www.paraview.org/files/v5.6/ParaView-v5.6.2.tar.xz
    5.6.0 http://www.paraview.org/files/v5.6/ParaView-v5.6.0.tar.gz
    5.5.2 http://www.paraview.org/files/v5.5/ParaView-v5.5.2.tar.gz
    5.5.1 http://www.paraview.org/files/v5.5/ParaView-v5.5.1.tar.gz
    5.5.0 http://www.paraview.org/files/v5.5/ParaView-v5.5.0.tar.gz
    5.4.1 http://www.paraview.org/files/v5.4/ParaView-v5.4.1.tar.gz
    5.4.0 http://www.paraview.org/files/v5.4/ParaView-v5.4.0.tar.gz
    5.3.0 http://www.paraview.org/files/v5.3/ParaView-v5.3.0.tar.gz
    5.2.0 http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz
    5.1.2 http://www.paraview.org/files/v5.1/ParaView-v5.1.2.tar.gz
    5.0.1 http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz
    4.4.0 http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz

Deprecated versions:  
    None

Variants:
    advanced_debug [false] false, true
        Enable all other debug flags beside build_type, such as VTK_DEBUG_LEAK
    build_edition [canonical] canonical, catalyst, catalyst_rendering,
                                     core, rendering
        Build editions include only certain modules. Editions are listed in
        decreasing order of size.
    build_system [cmake] cmake
        Build systems supported by the package
    cdi [false] false, true
        Enable CDI support
    cuda [false] false, true
        Build with CUDA
    development_files [true] false, true
        Install include files for Catalyst or plugins support
    examples [false] false, true
        Build examples
    eyedomelighting [false] false, true
        Enable Eye Dome Lighting feature
    fortran [false] false, true
        Enable Fortran support
    hdf5 [false] false, true
        Use external HDF5
    kits [true] false, true
        Use module kits
    mpi [true] false, true
        Enable MPI support
    nvindex [false] false, true
        Enable the pvNVIDIAIndeX plugin
    opengl2 [true] false, true
        Enable OpenGL2 backend
    pagosa [false] false, true
        Build the pagosa adaptor
    qt [false] false, true
        Enable Qt (gui) support
    raytracing [false] false, true
        Enable Raytracing support
    rocm [false] false, true
        Enable ROCm support
    shared [true] false, true
        Builds a shared version of the library
    tbb [false] false, true
        Enable multi-threaded parallelism with TBB
    use_vtkm [default] default, off, on
        Build VTK-m with ParaView by setting PARAVIEW_USE_VTKM=ON,OFF.
        "default" lets the build_edition make the decision. "on" or "off" will
        always override the build_edition.
    visitbridge [false] false, true
        Enable VisItBridge support

    when +rocm
      amdgpu_target [none] none, gfx1010, gfx1011, gfx1012, gfx1013,
                                     gfx1030, gfx1031, gfx1032, gfx1033,
                                     gfx1034, gfx1035, gfx1036, gfx1100,
                                     gfx1101, gfx1102, gfx1103, gfx701,
                                     gfx801, gfx802, gfx803, gfx900,
                                     gfx900:xnack-, gfx902, gfx904, gfx906,
                                     gfx906:xnack-, gfx908, gfx908:xnack-,
                                     gfx909, gfx90a, gfx90a:xnack+,
                                     gfx90a:xnack-, gfx90c, gfx940, gfx941,
                                     gfx942
          AMD GPU architecture

    when +cuda
      cuda_arch [none] none, 10, 11, 12, 13, 20, 21, 30, 32, 35,
                                     37, 50, 52, 53, 60, 61, 62, 70, 72, 75,
                                     80, 86, 87, 89, 90, 90a
          CUDA architecture

    when build_system=cmake
      build_type [Release] Debug, MinSizeRel, RelWithDebInfo,
                                     Release
          CMake build type
      generator [ninja] none
          the build system generator to use

    when build_system=cmake ^cmake@3.9:
      ipo [false] false, true
          CMake interprocedural optimization

    when @5.6:
      python [false] false, true
          Enable Python support

    when @5.8:
      adios2 [false] false, true
          Enable ADIOS2 support

    when @5.9:
      fides [false] false, true
          Enable Fides support

    when @5.9:+python
      openpmd [false] false, true
          Enable openPMD support (w/ ADIOS2/HDF5)

    when @5.7:
      catalyst [false] false, true
          Enable Catalyst 1

    when @5.10:
      libcatalyst [false] false, true
          Enable Catalyst 2 (libcatalyst) implementation

Build Dependencies:
    adios2 freetype libcatalyst netcdf-c py-mpi4py
    boost gl libogg ninja py-numpy
    bzip2 glew libpng nlohmann-json python
    cdi gmake libtheora openimagedenoise python-venv
    cli11 hdf5 libtiff openpmd-api qt
    cmake hip libxml2 ospray silo
    cuda hsa-rocr-dev libxt pegtl tbb
    double-conversion jpeg llvm-amdgpu proj xz
    eigen jsoncpp lz4 protobuf zlib-api
    expat kokkos mpi pugixml

Link Dependencies:
    adios2 freetype libcatalyst mpi qt
    boost gl libogg netcdf-c silo
    bzip2 glew libpng nlohmann-json tbb
    cdi hdf5 libtheora openimagedenoise xz
    cli11 hip libtiff ospray zlib-api
    cuda hsa-rocr-dev libxml2 pegtl
    double-conversion jpeg libxt proj
    eigen jsoncpp llvm-amdgpu protobuf
    expat kokkos lz4 pugixml

Run Dependencies:
    openpmd-api py-mpi4py py-pandas python-venv
    py-matplotlib py-numpy python

Licenses: 
    Apache-2.0
```
````

---

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [November 26, 2024, 3:10pm UTC](https://discourse.paraview.org/t/building-paraview-through-spack/7901/7 "2024-11-26T15:10:57Z")

</div>

I have recently done an EGL build of v5.13.1 for our GraceHopper cluster. This is my build command

```auto
spack env create paraview-gh-ospray2
spack env activate paraview-gh-ospray2
spack -e paraview-gh-ospray2 add paraview+python+mpi+hdf5+nvindex+tbb+adios2+raytracing+libcatalyst+opengl2+fortran+cdi~qt+shared build_system=cmake build_type=Release ^[v
irtuals=gl] egl
spack -e paraview-gh-ospray2 concretize -f
spack -e paraview-gh-ospray2 install

```
