Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/tribol/search/InterfacePairFinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ class CartesianProduct : public SearchBase {
auto& contactPairs = m_coupling_scheme->getInterfacePairs();
contactPairs.resize( countArray_host[0] );

countArray.fill( 0 );
int zero = 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int zero = 0;
// Workaround for axom::Array::fill() issue on rzvector (CUDA). See Axom #1833.
int zero = 0;

Yes, the description is clear, I just meant something like the above, so the rationale is clear in the code and so we can track the issue and it's resolution.

But, as you mention, an axom reducer is a better fit for what the code is trying to do here. I'm OK merging in what you have here to fix the build issue and I can do a follow-on PR that uses axom::ReduceSum here instead.

// Workaround for axom::Array::fill() issue for optimized CUDA code, see Axom #1833.
axom::copy( countArray.data(), &zero, sizeof( int ) );
auto pairs_view = m_coupling_scheme->getInterfacePairs().view();
// fill proximate pairs array
forAllExec(
Expand Down
Loading