Skip to content

Commit

Permalink
update in BBBB for sparse B
Browse files Browse the repository at this point in the history
  • Loading branch information
kocvara committed Aug 8, 2024
1 parent a2bea33 commit c177b45
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/solve_sdpa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ model=read_sdpa("examples/data/theta1.dat-s")
# model=read_from_file("examples/data/theta1.dat-s")
# model=read_from_file("examples/data/maxG11.dat-s") #use with "datarank = -1"

# set_optimizer(model, Loraine.Optimizer{Float64})
set_optimizer(model, Loraine.Optimizer{Float64x2})
set_optimizer(model, Loraine.Optimizer{Float64})
# set_optimizer(model, Loraine.Optimizer{Float64x2})

# Loraine options

Expand Down
2 changes: 1 addition & 1 deletion src/Solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function load(model, options::Dict; T = Float64)

if verb > 0
t1 = time()
@printf("\n *** Loraine.jl v0.2.3 ***\n")
@printf("\n *** Loraine.jl v0.2.4 ***\n")
@printf(" *** Initialisation STARTS\n")
end

Expand Down
11 changes: 7 additions & 4 deletions src/makeBBBB.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ function makeBBBBsi(ilmi,Ailmi,AAilmi,myA,Wilmi::Matrix{T},n,to,qA,sigmaA) where
# tmp1 = zeros(Float64,size(Wilmi, 2), size(Ailmi[1], 1))
tmp = zeros(T,size(Wilmi, 2), size(Ailmi[1], 1))
i = sigmaA[ii,ilmi]
# if ii <= qA[1]
if 1==1
# @show "one"
if ii <= qA[1]
# if 1==0
# @show "one"
# @show ii
@timeit to "BBBBone" begin
@timeit to "BBBBone1" begin
Expand Down Expand Up @@ -98,6 +98,7 @@ function makeBBBBsi(ilmi,Ailmi,AAilmi,myA,Wilmi::Matrix{T},n,to,qA,sigmaA) where
end
# elseif ii <= qA[2]
elseif 1==0
# @show "two"
@timeit to "BBBBtwo" begin
mul!(tmp1,Ailmi[i+1],Wilmi)
@inbounds for jj = ii:n
Expand Down Expand Up @@ -162,12 +163,14 @@ function makeBBBBsi(ilmi,Ailmi,AAilmi,myA,Wilmi::Matrix{T},n,to,qA,sigmaA) where
@timeit to "BBBBthree" begin
# @show "three"
# @show ii

if ~isempty(myA[ilmi1+i].iind)
myAiii = myA[ilmi1+i]
iii_i = myAiii.iind
jjj_i = myAiii.jind
vvv_i = myAiii.nzval
@inbounds for jj = ii:n
# @inbounds for jj = ii:n
@inbounds for jj = 1:n
j = sigmaA[jj,ilmi]
if ~isempty(myA[ilmi1+j].iind)
myAjjj = myA[ilmi1+j]
Expand Down
2 changes: 1 addition & 1 deletion src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function prep_sparse!(A,n,i,nzA,sigmaA,qA)
d2 = zeros(Float64,n)
d3 = zeros(Float64,n)

kappa = 900.
kappa = 100.
for j = 1:n
nzA[j,i] = nnz(A[i,j+1])
end
Expand Down

2 comments on commit c177b45

@kocvara
Copy link
Owner Author

@kocvara kocvara commented on c177b45 Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Version 0.2.3 already exists

Please sign in to comment.