llnl / llnl/SAMRAI

Possible bug when coarsening Indexdata

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
250
Forks
89
Avg merge
34m
Merged PRs (30d)
1

Description

In file IndexData.C, routines getDataStreamSize, packStream are calculating stream size or packing data on the intersection of overlap destination boxes with box of the patch data (line. 362, 402, 417).

However, when setting a coarsen schedule with non zero gcw_to_coarsen, it will involve the data living on the coarse-fine boundaries naturally, which are part of ghost cells of the temp level used in coarsen schedule. If this is the case, when transferring data from temp level to coarse level when doing coarsening, the rountes getDataStreamSize and packStream will exclude data living in ghost cells and result in the failure of updating data within gcw_to_coarsen.

Change the call of getBox() to getGhostBox() on those lines might fix the problem (at least in my test code), but I'm not sure whether this is the proper way.

Contributor guide

Open the contributing guide

Research direction

Start in IndexData.C at getDataStreamSize and packStream, especially lines 362, 402, and 417, and trace how a coarsen schedule with nonzero gcw_to_coarsen handles coarse-fine boundary data. Compare the use of getBox() and getGhostBox() in these paths, then reproduce the reporter's test case and verify that coarsening updates data within gcw_to_coarsen.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.