-
Notifications
You must be signed in to change notification settings - Fork 33
Memory-related issue with Array::fill #1833
Copy link
Copy link
Open
Labels
ReviewedUser RequestIssues related to user requestsIssues related to user requestsbugSomething isn't workingSomething isn't workingcudaIssues related to CUDAIssues related to CUDAmemory
Milestone
Description
A user encountered a segfault with Array::fill() in a user code w/ a CUDA config (on LC's rzvector).
The code works as expected in other configs, so this seems like a memory-related issue w/ CUDA.
They found the following workaround:
diff --git a/src/tribol/search/InterfacePairFinder.cpp b/src/tribol/search/InterfacePairFinder.cpp
index 469457c..272832e 100644
--- a/src/tribol/search/InterfacePairFinder.cpp
+++ b/src/tribol/search/InterfacePairFinder.cpp
@@ -121,7 +121,8 @@ class CartesianProduct : public SearchBase {
auto& contactPairs = m_coupling_scheme->getInterfacePairs();
contactPairs.resize( countArray_host[0] );
- countArray.fill( 0 );
+ int zero = 0;
+ axom::copy(countArray.data(), &zero, sizeof(int));We should investigate and fix this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ReviewedUser RequestIssues related to user requestsIssues related to user requestsbugSomething isn't workingSomething isn't workingcudaIssues related to CUDAIssues related to CUDAmemory