Skip to content

Commit

Permalink
[ci] fix tests on GPU
Browse files Browse the repository at this point in the history
* remove testing of jtprod on GPU before and wait for a valid
  implementation on the GPU
  • Loading branch information
frapac committed Mar 2, 2021
1 parent 2aaf344 commit d8b8b05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/Polar/Constraints/active_power.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ function adjoint!(

ybus_re, ybus_im = get(polar.topology, PS.BusAdmittanceMatrix())
# Constraint on P_ref (generator) (P_inj = P_g - P_load)
# fill!(adj_pg, 0.0) # TODO
# adj_pg[ref_to_gen] .= 1.0
for i in 1:nref
ibus = index_ref[i]
igen = ref_to_gen[i]
Expand Down
16 changes: 8 additions & 8 deletions test/Evaluators/reduced_evaluator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@
fill!(cons, 0)
ExaPF.constraint!(nlp, cons, u)

## Evaluation of the transpose-Jacobian product
v = similar(cons) ; fill!(v, 0)
fill!(g, 0)
ExaPF.jtprod!(nlp, g, u, v)
# @test iszero(g)
fill!(v, 1) ; fill!(g, 0)
ExaPF.jtprod!(nlp, g, u, v)

## Evaluation of the Jacobian (only on CPU)
if isa(device, CPU)
## Evaluation of the transpose-Jacobian product
v = similar(cons) ; fill!(v, 0)
fill!(g, 0)
ExaPF.jtprod!(nlp, g, u, v)
@test iszero(g)
fill!(v, 1) ; fill!(g, 0)
ExaPF.jtprod!(nlp, g, u, v)

jac = M{Float64, 2}(undef, m, n)
ExaPF.jacobian!(nlp, jac, u)
# Test transpose Jacobian vector product
Expand Down

0 comments on commit d8b8b05

Please sign in to comment.