Skip to content

Commit 8715e86

Browse files
committed
Small bugs
1 parent 3a3014a commit 8715e86

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

highs/ipm/hipo/factorhighs/Analyse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ Int Analyse::getPermutation() {
111111
// fix seed of rng inside Metis, to make it deterministic (?)
112112
options[METIS_OPTION_SEED] = 42;
113113

114-
if (log_) log_->printDevInfo("Metis...");
114+
if (log_) log_->printDevInfo("Metis...\n");
115115

116116
Int status = METIS_NodeND(&n_, temp_ptr.data(), temp_rows.data(), NULL,
117117
options, perm_.data(), iperm_.data());
118118

119-
if (log_) log_->printDevInfo("done\n");
119+
if (log_) log_->printDevInfo("...done\n");
120120
if (status != METIS_OK) {
121121
if (log_) log_->printDevInfo("Error with Metis\n");
122122
return kRetMetisError;

highs/ipm/hipo/factorhighs/Symbolic.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ void Symbolic::print(const Log& log, bool verbose) const {
8787
log_stream << textline("Sn size <= 10:") << integer(sn_size_10_, 0) << '\n';
8888
log_stream << textline("Sn size <= 100:") << integer(sn_size_100_, 0)
8989
<< '\n';
90-
log_stream << textline("Sn avg size:") << sci(n_, 0, 1) << '\n';
90+
log_stream << textline("Sn avg size:") << sci((double)n_ / sn_, 0, 1)
91+
<< '\n';
9192
}
9293

9394
log_stream << '\n';

highs/ipm/hipo/ipm/FactorHiGHSSolver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,9 @@ Int FactorHiGHSSolver::chooseNla() {
480480
} else {
481481
// If NE has more nonzeros than the factor of AS, then it's likely that AS
482482
// will be preferred, so stop computation of NE.
483-
const int64_t NE_nz_limit = failure_AS ? std::numeric_limits<Int>::max()
484-
: symb_AS.nz() * kSymbNzMult;
483+
int64_t NE_nz_limit = symb_AS.nz() * kSymbNzMult;
484+
if (failure_AS || NE_nz_limit > std::numeric_limits<Int>::max())
485+
NE_nz_limit = std::numeric_limits<Int>::max();
485486

486487
Int NE_status = analyseNE(symb_NE, NE_nz_limit);
487488
if (NE_status) failure_NE = true;

0 commit comments

Comments
 (0)