Skip to content

Commit 90f4fcc

Browse files
committed
Missing atomic
1 parent ad3ed0e commit 90f4fcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kratos/python/add_sparse_matrices_to_python.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ namespace
180180
const std::size_t aux_idx = entity_pos + i_local * local_size_1 + j_local; // Position in the contributions and equation ids data
181181
const int csr_index = r_idx_data[aux_idx]; // Index in the CSR matrix values vector
182182
const double lhs_contribution = r_lhs_contribution_data[aux_idx]; // Scalar contribution to the left hand side
183-
r_lhs_data[csr_index] += lhs_contribution;
183+
AtomicAdd(r_lhs_data[csr_index], lhs_contribution);
184184
}
185185
}
186186
});

0 commit comments

Comments
 (0)