Skip to content

Commit 8053eb7

Browse files
author
jajhall
committed
Commented out use of expensive_2821_check
1 parent a9a74b5 commit 8053eb7

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

highs/model/HighsHessianUtils.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ HighsStatus normaliseHessian2(const HighsOptions& options,
418418
HighsInt num_summation = 0;
419419
HighsInt num_upper_triangle = 0;
420420
HighsInt num_hessian_el = 0;
421-
const bool expensive_2821_check = true;
421+
// const bool expensive_2821_check = true;
422422
for (HighsInt iCol = 0; iCol < dim; iCol++) {
423423
for (HighsInt iEl = from_hessian.start_[iCol];
424424
iEl < from_hessian.start_[iCol + 1]; iEl++) {
@@ -496,6 +496,7 @@ HighsStatus normaliseHessian2(const HighsOptions& options,
496496
// Hessians needs to be zeroed
497497
upper_off_diagonal[iRow] = 0;
498498
}
499+
/*
499500
if (expensive_2821_check) {
500501
// Check that lower_on_below_diagonal and upper_off_diagonal
501502
// have been zeroed
@@ -504,6 +505,7 @@ HighsStatus normaliseHessian2(const HighsOptions& options,
504505
assert(!upper_off_diagonal[iRow]);
505506
}
506507
}
508+
*/
507509
} // Loop iCol = 0; iCol < dim; iCol++
508510
hessian.start_[dim] = num_hessian_el;
509511
hessian.format_ = HessianFormat::kTriangular;

highs/util/HighsMatrixUtils.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,20 +228,23 @@ HighsStatus assessMatrix(
228228
// Reset el_in_vec
229229
for (HighsInt el = from_el; el < to_el; el++)
230230
el_in_vec[matrix_index[el]] = illegal_el;
231-
const bool expensive_2821_check = true;
231+
// const bool expensive_2821_check = true;
232+
/*
232233
if (expensive_2821_check) {
233234
// Check el_in_vec !! Remove later!
234235
for (HighsInt lc_ix = 0; lc_ix < vec_dim; lc_ix++)
235236
assert(el_in_vec[lc_ix] == illegal_el);
236237
}
237-
238+
*/
238239
for (HighsInt el = from_el; el < to_el; el++) {
239240
HighsInt component = matrix_index[el];
241+
/*
240242
if (expensive_2821_check) {
241243
// Ensure that duplicates have been eliminated
242244
HighsInt previous_el = el_in_vec[component];
243245
assert(previous_el == illegal_el);
244246
}
247+
*/
245248
// Check the value
246249
double abs_value = fabs(matrix_value[el]);
247250
// Check that the value is not too large
@@ -263,14 +266,17 @@ HighsStatus assessMatrix(
263266
// the new number of nonzeros
264267
matrix_index[num_new_nz] = matrix_index[el];
265268
matrix_value[num_new_nz] = matrix_value[el];
269+
/*
266270
if (expensive_2821_check) {
267271
// Record where the index has occurred
268272
el_in_vec[component] = num_new_nz;
269273
}
274+
*/
270275
num_new_nz++;
271276
}
272277
} // Loop from_el; to_el
273278
index_set.clear();
279+
/*
274280
if (expensive_2821_check) {
275281
// Reset el_in_vec
276282
for (HighsInt el = from_el; el < to_el; el++)
@@ -279,6 +285,7 @@ HighsStatus assessMatrix(
279285
for (HighsInt lc_ix = 0; lc_ix < vec_dim; lc_ix++)
280286
assert(el_in_vec[lc_ix] == illegal_el);
281287
}
288+
*/
282289
} // Loop 0; num_vec
283290
if (num_duplicate) {
284291
highsLogUser(log_options, HighsLogType::kInfo,

0 commit comments

Comments
 (0)