Oceananigans.jl icon indicating copy to clipboard operation
Oceananigans.jl copied to clipboard

Add examples for setting initial conditions with Arrays on the docs (CPU and GPU)

Open iuryt opened this issue 3 years ago • 2 comments

Discussed in https://github.com/CliMA/Oceananigans.jl/discussions/2455

Originally posted by iuryt April 21, 2022 Hi,

I couldn't find an example from the docs that uses a regular array, converts to CudaArray and them use it as an initial condition for a GPU run. Do you guys have any example of that that could share? Maybe would be good to consider putting an example like this on the docs.

I think we should add examples on the docs for setting initial conditions with Arrays using CPU and GPU. https://clima.github.io/OceananigansDocumentation/stable/model_setup/setting_initial_conditions/#Setting-initial-conditions

I know that for CPU it should be straight forward, but I think it is important to make it clear. Also, it might not be like this for GPU.

iuryt avatar Apr 21 '22 20:04 iuryt

There shouldn't be a difference between CPU vs GPU when using array initial conditions so if there it's a bug and let's fix it.

glwagner avatar Apr 21 '22 23:04 glwagner

@iuryt we do have an example here:

https://github.com/CliMA/Oceananigans.jl/blob/3322f1879cf8c84c88e9c7cf4e33bdcf70520c36/examples/two_dimensional_turbulence.jl#L45-L53

which should work on the GPU. Do you think we need more?

glwagner avatar May 02 '22 17:05 glwagner

We have an example!

glwagner avatar Mar 22 '23 17:03 glwagner

Sorry for not replying this, it probably happened something that I forgot to answer, but this is all fine. Thanks.

iuryt avatar Mar 22 '23 23:03 iuryt