Generic SeaRay Installation

Install Miniforge3

The pyopencl developers recommend using Miniforge as opposed to Anaconda or Miniconda.

  1. Uninstall miniconda/anaconda, or else be prepared to add path specifiers from time to time

  2. Internet search for miniforge

  3. Follow installation guide for your platform

  4. conda update conda

  5. conda init
    • If you want to use PowerShell run conda init powershell

Install Drivers

If you are using Windows:

  • AMD — install specific drivers for the video card

  • NVIDIA — install CUDA developer tools

  • Intel CPU — install Intel CPU Runtime for OpenCL

If you are using Mac/Linux:

  • CPU — no action required

  • NVIDIA — install CUDA developer tools

Environment and Basic Packages

  1. Choose a name for your environment, denoted NAME

  2. conda create -n NAME pyopencl scipy matplotlib jupyter ipympl pillow pytest python=3.11
    • You may be able to use a later python version

    • As of this writing there is an issue with OpenSSL on Windows, it may help to force miniforge to use a specific version, e.g., add openssl=3.2.0 to all install commands.

  3. If you are using Mac or Linux, conda install pocl

  4. conda activate NAME
    • This command puts you in an isolated conda environment. This command must be issued each time you open a new terminal window, in order to use the environment.

Getting SeaRay Components

To copy the SeaRay components to your local computer perform the following procedure:

  1. Install git if necessary using your favorite package manager or other method

  2. Navigate to the directory where you want to install SeaRay (you don’t need to make an enclosing directory).

  3. git clone https://github.com/USNavalResearchLaboratory/searay.git

  4. Checkout a stable version
    • git tag --list displays tagged commits.

    • Select a tag without a letter suffix for the highest stability.

    • git checkout vers, where vers is the selected tag.

  5. If you like you can give the SeaRay root directory another name, we will call it raysroot from now on.

Optional Components

  1. If you want the nicest looking plot labels you may want to install a TeX distribution.
    • Search internet to find instructions for your operating system.

    • Uncomment the line mpl.rcParams['text.usetex'] = True near the top of plotter.py.

  2. If you want the best 3D plots you may want to install mayavi
    • Activate your environment.

    • conda install mayavi

    • The plotter automatically senses its presence