Skip to content

Commit

Permalink
remove calls to cerr (#377)
Browse files Browse the repository at this point in the history
typo in releases
  • Loading branch information
stanleyjs authored May 13, 2022
1 parent d6bf10d commit b001d7a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

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


## 0.8.2

Expand Down
4 changes: 1 addition & 3 deletions ot/lp/network_simplex_simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -1432,9 +1432,7 @@ namespace lemon {
// Execute the Network Simplex algorithm
while (pivot.findEnteringArc()) {
if(max_iter > 0 && ++iter_number>=max_iter&&max_iter>0){
char errMess[1000];
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 );
std::cerr << errMess;
// max iterations hit
retVal = MAX_ITER_REACHED;
break;
}
Expand Down
4 changes: 1 addition & 3 deletions ot/lp/network_simplex_simple_omp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1610,9 +1610,7 @@ namespace lemon_omp {


} else {
char errMess[1000];
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 );
std::cerr << errMess;
// max iters
retVal = MAX_ITER_REACHED;
break;
}
Expand Down

0 comments on commit b001d7a

Please sign in to comment.