Generic SeaRay Installation¶
We will use Anaconda to create an environment suitable for SeaRay. Ideally this insulates the installation from platform dependencies, although SeaRay uses technologies that stress the dependency chain, and the effect of this can vary by platform. The pyopencl package (for hardware acceleration) is generally the most troublesome element. If this seems to be causing problems it may help to read Troubleshooting OpenCL.
Environment and Basic Packages¶
If you already have Anaconda3 installed, skip the next 2 steps. It is possible you can use your existing environment and skip this entire section: but to be safe create a new environment as detailed below.
Download Miniconda3 installer from internet
Navigate to downloaded file
- For linux or MacOS, execute
bash filename, wherefilenameis the file that you just downloaded- For Windows run the graphical installer and accept the defaults. When finished use the Anaconda prompt that should be available in the
Startmenu to issue the commands below.
conda update conda
conda init
- If you want to use the Windows PowerShell run
conda init powershellChoose a name for your environment, denoted
NAME
conda create -n NAME -c conda-forge pocl pyopencl scipy matplotlib pillow
- The
poclpackage provides generic OpenCL support. On MacOS you can omitpoclsince Apple provides their own OpenCL support. On Windows you can also sometimes omitpocldepending on how the system is configured. For Linux you probably needpocl.
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:
Open a terminal window (Anaconda prompt on Windows)
Test to see if you have Git installed by executing
git --versionInstall Git if necessary.
- Anaconda —
conda install git- CentOS/RHEL/SL —
sudo yum install git- Homebrew —
brew install git- MacPorts —
sudo port install git- Ubuntu —
sudo apt install gitNavigate to the directory where you want to install SeaRay (you don’t need to make an enclosing directory).
git clone https://github.com/USNavalResearchLaboratory/searay.gitCheckout a stable version
git tag --listdisplays tagged commits.- Select a tag without a letter suffix for the highest stability.
git checkout vers, whereversis the selected tag.If you like you can give the SeaRay root directory another name, we will call it
raysrootfrom now on.
Advanced Installation Preview¶
At this point you should have enough to run SeaRay simulations and view the data with the SeaRay plotter. If you want to activate more features, see Advanced Installation. The additional features include:
- Higher performance parallelism
- Premium plot labels using TeX
- Advanced 3D plots using mayavi
- Interactive Jupyter notebooks