Skip to content

Commit c2d19d3

Browse files
NVTX annotate some functions
1 parent 21c38f9 commit c2d19d3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/integrators.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function DiffEqBase.__solve(prob::DiffEqBase.AbstractODEProblem, alg::Distribute
159159
end
160160

161161
# either called directly (after init), or by DiffEqBase.solve (via __solve)
162-
function DiffEqBase.solve!(integrator::DistributedODEIntegrator)
162+
NVTX.@annotate function DiffEqBase.solve!(integrator::DistributedODEIntegrator)
163163
while !isempty(integrator.tstops) && integrator.step != integrator.stepstop
164164
__step!(integrator)
165165
end
@@ -230,7 +230,9 @@ function __step!(integrator)
230230
end
231231

232232
# solvers need to define this interface
233-
step_u!(integrator) = step_u!(integrator, integrator.cache)
233+
NVTX.@annotate function step_u!(integrator)
234+
step_u!(integrator, integrator.cache)
235+
end
234236

235237
DiffEqBase.get_dt(integrator::DistributedODEIntegrator) = integrator._dt
236238
function set_dt!(integrator::DistributedODEIntegrator, dt)

src/nl_solvers/newtons_method.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ function allocate_cache(alg::KrylovMethod, x_prototype)
428428
)
429429
end
430430

431-
function solve_krylov!(alg::KrylovMethod, cache, Δx, x, f!, f, n, post_implicit!, j = nothing)
431+
NVTX.@annotate function solve_krylov!(alg::KrylovMethod, cache, Δx, x, f!, f, n, post_implicit!, j = nothing)
432432
(; jacobian_free_jvp, forcing_term, solve_kwargs) = alg
433433
(; disable_preconditioner, debugger) = alg
434434
type = solver_type(alg)
@@ -577,7 +577,7 @@ solve_newton!(
577577
post_implicit_last! = nothing,
578578
) = nothing
579579

580-
function solve_newton!(
580+
NVTX.@annotate function solve_newton!(
581581
alg::NewtonsMethod,
582582
cache,
583583
x,

0 commit comments

Comments
 (0)