Possible bug in using getTagAllocator() in GriddingAlgorithm.C when enabling CUDA
- Dominant language
- C++
- Stars
- 250
- Forks
- 89
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
When compiling with CUDA, RAJA and umpire, in my environment with gcc-7, CUDA 10, I noticed that the usage of `getTagAllocator()` in `GriddingAlgorithm.C` to initialize `CellVariables` will cause CUDA illegal memory access when filling those tag variables with `GriddingAlgorithm::fillTags()`. This causes the test sets failure as I mentioned in a previous issue. https://github.com/LLNL/SAMRAI/issues/175
The issue is caused by initialing tag data with tagAllocator, but filling it as a shared memory variable. Replacing `getTagAllocator()` with `getDefaultAllocator()` will temporary resolve this issue and pass all the tests, but I am not sure if this will bring some potential problems.
Contributor guide
Research direction
Start in GriddingAlgorithm.C by tracing how getTagAllocator() initializes CellVariables and how GriddingAlgorithm::fillTags() writes the tag data. Compare this with the proposed getDefaultAllocator() workaround and the test sets referenced through issue #175. Done means the CUDA configuration no longer reports illegal memory access and the affected tests pass without introducing allocator problems.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100