@@ -628,6 +628,7 @@ if (DEBUG_MODE){
628628 }
629629
630630 CUDA_CHECK (cudaGraphLaunch (graphExec, gpu_stream_));
631+ CUDA_CHECK (cudaStreamSynchronize (gpu_stream_));
631632#else
632633 for (int i = 2 ; i <= PDHG_CHECK_INTERVAL - 1 ; i++) {
633634 performHalpernPdhgStep (false , i);
@@ -740,7 +741,7 @@ double PDLPSolver::computeFixedPointError() {
740741 }
741742
742743 double movement =
743- primal_norm_sq * params_. omega + dual_norm_sq / params_. omega ;
744+ primal_norm_sq * primal_weight_ + dual_norm_sq / primal_weight_ ;
744745 double interaction = 2.0 * params_.eta * cross_term;
745746
746747 return std::sqrt (std::max (0.0 , movement + interaction));
@@ -1959,18 +1960,11 @@ void AdaptiveLinesearchParams::initialise() {
19591960// =============================================================================
19601961
19611962void PDLPSolver::initializeStepSizes () {
1962- double cost_norm_sq = linalg::vectorNormSquared (lp_.col_cost_ );
1963- double rhs_norm_sq = linalg::vectorNormSquared (lp_.row_lower_ );
1964-
1965- if (std::min (cost_norm_sq, rhs_norm_sq) > 1e-6 ) {
1966- stepsize_.beta = cost_norm_sq / rhs_norm_sq;
1967- } else {
1968- stepsize_.beta = 1.0 ;
1969- }
1970-
1971- // Match initial primal weight calculation from cuPDLPx
1972- params_.omega = (unscaled_c_norm_ + 1.0 ) / (unscaled_rhs_norm_ + 1.0 );
1973- primal_weight_ = params_.omega ;
1963+ primal_weight_ = 1.0 ;
1964+ best_primal_weight_ = primal_weight_;
1965+ stepsize_.beta = primal_weight_ * primal_weight_;
1966+ params_.omega = primal_weight_;
1967+
19741968
19751969 if (params_.step_size_strategy != StepSizeStrategy::FIXED &&
19761970 params_.step_size_strategy != StepSizeStrategy::PID) {
@@ -2075,6 +2069,13 @@ void PDLPSolver::updatePrimalWeightAtRestart(const SolverResults& results) {
20752069 stepsize_.dual_step = eta * primal_weight_;
20762070 params_.omega = primal_weight_;
20772071 restart_scheme_.updateBeta (stepsize_.beta );
2072+
2073+ // === POST-RESTART DEBUG OUTPUT ===
2074+ printf (" [restart][post] iter=%d primal_weight=%.6e step_size=%.6e "
2075+ " primal_step=%.6e dual_step=%.6e\n " ,
2076+ final_iter_count_,
2077+ primal_weight_, 1.0 ,
2078+ stepsize_.primal_step , stepsize_.dual_step );
20782079}
20792080
20802081std::vector<double > PDLPSolver::updateX (const std::vector<double >& x,
0 commit comments