Skip to content

Commit 0112d32

Browse files
committed
merge hipo-dev
2 parents 7fb5045 + 91f7d76 commit 0112d32

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

highs/ipm/hipo/factorhighs/Factorise.cpp

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,34 @@ void Factorise::permute(const std::vector<Int>& iperm) {
168168
valA_ = std::move(new_val);
169169
}
170170

171+
class TaskGroupSpecial : public highs::parallel::TaskGroup {
172+
// Using TaskGroup may throw an exception when tasks are cancelled. Not sure
173+
// exactly why this happens, but for now this fix seems to work.
174+
175+
public:
176+
~TaskGroupSpecial() {
177+
// No virtual destructor in TaskGroup. Do not call this class via pointer to
178+
// the base!
179+
180+
cancel();
181+
182+
// re-call taskWait if it throws, until it succeeds
183+
while (true) {
184+
try {
185+
taskWait();
186+
break;
187+
} catch (HighsTask::Interrupt) {
188+
continue;
189+
}
190+
}
191+
}
192+
};
193+
171194
void Factorise::processSupernode(Int sn) {
172195
// Assemble frontal matrix for supernode sn, perform partial factorisation and
173196
// store the result.
174197

175-
highs::parallel::TaskGroup tg;
198+
TaskGroupSpecial tg;
176199

177200
if (flag_stop_) return;
178201

@@ -358,7 +381,7 @@ bool Factorise::run(Numeric& num) {
358381
Clock clock;
359382
#endif
360383

361-
highs::parallel::TaskGroup tg;
384+
TaskGroupSpecial tg;
362385

363386
total_reg_.assign(n_, 0.0);
364387

highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ void HybridHybridFormatHandler::assembleClique(const std::vector<double>& child,
154154
}
155155

156156
void HybridHybridFormatHandler::extremeEntries() {
157+
#ifdef HIPO_COLLECT_EXPENSIVE_DATA
157158
double minD = 1e100;
158159
double maxD = 0.0;
159160
double minoffD = 1e100;
@@ -199,6 +200,7 @@ void HybridHybridFormatHandler::extremeEntries() {
199200
}
200201

201202
data_.setExtremeEntries(minD, maxD, minoffD, maxoffD);
203+
#endif
202204
}
203205

204206
} // namespace hipo

highs/ipm/hipo/ipm/Solver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ double Solver::stepToBoundary(const std::vector<double>& x,
395395
// Use lo=1 for xl and zl, lo=0 for xu and zu.
396396
// Return the blocking index in block.
397397

398-
const double damp = 1.0 - std::numeric_limits<double>::epsilon();
398+
const double damp = 1.0 - 100.0 * std::numeric_limits<double>::epsilon();
399399

400400
double alpha = 1.0;
401401
Int bl = -1;

0 commit comments

Comments
 (0)