SciML / SciML/DiffEqGPU.jl

Broadcasting in Kernels

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

upstream
Dominant language
Julia
Stars
327
Forks
42
Avg merge
14h 13m
Merged PRs (30d)
34

Description

using DiffEqGPU, OrdinaryDiffEq
pa = [1.0]
u0 = [3.0]

function f(du,u,p,t)
    du[1] = 1.01 * u[1] * p[1]
end

function f2(du,u,p,t)
    du .= 1.01 .* u .* p
end

prob = ODEProblem(f2, u0, (0.0, 1.0), pa)

function prob_func(prob, i, repeat)
  remake(prob, u0 = 0.5 .+ i/100 .* prob.u0)
end

ensemble_prob = EnsembleProblem(prob, prob_func = prob_func)
sim = solve(ensemble_prob, Tsit5(), EnsembleGPUArray(), saveat = 0.1, trajectories = 100)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the Julia example with EnsembleGPUArray and compare the f and f2 definitions, focusing on the broadcasted operations in f2. Trace how solve handles this kernel path and establish whether the example should run successfully; done means the intended broadcasting behavior is reproducible and verified for the shown ODE problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
hpc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.