Skip to content

Commit

Permalink
Remove KA.GPU (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
michel2323 authored Nov 10, 2022
1 parent ac43fc6 commit f9a9c5a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ExaTron"
uuid = "28b18bf8-76f9-41ea-81fa-0f922810b349"
authors = ["Youngdae Kim <youngdae@anl.gov>", "François Pacaud <fpacaud@anl.gov>", "Kibaek Kim <kimk@anl.gov>", "Michel Schanen <mschanen@anl.gov>"]
version = "2.1.1"
version = "2.1.2"

[deps]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Expand Down
5 changes: 2 additions & 3 deletions examples/admm/acopf_admm_gpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,10 @@ function admm_solve!(env::AdmmEnv, sol::SolutionOneLevel; iterlim=800, scale=1e-

if par.verbose > 0
rateA_nviols, rateA_maxviol, rateC_nviols, rateC_maxviol = check_linelimit_violation(data, u_curr)
if isa(env.device, KA.GPU)
@printf("[GPU] %10d %.6e %.6e %.6e %.6e\n", it, gpu_primres, gpu_dualres, gpu_eps_pri, gpu_eps_dual)
end
if isa(env.device, KA.CPU)
@printf("[CPU] %10d %.6e %.6e %.6e %.6e %6.2f %6.2f\n", it, primres, dualres, eps_pri, eps_dual, auglag_it, tron_it)
else
@printf("[GPU] %10d %.6e %.6e %.6e %.6e\n", it, gpu_primres, gpu_dualres, gpu_eps_pri, gpu_eps_dual)
end
status = sol.status == HAS_CONVERGED ? "converged" : "not converged"
@printf(" ** Line limit violations\n")
Expand Down
2 changes: 1 addition & 1 deletion examples/admm/generator_kernel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end
function generator_kernel(
gen_mod::GeneratorModel,
baseMVA::Float64, u, v, l, rho,
device::KA.GPU
device
)
nblk = div(gen_mod.ngen, 32, RoundUp)
nblk
Expand Down
2 changes: 1 addition & 1 deletion examples/admm/opfdata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ function computeAdmitances(lines, buses, baseMVA, device; VI=Array{Int}, VD=Arra
@assert 0==length(findall(isnan.(YshR)))+length(findall(isinf.(YshR)))
@assert 0==length(findall(isnan.(YshI)))+length(findall(isinf.(YshI)))

if isa(device, KA.GPU)
if !isa(device, KA.CPU)
return copyto!(VD(undef, nlines), 1, YffR, 1, nlines),
copyto!(VD(undef, nlines), 1, YffI, 1, nlines),
copyto!(VD(undef, nlines), 1, YttR, 1, nlines),
Expand Down

0 comments on commit f9a9c5a

Please sign in to comment.