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

Results are wonky when running examples/three_layer_constant_fluxes.jl with free convection #118

Open
xkykai opened this issue May 26, 2021 · 5 comments

Comments

@xkykai
Copy link
Collaborator

xkykai commented May 26, 2021

I ran examples/three_layer_constant_fluxes.jl with the command as follows:
unbuffer ~/julia-1.6.1/bin/julia --project examples/three_layer_constant_fluxes.jl --size 256 256 128 --extent 512 512 256 --hours 192 --buoyancy-flux -4e-8 --momentum-flux 0 --name free_convection_8days_2 --animation, and the results of the simulation is weird, with the temperature profile blowing up as seen below:

instantaneous_statistics.mp4

I am using Julia v1.6.1, CUDA v3.2.1, Oceananigans v0.58.0, with the latest version of LESBRARY.jl

@glwagner
Copy link
Member

With a negative buoyancy flux I believe you are heating the surface. I'm not sure why it would blow up though.

@ali-ramadhan
Copy link
Member

ali-ramadhan commented May 26, 2021

Notice that the temperature is on the order of 1.3e6 in a lot of grid points (roughly the sum of 20 [the temperature] * 256^2 [the number of horizontal grid points]) but the simulations seem to continue fine for 8 days.

I think this is an upstream issue in CUDA.jl: JuliaGPU/CUDA.jl#929

@xkykai
Copy link
Collaborator Author

xkykai commented May 26, 2021

There is an example here where I used --buoyancy-flux 3e-8 --momentum-flux 0, something odd is going on with a positive buoyancy flux as well.

instantaneous_statistics.mp4

@ali-ramadhan
Copy link
Member

I can confirm this is still an issue with the latest version of packages 😕

@ali-ramadhan
Copy link
Member

I tried to reproduce the issue in CUDA.jl by trying to average lots of views but no luck.

using Statistics
using CUDA

function average_views(N; arrays=1, val=1)
	as = [val .* ones(N+2, N+2, N+2) |> CuArray for _ in 1:arrays]
	vs = [view(as[i], 2:N+1, 2:N+1, 2:N+1) for i in 1:arrays]
	As = [zeros(1, 1, N+2) |> CuArray for _ in 1:arrays]
	Vs = [view(As[i], 1, 1, 2:N+1) for i in 1:arrays]
	[mean!(Vs[i], vs[i]) for i in 1:arrays]
	return [Array(Vs[i]) for i in 1:arrays]
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants