Skip to content

Commit 387dd37

Browse files
committed
Change name metis to ordering
1 parent d24b699 commit 387dd37

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

highs/ipm/hipo/auxiliary/IntConfig.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ typedef HighsInt Int;
1313
typedef int64_t Int64;
1414

1515
// The matrix (AS or NE) is formed using Int, so it must have fewer than
16-
// kHighsIInf nonzero entries. Metis works with the same type as Int, so it must
17-
// be compiled accordingly.
16+
// kHighsIInf nonzero entries.
1817
//
1918
// The factorisation uses a combination of Int and Int64. Int64 is used only
2019
// where needed, i.e. when dealing with nonzeros of the factor or when checking

highs/ipm/hipo/factorhighs/Analyse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ Int Analyse::run(Symbolic& S) {
13041304
#endif
13051305
if (getPermutation(S.metisNo2hop())) return kRetOrderingError;
13061306
#if HIPO_TIMING_LEVEL >= 2
1307-
data_.sumTime(kTimeAnalyseMetis, clock_items.stop());
1307+
data_.sumTime(kTimeAnalyseOrdering, clock_items.stop());
13081308
#endif
13091309

13101310
#if HIPO_TIMING_LEVEL >= 2

highs/ipm/hipo/factorhighs/Analyse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Analyse {
3232
double critical_ops_{};
3333
std::vector<Int> signs_{};
3434

35-
// Permutation and inverse permutation from Metis
35+
// Permutation and inverse permutation
3636
std::vector<Int> perm_{};
3737
std::vector<Int> iperm_{};
3838

highs/ipm/hipo/factorhighs/DataCollector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ void DataCollector::printTimes(const Log& log) const {
104104

105105
#if HIPO_TIMING_LEVEL >= 2
106106

107-
log_stream << "\tMetis: "
108-
<< fix(times[kTimeAnalyseMetis], 8, 4) << " ("
109-
<< fix(times[kTimeAnalyseMetis] / times[kTimeAnalyse] * 100, 4, 1)
107+
log_stream << "\tOrdering: "
108+
<< fix(times[kTimeAnalyseOrdering], 8, 4) << " ("
109+
<< fix(times[kTimeAnalyseOrdering] / times[kTimeAnalyse] * 100, 4, 1)
110110
<< "%)\n";
111111
log_stream << "\tTree: "
112112
<< fix(times[kTimeAnalyseTree], 8, 4) << " ("

highs/ipm/hipo/factorhighs/FactorHiGHS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/*
1111
1212
Direct solver for IPM matrices.
13-
It requires Metis and BLAS.
13+
It requires Metis, AMD, rcm and BLAS.
1414
1515
Consider a sparse symmetric matrix M in CSC format.
1616
Only its lower triangular part is used; entries in the upper triangle are

highs/ipm/hipo/factorhighs/HybridSolveHandler.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void HybridSolveHandler::forwardSolve(std::vector<double>& x) const {
6565
const Int* current_swaps = &swaps_[sn][nb * j];
6666
permuteWithSwaps(&x[x_start], current_swaps, jb);
6767
#if HIPO_TIMING_LEVEL >= 2
68-
if (data_) data_->sumTime(kTimeSolveSolve_swap, clock.stop());
68+
data_.sumTime(kTimeSolveSolve_swap, clock.stop());
6969
#endif
7070
#endif
7171

@@ -85,7 +85,7 @@ void HybridSolveHandler::forwardSolve(std::vector<double>& x) const {
8585
jb, &x[x_start], 1, 0.0, y.data(), 1, data_);
8686
SnCol_ind += jb * gemv_space;
8787
#if HIPO_TIMING_LEVEL >= 2
88-
if (data_) data_->sumTime(kTimeSolveSolve_dense, clock.stop());
88+
data_.sumTime(kTimeSolveSolve_dense, clock.stop());
8989
#endif
9090

9191
#if HIPO_TIMING_LEVEL >= 2
@@ -97,7 +97,7 @@ void HybridSolveHandler::forwardSolve(std::vector<double>& x) const {
9797
x[row] -= y[i];
9898
}
9999
#if HIPO_TIMING_LEVEL >= 2
100-
if (data_) data_->sumTime(kTimeSolveSolve_sparse, clock.stop());
100+
data_.sumTime(kTimeSolveSolve_sparse, clock.stop());
101101
#endif
102102
}
103103

@@ -108,7 +108,7 @@ void HybridSolveHandler::forwardSolve(std::vector<double>& x) const {
108108
// apply inverse swaps
109109
permuteWithSwaps(&x[x_start], current_swaps, jb, true);
110110
#if HIPO_TIMING_LEVEL >= 2
111-
if (data_) data_->sumTime(kTimeSolveSolve_swap, clock.stop());
111+
data_.sumTime(kTimeSolveSolve_swap, clock.stop());
112112
#endif
113113
#endif
114114
}
@@ -167,7 +167,7 @@ void HybridSolveHandler::backwardSolve(std::vector<double>& x) const {
167167
const Int* current_swaps = &swaps_[sn][nb * j];
168168
permuteWithSwaps(&x[x_start], current_swaps, jb);
169169
#if HIPO_TIMING_LEVEL >= 2
170-
if (data_) data_->sumTime(kTimeSolveSolve_swap, clock.stop());
170+
data_.sumTime(kTimeSolveSolve_swap, clock.stop());
171171
#endif
172172
#endif
173173

@@ -184,7 +184,7 @@ void HybridSolveHandler::backwardSolve(std::vector<double>& x) const {
184184
y[i] = x[row];
185185
}
186186
#if HIPO_TIMING_LEVEL >= 2
187-
if (data_) data_->sumTime(kTimeSolveSolve_sparse, clock.stop());
187+
data_.sumTime(kTimeSolveSolve_sparse, clock.stop());
188188
#endif
189189

190190
#if HIPO_TIMING_LEVEL >= 2
@@ -195,7 +195,7 @@ void HybridSolveHandler::backwardSolve(std::vector<double>& x) const {
195195
&sn_columns_[sn][SnCol_ind], jb, y.data(), 1, 1.0,
196196
&x[x_start], 1, data_);
197197
#if HIPO_TIMING_LEVEL >= 2
198-
if (data_) data_->sumTime(kTimeSolveSolve_dense, clock.stop());
198+
data_.sumTime(kTimeSolveSolve_dense, clock.stop());
199199
#endif
200200
}
201201

@@ -206,7 +206,7 @@ void HybridSolveHandler::backwardSolve(std::vector<double>& x) const {
206206
callAndTime_dtrsv('U', 'N', 'U', jb, &sn_columns_[sn][SnCol_ind], jb,
207207
&x[x_start], 1, data_);
208208
#if HIPO_TIMING_LEVEL >= 2
209-
if (data_) data_->sumTime(kTimeSolveSolve_dense, clock.stop());
209+
data_.sumTime(kTimeSolveSolve_dense, clock.stop());
210210
#endif
211211

212212
#ifdef HIPO_PIVOTING
@@ -216,7 +216,7 @@ void HybridSolveHandler::backwardSolve(std::vector<double>& x) const {
216216
// apply inverse swaps
217217
permuteWithSwaps(&x[x_start], current_swaps, jb, true);
218218
#if HIPO_TIMING_LEVEL >= 2
219-
if (data_) data_->sumTime(kTimeSolveSolve_swap, clock.stop());
219+
data_.sumTime(kTimeSolveSolve_swap, clock.stop());
220220
#endif
221221
#endif
222222
}
@@ -263,7 +263,7 @@ void HybridSolveHandler::diagSolve(std::vector<double>& x) const {
263263
const Int* current_swaps = &swaps_[sn][nb * j];
264264
permuteWithSwaps(&x[sn_start + nb * j], current_swaps, jb);
265265
#if HIPO_TIMING_LEVEL >= 2
266-
if (data_) data_->sumTime(kTimeSolveSolve_swap, clock.stop());
266+
data_.sumTime(kTimeSolveSolve_swap, clock.stop());
267267
#endif
268268
#endif
269269

@@ -300,7 +300,7 @@ void HybridSolveHandler::diagSolve(std::vector<double>& x) const {
300300
}
301301

302302
#if HIPO_TIMING_LEVEL >= 2
303-
if (data_) data_->sumTime(kTimeSolveSolve_dense, clock.stop());
303+
data_.sumTime(kTimeSolveSolve_dense, clock.stop());
304304
#endif
305305

306306
#ifdef HIPO_PIVOTING
@@ -310,7 +310,7 @@ void HybridSolveHandler::diagSolve(std::vector<double>& x) const {
310310
// apply inverse swaps
311311
permuteWithSwaps(&x[sn_start + nb * j], current_swaps, jb, true);
312312
#if HIPO_TIMING_LEVEL >= 2
313-
if (data_) data_->sumTime(kTimeSolveSolve_swap, clock.stop());
313+
data_.sumTime(kTimeSolveSolve_swap, clock.stop());
314314
#endif
315315
#endif
316316

highs/ipm/hipo/factorhighs/Timing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace hipo {
55

66
enum TimeItems {
77
kTimeAnalyse, // TIMING_LEVEL 1
8-
kTimeAnalyseMetis, // TIMING_LEVEL 2
8+
kTimeAnalyseOrdering, // TIMING_LEVEL 2
99
kTimeAnalyseTree, // TIMING_LEVEL 2
1010
kTimeAnalyseCount, // TIMING_LEVEL 2
1111
kTimeAnalysePattern, // TIMING_LEVEL 2

highs/ipm/hipo/ipm/FactorHiGHSSolver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ Int FactorHiGHSSolver::setup() {
7272
S_.print(log_, log_.debug(1));
7373

7474
// Warn about large fill-in
75-
if (S_.fillin() > kLargeFillin && !options_.metis_no2hop) {
75+
if (S_.fillin() > kLargeFillin && options_.ordering == "metis" &&
76+
!options_.metis_no2hop) {
7677
log_.printw(
7778
"Large fill-in in factorisation. Consider setting the "
7879
"hipo_metis_no2hop option to true\n");
@@ -518,7 +519,7 @@ Int FactorHiGHSSolver::chooseNla() {
518519

519520
log_.printe("Both NE and AS failed analyse phase\n");
520521
if ((symb_AS.fillin() > kLargeFillin || symb_NE.fillin() > kLargeFillin) &&
521-
!options_.metis_no2hop)
522+
options_.ordering == "metis" && !options_.metis_no2hop)
522523
log_.print(
523524
"Large fill-in in factorisation. Consider setting the "
524525
"hipo_metis_no2hop option to true\n");

0 commit comments

Comments
 (0)