diff --git a/Project.toml b/Project.toml index a052c41..d15366a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ExaTron" uuid = "28b18bf8-76f9-41ea-81fa-0f922810b349" authors = ["Youngdae Kim ", "François Pacaud ", "Kibaek Kim ", "Michel Schanen "] -version = "2.1.1" +version = "2.1.2" [deps] DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" diff --git a/examples/admm/acopf_admm_gpu.jl b/examples/admm/acopf_admm_gpu.jl index e09b93a..d157e80 100644 --- a/examples/admm/acopf_admm_gpu.jl +++ b/examples/admm/acopf_admm_gpu.jl @@ -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") diff --git a/examples/admm/generator_kernel.jl b/examples/admm/generator_kernel.jl index 2c6c7f3..ddb2178 100644 --- a/examples/admm/generator_kernel.jl +++ b/examples/admm/generator_kernel.jl @@ -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 diff --git a/examples/admm/opfdata.jl b/examples/admm/opfdata.jl index 9168cdf..740f4c0 100644 --- a/examples/admm/opfdata.jl +++ b/examples/admm/opfdata.jl @@ -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),