Default to any other sparse libraries over Accelerate

- Accelerate currently does not support dynamic sparsity, whereas the
  other sparse linear algebra libraries do (outstanding issue to update)
- Previously we preferred Accelerate to all but SuiteSparse if it was
  available, which breaks the dynamic_sparsity_test if SuiteSparse is
  *not* available (even if others are) as Accelerate does not support
  dynamic sparsity.

Change-Id: Ibc2dd2f14f83cffbecca38097d02bb2188aaaa05
This commit is contained in:
Alex Stewart
2019-06-26 14:59:35 +01:00
parent db1f5b57a0
commit c4dbc927d6
4 changed files with 27 additions and 10 deletions
+10 -4
View File
@@ -222,10 +222,16 @@ bool TrustRegionOptionsAreValid(const Solver::Options& options, string* error) {
return false;
}
if (options.dynamic_sparsity &&
options.linear_solver_type != SPARSE_NORMAL_CHOLESKY) {
*error = "Dynamic sparsity is only supported with SPARSE_NORMAL_CHOLESKY.";
return false;
if (options.dynamic_sparsity) {
if (options.linear_solver_type != SPARSE_NORMAL_CHOLESKY) {
*error = "Dynamic sparsity is only supported with SPARSE_NORMAL_CHOLESKY.";
return false;
}
if (options.sparse_linear_algebra_library_type == ACCELERATE_SPARSE) {
*error = "ACCELERATE_SPARSE is not currently supported with dynamic "
"sparsity.";
return false;
}
}
return true;