Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scalability remarks #219

Merged
merged 5 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "GeophysicalFlows"
uuid = "44ee3b1c-bc02-53fa-8355-8e347616e15e"
license = "MIT"
authors = ["Navid C. Constantinou <navidcy@gmail.com>", "Gregory L. Wagner <wagner.greg@gmail.com>"]
version = "0.11.5"
version = "0.11.6"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand Down
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
This package leverages the [FourierFlows.jl] framework to provide modules for solving problems in
Geophysical Fluid Dynamics on periodic domains using Fourier-based pseudospectral methods.


## Installation

To install, do
Expand All @@ -59,6 +60,28 @@ the package's [documentation].
Some animations created with GeophysicalFlows.jl are [online @ youtube].


## Scalability

For now, GeophysicalFlows.jl is restricted to run on either a single CPU or single GPU. These
restrictions come from FourierFlows.jl. Multi-threading can enhance performance for the Fourier
transforms. By default, FourierFlows.jl will use the maximum number of threads available on
your machine. You can set the number of threads used by FourierFlows.jl by setting the
environment variable, e.g.,

```
$ export JULIA_NUM_THREADS=4
```

For more information on multi-threading users are directed to the [Julia Documentation](https://docs.julialang.org/en/v1/manual/multi-threading/).

If your machine has more than one GPU available, then functionality within CUDA.jl package
enables the user to choose the GPU device that FourierFlows.jl should use. The user is referred
to the [CUDA.jl Documentation](https://juliagpu.github.io/CUDA.jl/stable/lib/driver/#Device-Management);
in particular, [`CUDA.devices`](https://juliagpu.github.io/CUDA.jl/stable/lib/driver/#CUDA.devices)
and [`CUDA.CuDevice`](https://juliagpu.github.io/CUDA.jl/stable/lib/driver/#CUDA.CuDevice).
The user is also referred to the [GPU section](https://fourierflows.github.io/FourierFlowsDocumentation/stable/gpu/) in the FourierFlows.jl documentation.


## Modules

* `TwoDNavierStokes`: the two-dimensional vorticity equation.
Expand Down Expand Up @@ -98,7 +121,7 @@ For more information, check out our [contributor's guide](https://github.com/Fou

The code is citable via [zenodo](https://zenodo.org). Please cite as:

> Navid C. Constantinou, Gregory L. Wagner, and co-contributors. (2021). FourierFlows/GeophysicalFlows.jl: GeophysicalFlows v0.11.5 (Version v0.11.5). Zenodo. [http://doi.org/10.5281/zenodo.1463809](http://doi.org/10.5281/zenodo.1463809)
> Navid C. Constantinou, Gregory L. Wagner, and co-contributors. (2021). FourierFlows/GeophysicalFlows.jl: GeophysicalFlows v0.11.6 (Version v0.11.6). Zenodo. [http://doi.org/10.5281/zenodo.1463809](http://doi.org/10.5281/zenodo.1463809)


[FourierFlows.jl]: https://github.com/FourierFlows/FourierFlows.jl
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ sitename = "GeophysicalFlows.jl",
pages = Any[
"Home" => "index.md",
"Installation instructions" => "installation_instructions.md",
"GPU" => "gpu.md",
"Examples" => [
"TwoDNavierStokes" => Any[
"generated/twodnavierstokes_decaying.md",
Expand Down
25 changes: 25 additions & 0 deletions docs/src/gpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# GPU

GPU-functionality is enabled via `FourierFlows.jl`. For more information on how `FourierFlows.jl`
handled with GPUs we urge you to the corresponding [`FourierFlows.jl` documentation section ](https://fourierflows.github.io/FourierFlowsDocumentation/stable/gpu/)

All `GeophysicalFlows.jl` modules can be run on GPU by providing `GPU()` as the device (`dev`)
argument in the problem constructors. For example,

```julia
julia> GeophysicalFlows.TwoDNavierStokes.Problem(GPU())
Problem
├─────────── grid: grid (on GPU)
├───── parameters: params
├────── variables: vars
├─── state vector: sol
├─────── equation: eqn
├────────── clock: clock
└──── timestepper: RK4TimeStepper
```

## Selecting GPU device

`FourierFlows.jl` can only utilize a single GPU. If your machine has more than one GPU available,
then functionality within `CUDA.jl` package enables the user to choose the GPU device that
`FourierFlows.jl` should use. The user is referred to the [`CUDA.jl` Documentation](https://juliagpu.github.io/CUDA.jl/stable/lib/driver/#Device-Management); in particular, [`CUDA.devices`](https://juliagpu.github.io/CUDA.jl/stable/lib/driver/#CUDA.devices) and [`CUDA.CuDevice`](https://juliagpu.github.io/CUDA.jl/stable/lib/driver/#CUDA.CuDevice).