⛔️ DEPRECATED – GO TO https://github.com/metno/gpuocean
GPU Ocean codebase.
In order to run this code, you need to have access to a CUDA enabled GPU, with CUDA toolkit and appropriate drivers installed.
If you are on Windows, you also need to have installed Visual Studios and add the path to its bin folder in PATH. This is so that pycuda can find a C++ compiler. The following steps are an example how to yield those steps:
- Install NVIDIA CUDA Toolbox
- Install Visual Studio 2019 (Community version)
- Add a C++ compiler to the PATH variable of Windows
- Find folder which contains compiler (check
C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64
) - Open control panel "Edit the system environment variables"
- Click on "Environment variables"
- Select "Path" from the user variables and choose edit
- Add the folder from above as new path
- Find folder which contains compiler (check
We recommend that you set up your python environment using the package manager Conda as follows:
- Install miniconda or miniforge.
- If you choose to install Miniconda (a minimal subset of Anaconda), you must take care to not violate the commercial license of Anaconda introduced in Sep 2020. Miniconda is not bound by this licence, but downloading packages through the default channel pointing to anaconda seems to be. All commands in this instruction use the community-driven channel
conda-forge
, but to be sure to not violate the anaconda licence you can remove the default channel by
Or install miniforge instead, which "holds a minimal installer for Conda specific to conda-forge."conda config --remove channels defaults
- If you choose to install Miniconda (a minimal subset of Anaconda), you must take care to not violate the commercial license of Anaconda introduced in Sep 2020. Miniconda is not bound by this licence, but downloading packages through the default channel pointing to anaconda seems to be. All commands in this instruction use the community-driven channel
- Install jupyter notebook (unless you already have it installed on your system) by opening a terminal (or Anaconda prompt if on Windows) and type
conda install -c conda-forge jupyter
- Install the conda extensions that allows jupyter notebook to select conda environments as kernels:
conda install -c conda-forge nb_conda_kernels
- Create a new conda environment according to the environment file in this repository
conda env create -f conda_environment.yml
- Activate the new environment
conda activate gpuocean
- Install pycuda (but none of its dependencies) using pip:
pip3 install --trusted-host files.pythonhosted.org --no-deps -U pycuda
- Installing latex for plotting
sudo apt-get install texlive-latex-base texlive-latex-extra texlive-fonts-recommended dvipng cm-super
You should now be able to start a jupyter notebook server, open one of our notebooks, select the conda environment 'gpuocean' as kernel, and run the code.
Have fun!
cd <project root directory>
wget -r -np -nH -R "index.html*" -X icons http://gpu-ocean.met.no/gpu_ocean
More information can be found in the wiki pages