File tree 2 files changed +4
-12
lines changed
2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,8 @@ std::unique_ptr<Composition<ValueType>> Ic<ValueType, IndexType>::generate(
103
103
104
104
std::shared_ptr<const matrix_type> ic;
105
105
// Compute LC factorization
106
- if (parameters_.algorithm == incomplete_algorithm::syncfree) {
106
+ if (parameters_.algorithm == incomplete_algorithm::syncfree ||
107
+ exec == exec->get_master ()) {
107
108
std::unique_ptr<gko::factorization::elimination_forest<IndexType>>
108
109
forest;
109
110
const auto nnz = local_system_matrix->get_num_stored_elements ();
@@ -143,11 +144,6 @@ std::unique_ptr<Composition<ValueType>> Ic<ValueType, IndexType>::generate(
143
144
diag_idxs.get_const_data (), transpose_idxs.get_const_data (),
144
145
*forest, factors.get (), false , tmp));
145
146
ic = factors;
146
- } else if (std::dynamic_pointer_cast<const OmpExecutor>(exec) &&
147
- !std::dynamic_pointer_cast<const ReferenceExecutor>(exec)) {
148
- GKO_INVALID_STATE (
149
- " OmpExecutor does not support sparselib algorithm. Please use "
150
- " syncfree algorithm." );
151
147
} else {
152
148
exec->run (
153
149
ic_factorization::make_sparselib_ic (local_system_matrix.get ()));
Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ std::unique_ptr<Composition<ValueType>> Ilu<ValueType, IndexType>::generate_l_u(
99
99
100
100
std::shared_ptr<const matrix_type> ilu;
101
101
// Compute LU factorization
102
- if (parameters_.algorithm == incomplete_algorithm::syncfree) {
102
+ if (parameters_.algorithm == incomplete_algorithm::syncfree ||
103
+ exec == exec->get_master ()) {
103
104
const auto nnz = local_system_matrix->get_num_stored_elements ();
104
105
const auto num_rows = local_system_matrix->get_size ()[0 ];
105
106
auto factors = share (
@@ -126,11 +127,6 @@ std::unique_ptr<Composition<ValueType>> Ilu<ValueType, IndexType>::generate_l_u(
126
127
lookup.row_descs .get_const_data (), lookup.storage .get_const_data (),
127
128
diag_idxs.get_const_data (), factors.get (), false , tmp));
128
129
ilu = factors;
129
- } else if (std::dynamic_pointer_cast<const OmpExecutor>(exec) &&
130
- !std::dynamic_pointer_cast<const ReferenceExecutor>(exec)) {
131
- GKO_INVALID_STATE (
132
- " OmpExecutor does not support sparselib algorithm. Please use "
133
- " syncfree algorithm." );
134
130
} else {
135
131
exec->run (
136
132
ilu_factorization::make_sparselib_ilu (local_system_matrix.get ()));
You can’t perform that action at this time.
0 commit comments