GPU Support
PlanktonIndividuals.jl
has support from CUDA.jl
and KernelAbstractions.jl
to be able to run on graphical processing unit (GPU) for higher performance. Depending on the combination of CPU and GPU you have, a speedup of 35x is possible. Please see Benchmarks for more details.
How to use a GPU
To use a GPU to run PlanktonIndividuals.jl
is easy. Users do not need to rewrite the setup or simulation script to change the architecture to run on. See Architecture for detailed instructions on setting up a model on GPU.
If you are having issues with running PlanktonIndividuals
on a GPU, please open an issue
When to use a GPU
GPU is very useful when running large simulations (either large domain or huge number of individuals, or both). If you simulate over 10,000 individuals, you will probably benefit form GPU. Please note, GPU is usually memory-limited, that is to say, you will probably fill up the memory on GPU long before the model slows down.
Individuals
take up a large amount of GPU memory due to complicated physiological processes and diagnostics. Typically, one should not try more than 50,000 individuals for a 12GB GPU.
GPU resources
There are a few resources you can try to acquire a GPU from.
Google Colab provides GPUs but you need to install Julia manually. Please see this post on the Julia Discourse for detailed instructions.
Code Ocean also has GPU support. You can use "Ubuntu Linux with GPU support (18.04.3)" but you still have to install Julia manually.