Skip to content

Commit 85eb3c0

Browse files
committed
remove calls to cerr
1 parent d6bf10d commit 85eb3c0

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

RELEASES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
- Fixed an issue where we could not ask TorchBackend to place a random tensor on GPU
1212
(Issue #371, PR #373)
13+
- Fixed an issue where hitting iteration limits would be reported to stderr by std:cerr regardless of Python's stderr stream status.
14+
1315

1416
## 0.8.2
1517

ot/lp/network_simplex_simple.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,9 +1432,7 @@ namespace lemon {
14321432
// Execute the Network Simplex algorithm
14331433
while (pivot.findEnteringArc()) {
14341434
if(max_iter > 0 && ++iter_number>=max_iter&&max_iter>0){
1435-
char errMess[1000];
1436-
sprintf( errMess, "RESULT MIGHT BE INACURATE\nMax number of iteration reached, currently \%d. Sometimes iterations go on in cycle even though the solution has been reached, to check if it's the case here have a look at the minimal reduced cost. If it is very close to machine precision, you might actually have the correct solution, if not try setting the maximum number of iterations a bit higher\n",iter_number );
1437-
std::cerr << errMess;
1435+
// max iterations hit
14381436
retVal = MAX_ITER_REACHED;
14391437
break;
14401438
}

ot/lp/network_simplex_simple_omp.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,9 +1610,7 @@ namespace lemon_omp {
16101610

16111611

16121612
} else {
1613-
char errMess[1000];
1614-
sprintf( errMess, "RESULT MIGHT BE INACURATE\nMax number of iteration reached, currently \%d. Sometimes iterations go on in cycle even though the solution has been reached, to check if it's the case here have a look at the minimal reduced cost. If it is very close to machine precision, you might actually have the correct solution, if not try setting the maximum number of iterations a bit higher\n",iter_number );
1615-
std::cerr << errMess;
1613+
// max iters
16161614
retVal = MAX_ITER_REACHED;
16171615
break;
16181616
}

0 commit comments

Comments
 (0)