Ubuntu 20.04 Advanced Install

Before starting, follow the steps in Generic SeaRay Installation.

Install Compilers

It is a good idea to install both GCC and LLVM compilers first.

  1. sudo apt update
  2. sudo apt install gcc
  3. sudo apt install llvm clang

System-wide pocl (optional)

You can install pocl using apt for all users. If you wish to do this proceed as follows.

  1. Install pocl system wide

    • sudo apt install pocl-opencl-icd libpocl2 ocl-icd-opencl-dev
  2. If you created a generic environment already, recreate it without pocl as follows

    • conda remove -n NAME --all
    • conda create -n NAME -c conda-forge pyopencl scipy matplotlib
    • conda activate NAME
    • conda install -c conda-forge ocl-icd-system

Support for NVIDIA Graphics

  1. sudo apt update
  2. sudo apt install nvidia-opencl-icd nvidia-opencl-dev
  3. sudo apt update
  4. Activate the conda environment (if not already active)
  5. conda install -c conda-forge ocl-icd-system

Support for AMD Graphics

  1. Download the driver for your GPU from the AMD website.

  2. Follow the instructions from AMD to install the driver with OpenCL.

    • As of this writing, the link is here. You must specify a command line option --opencl=pal or --opencl=legacy depending on your GPU. You must also use the amdgpu-pro-install variant of the install script.
  3. Activate the conda environment (if not already active)

  4. conda install -c conda-forge ocl-icd-system

TeX for premium plot labels

If you want the nicest looking plot labels you have to install a TeX distribution.

  1. sudo apt install texlive
  2. sudo apt install texlive-publishers
  3. sudo apt install dvipng
  4. Uncomment the line mpl.rcParams['text.usetex'] = True near the top of ray_plotter.py.

Advanced 3D Plotting

The SeaRay plotter supports matplotlib and/or mayavi for 3d plotting. The 3D capabilities of matplotlib are at present nonideal (e.g., depth is not properly rendered in all cases). If you want robust 3D plots you should install mayavi.

In some cases mayavi and matplotlib step on each other. If this happens you may need separate environments for each. The plotter is written to sense which library is available and react accordingly.

  1. Activate your environment.
  2. conda install -c conda-forge mayavi

Interactive Notebooks

  1. Activate your environment.

  2. conda install jupyter ipympl

  3. Create a directory ~/.jupyter/custom/ and copy raysroot/extras/custom.css to the new directory.

  4. If there are problems with Jupyter notebooks any or all of the following may be tried:

    • conda install widgetsnbextension=n, where n is some older version.
    • conda install ipywidgets
    • jupyter nbextension install --py --sys-prefix widgetsnbextension
    • jupyter nbextension enable --py --sys-prefix widgetsnbextension