Skip to content

Commit a0c032d

Browse files
committed
Update BatchPDLP Benchmarking.jl
Re-adjust location of struct creation in benchmarking script
1 parent 0e95642 commit a0c032d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

benchmarks/BatchPDLP Benchmarking.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ function run_example(example::LoadedProblem, n_LPs::Int, n_cuts::Int; run_GLPK::
163163
CUDA.@sync example.eq_cons[i](eq_result_storage[i], [input_storage[j] for j=1:example.nvars]...)
164164
end
165165

166+
# Feed in data to the PDLPData struct
167+
PDLP_data = PDLPData(n_LPs, example.nvars+1, 1+n_cuts*cut_height, sparsity=sparsity, iteration_limit=1000000)
168+
166169
# Since the PDLP_GPU struct already has an allocated field for PDLP data, we
167170
# only need to update that field with the new LP to solve. The main PDLP
168171
# algorithm already resets all fields except for the original LP, so to prepare
@@ -320,9 +323,6 @@ function run_example(example::LoadedProblem, n_LPs::Int, n_cuts::Int; run_GLPK::
320323
PDLP_95pct_2xGPU_iterations_array = zeros(Int64, n_LPs)
321324

322325
# Run BatchPDLP with 2xGPU if selected
323-
324-
# Feed in data to the PDLPData struct
325-
PDLP_data = PDLPData(n_LPs, example.nvars+1, 1+n_cuts*cut_height, sparsity=sparsity, iteration_limit=1000000)
326326
if run_2xGPU
327327
# Make two more PDLPData structs for the 2-GPU setup
328328
device!(0)

0 commit comments

Comments
 (0)