-
Notifications
You must be signed in to change notification settings - Fork 127
Fix timer checks #849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix timer checks #849
Changes from all commits
b758b9f
0392a62
ee54477
f876fc0
1c02baa
7de08d2
942de9c
0b944d1
71b7f2f
82b2d64
0c81173
609c578
3d32acd
0c54ecf
fc414e7
84e344a
b58edfc
76df05a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,6 +160,7 @@ template <typename i_t, typename f_t> | |
| i_t factorize_basis(const csc_matrix_t<i_t, f_t>& A, | ||
| const simplex_solver_settings_t<i_t, f_t>& settings, | ||
| const std::vector<i_t>& basic_list, | ||
| f_t start_time, | ||
| csc_matrix_t<i_t, f_t>& L, | ||
| csc_matrix_t<i_t, f_t>& U, | ||
| std::vector<i_t>& p, | ||
|
|
@@ -383,15 +384,16 @@ i_t factorize_basis(const csc_matrix_t<i_t, f_t>& A, | |
| settings, | ||
| settings.threshold_partial_pivoting_tol, | ||
| identity, | ||
| start_time, | ||
| S_col_perm, | ||
| SL, | ||
| SU, | ||
| S_perm_inv, | ||
| work_estimate); | ||
| if (settings.concurrent_halt != nullptr && *settings.concurrent_halt == 1) { | ||
| settings.log.printf("Concurrent halt\n"); | ||
| return CONCURRENT_HALT_RETURN; | ||
| } | ||
| if (Srank < 0) { return Srank; } | ||
| if (Srank != Sdim) { | ||
| // Get the rank deficient columns | ||
| deficient.clear(); | ||
|
|
@@ -618,7 +620,14 @@ i_t factorize_basis(const csc_matrix_t<i_t, f_t>& A, | |
| q.resize(m); | ||
| work_estimate += m; | ||
| f_t fact_start = tic(); | ||
| rank = right_looking_lu(A, settings, medium_tol, basic_list, q, L, U, pinv, work_estimate); | ||
| rank = | ||
| right_looking_lu(A, settings, medium_tol, basic_list, start_time, q, L, U, pinv, work_estimate); | ||
| if (rank < 0) { | ||
| if (settings.concurrent_halt != nullptr && *settings.concurrent_halt == 1) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We check for concurrent halt below. So not sure this is necessary. If you think it should be kept, please remove the check below.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is when |
||
| return CONCURRENT_HALT_RETURN; | ||
| } | ||
| return rank; | ||
| } | ||
| inverse_permutation(pinv, p); | ||
| work_estimate += 3 * pinv.size(); | ||
|
|
||
|
|
@@ -638,7 +647,6 @@ i_t factorize_basis(const csc_matrix_t<i_t, f_t>& A, | |
| work_estimate += 3 * (m - rank); | ||
| } | ||
| if (settings.concurrent_halt != nullptr && *settings.concurrent_halt == 1) { | ||
| settings.log.printf("Concurrent halt\n"); | ||
| return CONCURRENT_HALT_RETURN; | ||
| } | ||
| if (verbose) { | ||
|
|
@@ -938,6 +946,7 @@ template void get_basis_from_vstatus<int>(int m, | |
| template int factorize_basis<int>(const csc_matrix_t<int, double>& A, | ||
| const simplex_solver_settings_t<int, double>& settings, | ||
| const std::vector<int>& basis_list, | ||
| double start_time, | ||
| csc_matrix_t<int, double>& L, | ||
| csc_matrix_t<int, double>& U, | ||
| std::vector<int>& p, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to handle the TIME_LIMIT case here explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just propagates the error to the call stack. The callstack functions handle different return codes correctly(crossover.cpp and primal.coo). I can put a comment if you want?