Skip to content

Commit fbc2e18

Browse files
authored
fix warmstart bug (#52)
1 parent dcd7281 commit fbc2e18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/solver.cu

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ initialize_solver_state(const lp_problem_t *original_problem,
310310
rescale_info->con_bound_rescale;
311311
CUDA_CHECK(cudaMemcpy(state->initial_primal_solution, rescaled, var_bytes,
312312
cudaMemcpyHostToDevice));
313+
CUDA_CHECK(cudaMemcpy(state->current_primal_solution, rescaled, var_bytes,
314+
cudaMemcpyHostToDevice));
315+
CUDA_CHECK(cudaMemcpy(state->pdhg_primal_solution, rescaled, var_bytes,
316+
cudaMemcpyHostToDevice));
313317
free(rescaled);
314318
}
315319
if (original_problem->dual_start)
@@ -321,6 +325,10 @@ initialize_solver_state(const lp_problem_t *original_problem,
321325
rescale_info->obj_vec_rescale;
322326
CUDA_CHECK(cudaMemcpy(state->initial_dual_solution, rescaled, con_bytes,
323327
cudaMemcpyHostToDevice));
328+
CUDA_CHECK(cudaMemcpy(state->current_dual_solution, rescaled, con_bytes,
329+
cudaMemcpyHostToDevice));
330+
CUDA_CHECK(cudaMemcpy(state->pdhg_dual_solution, rescaled, con_bytes,
331+
cudaMemcpyHostToDevice));
324332
free(rescaled);
325333
}
326334

0 commit comments

Comments
 (0)