Skip to content

Commit 70b3734

Browse files
committed
Merge remote-tracking branch 'origin/v91-bugfix' into v9-minor
2 parents 4c2e97b + 8f8864d commit 70b3734

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/src/lpi/solve.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,13 @@ SCIP_RETCODE checkData(
458458
cr_assert_float_eq(lpiobj[j], obj[j], EPS, "Violation of objective coefficient %d: %g != %g\n", j, lpiobj[j], obj[j]);
459459

460460
cr_assert( lpibeg[j] == beg[j] );
461+
462+
/* LP-solvers sometimes permute the nonzero entries per column (e.g., XPRESS with barrier) - we therefore sort them */
463+
if ( j < ncols - 1 )
464+
i = lpibeg[j+1] - lpibeg[j];
465+
else
466+
i = lpinnonz2 - lpibeg[j];
467+
SCIPsortIntReal(&lpiind[lpibeg[j]], &lpival[lpibeg[j]], i);
461468
}
462469

463470
/* compare matrix */

0 commit comments

Comments
 (0)