From 7097103452db37e7efc1e8ef802a7162026d7ba9 Mon Sep 17 00:00:00 2001 From: Tobias Knopp Date: Sat, 10 Feb 2024 08:16:16 +0100 Subject: [PATCH] adapt to API changes and compat with MPIFiles --- Project.toml | 2 +- src/Background.jl | 2 +- src/LeastSquares.jl | 4 ++-- src/SystemMatrix/SMExtrapolation.jl | 2 +- src/SystemMatrix/SystemMatrixRecovery.jl | 2 +- src/TemporalRegularization/TemporalRegularization.jl | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 279161a..c3d99d1 100644 --- a/Project.toml +++ b/Project.toml @@ -34,7 +34,7 @@ IniFile = "0.5" LinearAlgebra = "1" LinearOperators = "2.3.3" LinearOperatorCollection = "1.0" -MPIFiles = "0.13, 0.14" +MPIFiles = "0.13, 0.14, 0.15" ProgressMeter = "1.2" Reexport = "1.0" RegularizedLeastSquares = "0.13" diff --git a/src/Background.jl b/src/Background.jl index ff09606..6e9ee93 100644 --- a/src/Background.jl +++ b/src/Background.jl @@ -190,7 +190,7 @@ function reconstruction(S, u::Array, bgDict::AbstractMatrix; isnothing(progress) ? p = Progress(L, dt=1, desc="Reconstructing data...") : p = progress for l=1:L - y = solve(solv, u[:,l]) + y = solve!(solv, u[:,l]) d = y[1:N,:] ./ sqrt(λ) if !isnothing(backgroundCoefficients) diff --git a/src/LeastSquares.jl b/src/LeastSquares.jl index 19233f8..1ad1dee 100644 --- a/src/LeastSquares.jl +++ b/src/LeastSquares.jl @@ -42,7 +42,7 @@ function process(t::Type{<:AbstractMPIRecoAlgorithm}, params::LeastSquaresParame solv = createLinearSolver(params.solver, params.S; args..., weights = params.weights) for l=1:L - d = solve(solv, u[:, l]) + d = solve!(solv, u[:, l]) if !isnothing(params.op) d[:] = params.op*d end @@ -102,7 +102,7 @@ function process(t::Type{<:AbstractMPIRecoAlgorithm}, params::LeastSquaresParame function threadSolve(solver, frames) for frame in frames - d = solve(solver, u[:, frame]) + d = solve!(solver, u[:, frame]) if !isnothing(params.op) d[:] = params.op*d end diff --git a/src/SystemMatrix/SMExtrapolation.jl b/src/SystemMatrix/SMExtrapolation.jl index e1da927..8bc45a0 100644 --- a/src/SystemMatrix/SMExtrapolation.jl +++ b/src/SystemMatrix/SMExtrapolation.jl @@ -160,7 +160,7 @@ function fillmissing(A::Array; method::Integer=1) B = copy(A) # alternative IterativeSolvers.lsmr # B[i_unknown] .= lsmr(Δ[iwork, i_unknown], rhs; maxiter=500) - B[lidx_unknown] .= solve(solver,convert.(Float64,rhs)) + B[lidx_unknown] .= solve!(solver,convert.(Float64,rhs)) return B end diff --git a/src/SystemMatrix/SystemMatrixRecovery.jl b/src/SystemMatrix/SystemMatrixRecovery.jl index 374cae4..1f14673 100644 --- a/src/SystemMatrix/SystemMatrixRecovery.jl +++ b/src/SystemMatrix/SystemMatrixRecovery.jl @@ -51,7 +51,7 @@ function smRecovery(y::Matrix{T}, samplingIdx::Array{Int64}, params::Dict) where sfMat = zeros(ComplexF64,prod(shape),size(y,2)) @time Threads.@threads for k=1:size(y,2) t = Threads.threadid() - sfMat[:,k] .= solve(solver[t], y2[k]) + sfMat[:,k] .= solve!(solver[t], y2[k]) # undo normalization sfMat[:,k] *= y_norm[k] end diff --git a/src/TemporalRegularization/TemporalRegularization.jl b/src/TemporalRegularization/TemporalRegularization.jl index 87233ba..7e2c7e2 100644 --- a/src/TemporalRegularization/TemporalRegularization.jl +++ b/src/TemporalRegularization/TemporalRegularization.jl @@ -104,7 +104,7 @@ function reconstructionTempReg(Op::TemporalRegularizationOperator, u::Array; @info "SIZES" size(Op) size(u) size(reshape(u,:,1)) - y = solve(solv, vec(u)) + y = solve!(solv, vec(u)) c = real.( reshape(y[1:(NSub*J),:],NSub,J) ./ sqrt(λ) ) #if backgroundCoefficients != nothing