Skip to content

Commit

Permalink
adapt to API changes and compat with MPIFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
tknopp committed Feb 10, 2024
1 parent 0357461 commit 7097103
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/Background.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/LeastSquares.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/SystemMatrix/SMExtrapolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/SystemMatrix/SystemMatrixRecovery.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/TemporalRegularization/TemporalRegularization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7097103

Please sign in to comment.