Coder Social home page Coder Social logo

Comments (5)

glwagner avatar glwagner commented on June 12, 2024

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.

navidcy avatar navidcy commented on June 12, 2024

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.

navidcy avatar navidcy commented on June 12, 2024

I'm guessing that this is related to issue FourierFlows/FourierFlows.jl#128

from geophysicalflows.jl.

glwagner avatar glwagner commented on June 12, 2024

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.

navidcy avatar navidcy commented on June 12, 2024

Resolved by FourierFlows/FourierFlows.jl#165

from geophysicalflows.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.