@@ -546,15 +546,25 @@ void PDHG_Init_Variables(const cupdlp_int* has_variables, CUPDLPwork *work) {
546546 // XXX: PDLP Does not project x0, so we uncomment for 1-1 comparison
547547
548548 PDHG_Project_Bounds (work , x -> data );
549-
549+ double x_norm ;
550+ cupdlp_twoNorm (work , lp -> nCols , x -> data , & x_norm );
551+ cupdlp_printf ("||x0||_2 = %e\n" , x_norm );
552+
550553 // cupdlp_zero(iterates->y, cupdlp_float, lp->nRows);
551554 if (!* has_variables )
552555 CUPDLP_ZERO_VEC (y -> data , cupdlp_float , lp -> nRows );
553556
554557 // Ax(work, iterates->ax, iterates->x);
555558 // ATyCPU(work, iterates->aty, iterates->y);
556559 Ax (work , ax , x );
560+ double ax_norm ;
561+ cupdlp_twoNorm (work , lp -> nRows , ax -> data , & ax_norm );
562+ cupdlp_printf ("||Ax0||_2 = %e\n" , ax_norm );
563+ work -> debug_pdlp_data_ .ax_norm = ax_norm ;
557564 ATy (work , aty , y );
565+ double aty_norm ;
566+ cupdlp_twoNorm (work , lp -> nCols , aty -> data , & aty_norm );
567+ work -> debug_pdlp_data_ .aty_norm = aty_norm ;
558568
559569 // cupdlp_zero(iterates->xSum, cupdlp_float, lp->nCols);
560570 // cupdlp_zero(iterates->ySum, cupdlp_float, lp->nRows);
@@ -897,6 +907,7 @@ cupdlp_retcode PDHG_Solve(const cupdlp_int* has_variables, CUPDLPwork *pdhg) {
897907
898908 pdhg -> debug_pdlp_log_file_ = fopen ("cuPDLP.log" , "w" );
899909 assert (pdhg -> debug_pdlp_log_file_ );
910+ debugPdlpDataInitialise (& pdhg -> debug_pdlp_data_ );
900911
901912 // PDHG_Init_Data does nothing!
902913 PDHG_Init_Data (pdhg );
@@ -916,9 +927,9 @@ cupdlp_retcode PDHG_Solve(const cupdlp_int* has_variables, CUPDLPwork *pdhg) {
916927 const int iter_log_between_header = 50 ;
917928 int iter_log_since_header = iter_log_between_header ;
918929 debugPdlpIterHeaderLog (pdhg -> debug_pdlp_log_file_ );
919- debugPdlpDataInitialise ( & pdhg -> debug_pdlp_data_ );
930+
920931 for (timers -> nIter = 0 ; timers -> nIter < settings -> nIterLim ; ++ timers -> nIter ) {
921- debugPdlpIterLog (pdhg -> debug_pdlp_log_file_ , timers -> nIter , & pdhg -> debug_pdlp_data_ , pdhg -> stepsize -> dBeta );
932+ debugPdlpIterLog (pdhg -> debug_pdlp_log_file_ , timers -> nIter , & pdhg -> debug_pdlp_data_ , pdhg -> stepsize -> dBeta , pdhg -> stepsize -> dPrimalStep , pdhg -> stepsize -> dDualStep );
922933 PDHG_Compute_SolvingTime (pdhg );
923934#if CUPDLP_DUMP_ITERATES_STATS && CUPDLP_DEBUG
924935 PDHG_Dump_Stats (pdhg );
@@ -1041,6 +1052,17 @@ cupdlp_retcode PDHG_Solve(const cupdlp_int* has_variables, CUPDLPwork *pdhg) {
10411052 PDHG_Restart_Iterate (pdhg );
10421053 }
10431054
1055+ CUPDLPvec * ax = iterates -> ax [timers -> nIter % 2 ];
1056+ CUPDLPvec * aty = iterates -> aty [timers -> nIter % 2 ];
1057+ double debug_pdlp_data_ax_norm = 0.0 ;
1058+ cupdlp_twoNorm (pdhg , problem -> nRows , ax -> data ,
1059+ & debug_pdlp_data_ax_norm );
1060+ pdhg -> debug_pdlp_data_ .ax_norm = debug_pdlp_data_ax_norm ;
1061+ double debug_pdlp_data_aty_norm = 0.0 ;
1062+ cupdlp_twoNorm (pdhg , problem -> nCols , aty -> data , & debug_pdlp_data_aty_norm );
1063+ pdhg -> debug_pdlp_data_ .aty_norm = debug_pdlp_data_aty_norm ;
1064+
1065+
10441066 // CUPDLP_CALL(PDHG_Update_Iterate(pdhg));
10451067 if (PDHG_Update_Iterate (pdhg ) == RETCODE_FAILED ) {
10461068 // cupdlp_printf("Time limit reached.\n");
0 commit comments