Comments (5)
I bet its the functions energy
and enstrophy
that are the issue, rather than diagnostics.jl
in FourierFlows. We can test this by using a trivial diagnostic, say, trivial(prob) = 1
, and see if we observe the same slow down on the GPU. Since trivial(prob) = 1
does not involve GPU computation, I'd guess that its probably not diagnostics.jl
.
from geophysicalflows.jl.
I did that:
we time-step without diagnostics
step: 0400, t: 1, walltime: 5.29 sec
step: 0800, t: 2, walltime: 6.27 sec
step: 1200, t: 2, walltime: 9.57 sec
step: 1600, t: 3, walltime: 10.48 sec
step: 2000, t: 4, walltime: 11.32 sec
re-initialize and run again with trivial diagnostic
step: 0400, t: 1, walltime: 0.92 sec
step: 0800, t: 2, walltime: 1.73 sec
step: 1200, t: 2, walltime: 2.54 sec
step: 1600, t: 3, walltime: 3.37 sec
step: 2000, t: 4, walltime: 4.18 sec
re-initialize and run again with energy diagnostic
step: 0400, t: 1, walltime: 1.16 sec
step: 0800, t: 2, walltime: 2.27 sec
step: 1200, t: 2, walltime: 3.37 sec
step: 1600, t: 3, walltime: 4.47 sec
step: 2000, t: 4, walltime: 5.58 sec
and last re-initialize and run again with enstrophy diagnostic
step: 0400, t: 1, walltime: 129.00 sec
step: 0800, t: 2, walltime: 258.86 sec
...
energy
is OK but enstrophy
leads to slowdown.
I guess this points towards parsevalsum2()
vs parsevalsum()
? Do you have any educated guess? Is it @views
you reckon?
from geophysicalflows.jl.
I'm guessing that this is related to issue FourierFlows/FourierFlows.jl#128
from geophysicalflows.jl.
Oh. I thought the issue was non-contiguous memory, but since parsevalsum
is fine, I guess that means its something else.
An easy solution is just to use parsevalsum
in enstrophy
.
parsevalsum2
is more of a convenience function than necessary. You could try removing @views
(I don't see why theres an @views
there but not on parsevalsum
). The problem may be the abs2
element-wise command, however.
from geophysicalflows.jl.
Resolved by FourierFlows/FourierFlows.jl#165
from geophysicalflows.jl.
Related Issues (20)
- Add remark on multithreading/multiple GPU limitations that FourierFlows.jl imposes HOT 4
- Add Installation Instructions section in Docs
- Use CUDA.randn(nx, ny) instead of cu(randn(nx, ny)) HOT 4
- `MultiLayerQG` tests fail on Julia v1.6
- 3D Navier-Stokes HOT 1
- Better docstring for module `Problem` constructors
- Avoid scalar operations every time-step
- Should we enforce dealiasing before any calculation of nonlinear terms? HOT 7
- No need to import `FFTW` in examples
- `Plots` no longer accepts functions as `clims` HOT 7
- MultilayerQG example crashed at about 35000 steps HOT 7
- Optimized PV inversion for two layer case in `MultilayerQG` HOT 4
- Demonstrate save/load output functionality in an example
- Convert diagnostics output for `MultiLayerQG` from Arrays to Tuples? HOT 1
- م
- Potential missing factor in `MultiLayerQG.energies` HOT 1
- construct a random field with prescribed spectral slope HOT 2
- enstrophy and cuda problem HOT 7
- Should we be passing `forcing_spectrum` as argument into `calcF!`? HOT 2
- Option to specify PV gradients explicitly rather than computing them spectrally HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geophysicalflows.jl.