From f703cd4403bc47f397cf0d08f9524b6c945aea97 Mon Sep 17 00:00:00 2001 From: Michel Schanen <mschanen@anl.gov> Date: Mon, 15 May 2023 10:34:14 -0400 Subject: [PATCH] Latest deps --- main.jl | 15 ++++++++++++++- src/Milepost7.jl | 15 +-------------- test/runtests.jl | 16 +++++++++------- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/main.jl b/main.jl index c84bccd..d99e5bf 100644 --- a/main.jl +++ b/main.jl @@ -1,8 +1,21 @@ +using AMDGPU using Milepost7 using MPI +using Logging + MPI.Init() +if MPI.Comm_rank(MPI.COMM_WORLD) != 0 + disable_logging(Info) + disable_logging(Warn) +else + if AMDGPU.has_rocm_gpu() + @show AMDGPU.libhsaruntime_path + @show AMDGPU.use_artifacts + end +end + if !isinteractive() args = parse_cmd() profile = args["profile"] @@ -41,4 +54,4 @@ info = milepost7( proxal_iter=proxal_iter, exatron_inner_iter=exatron_inner_iter, exatron_outer_iter=exatron_outer_iter -); \ No newline at end of file +); diff --git a/src/Milepost7.jl b/src/Milepost7.jl index 3bbebf2..eddc8fe 100644 --- a/src/Milepost7.jl +++ b/src/Milepost7.jl @@ -18,20 +18,6 @@ using ProxAL export milepost7, parse_cmd -function ProxAL.ExaAdmm.KAArray{T}(n::Int, device::CUDABackend) where {T} - return CuArray{T}(undef, n) -end -function ProxAL.ExaAdmm.KAArray{T}(n1::Int, n2::Int, device::CUDABackend) where {T} - return CuArray{T}(undef, n1, n2) -end - -function ProxAL.ExaAdmm.KAArray{T}(n::Int, device::ROCBackend) where {T} - return ROCArray{T}(undef, n) -end -function ProxAL.ExaAdmm.KAArray{T}(n1::Int, n2::Int, device::ROCBackend) where {T} - return ROCArray{T}(undef, n1, n2) -end - function milepost7( case::String, demandfiles::String, @@ -74,6 +60,7 @@ algparams.verbose = 1 algparams.tol = 1e-3 algparams.decompCtgs = (K > 0) algparams.iterlim = proxal_iter +algparams.verbose_inner = 0 # choose backend if configuration == 1 diff --git a/test/runtests.jl b/test/runtests.jl index ed87539..ada9879 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -40,14 +40,16 @@ MPI.Init() maxviol_c_actual = info.maxviol_c_actual[end] maxviol_d = info.maxviol_d[end] end - @testset "Testing on CUDA" begin - info = milepost7(case, load, T, K, 3; profile=false, rhopq=rhopq, rhova=rhova, proxal_iter=proxal_iter) + if CUDA.has_cuda_gpu() + @testset "Testing on CUDA" begin + info = milepost7(case, load, T, K, 3; profile=false, rhopq=rhopq, rhova=rhova, proxal_iter=proxal_iter) - @test isapprox(info.maxviol_t[end], maxviol_t) - @test isapprox(info.maxviol_t_actual[end], maxviol_t_actual) - @test isapprox(info.maxviol_c[end], maxviol_c) - @test isapprox(info.maxviol_c_actual[end], maxviol_c_actual) - @test isapprox(info.maxviol_d[end], maxviol_d) + @test isapprox(info.maxviol_t[end], maxviol_t) + @test isapprox(info.maxviol_t_actual[end], maxviol_t_actual) + @test isapprox(info.maxviol_c[end], maxviol_c) + @test isapprox(info.maxviol_c_actual[end], maxviol_c_actual) + @test isapprox(info.maxviol_d[end], maxviol_d) + end end @testset "Testing on KA" begin info = milepost7(case, load, T, K, 4; profile=false, rhopq=rhopq, rhova=rhova, proxal_iter=proxal_iter)