GDKM macro bug
Nobody has claimed this yet.
- Dominant language
- GLSL
- Stars
- 68
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Trac Ticket submitted by Amy Jordan 06/05/2012
nelm() variable is out of bound in routine area_length_calc.f when do gdpm test suite, which causes segmentation fault.
We need to ask George to take a look at this. I was able to avoid the segmentation fault by setting the loop in line 298 back to i=1 to neq_primary for gdpm as well as gdkm problems, like it was before, and it runs fine, but this may not be the correct fix.
On line 298 of the new area_length_calc.f, before, the loop always ran from i=1 to neq_primary, where neq_primary = 51 for the fracture transport gdpm test problem. Now, the loop runs to i=neq_primary if gdkm is enabled (so it works fine for gdkm), but the loop runs to n = 1530 (for the test problem), i.e. primary nodes + gdpm nodes, when gdpm is enabled. In line 312: i1 = nelm(i)+1 But nelm is of size 203 for this test problem, so when i>203 the problem arises.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with area_length_calc.f, especially the loop at line 298 and the nelm access at line 312, then reproduce the failure with the gdpm test suite. Check how the loop bounds relate to nelm's allocated size for the gdpm and gdkm cases. Done means the test suite no longer reaches an out-of-bounds nelm access or segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100