Hi,
Adding up to my previous email: looking at all calls to DMGetWorkArray / DMRestoreArray in DMPlexVecGetClosure/DMPlexVecRestoreClosure , I don’t understand why they don’t match. Here is a cleaned up lldb output from ex96. See how the mem argument
in the second calls to DMGetWorkArray and DMRestoreArray (highlighted in black) don’t match while those in red and orange do.
Blaise
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.2
frame #0: 0x000000010494f698 ex96`main(argc=5, argv=0x000000016b4b2788) at ex96.c:49:3
46
47 PetscCall(PetscPrintf(PETSC_COMM_WORLD,
"Point %" PetscInt_FMT "\n", pStart + 1));
48 cval = NULL;
-> 49 PetscCall(DMPlexVecGetClosure(dm, section, v, pStart + 1, &clSize, &cval));
50 PetscCall(PetscPrintf(PETSC_COMM_WORLD,
"clSize %" PetscInt_FMT "\n", clSize));
51 if (clSize > 0) PetscCall(PetscRealView(clSize, cval, PETSC_VIEWER_STDOUT_SELF));
52 PetscCall(DMPlexVecRestoreClosure(dm, section, v, pStart + 1, &clSize, &cval));
Target 0: (ex96) stopped.
(lldb) c
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
* frame #0: 0x00000001097e3c9c libpetsc.3.017.4.dylib`DMGetWorkArray(dm=0x000000015c0f0250, count=129, dtype=1275069445, mem=0x000000016b4b1cf8)
at dm.c:1569:3
frame #1: 0x0000000109ccee28 libpetsc.3.017.4.dylib`DMPlexGetTransitiveClosure_Internal(dm=0x000000015c0f0250, p=1, ornt=0, useCone=PETSC_TRUE, numPoints=0x000000016b4b1eac, points=0x000000016b4b1ea0) at
plex.c:3560:3
frame #2: 0x0000000109cd2f20 libpetsc.3.017.4.dylib`DMPlexGetTransitiveClosure(dm=0x000000015c0f0250, p=1, useCone=PETSC_TRUE, numPoints=0x000000016b4b1eac, points=0x000000016b4b1ea0) at plex.c:3650:3
frame #3: 0x0000000109ceb028 libpetsc.3.017.4.dylib`DMPlexGetCompressedClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, point=1, numPoints=0x000000016b4b1ff4, points=0x000000016b4b2010, clSec=0x000000016b4b2020,
clPoints=0x000000016b4b2018, clp=0x000000016b4b2008) at plex.c:5555:5
frame #4: 0x0000000109cec6d0 libpetsc.3.017.4.dylib`DMPlexVecGetClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, v=0x000000015c09f050, point=1, csize=0x000000016b4b21c4, values=0x000000016b4b21c8)
at plex.c:5741:3
frame #5: 0x000000010494f70c ex96`main(argc=5, argv=0x000000016b4b2788) at ex96.c:49:3
frame #6: 0x0000000104b9508c dyld`start + 520
(lldb) c
Process 64051 resuming
Command #2 'c' continued the target.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
* frame #0: 0x00000001097e3c9c libpetsc.3.017.4.dylib`DMGetWorkArray(dm=0x000000015c0f0250, count=86, dtype=1275069445, mem=0x000000016b4b1d00) at dm.c:1569:3
frame #1: 0x0000000109ccef20 libpetsc.3.017.4.dylib`DMPlexGetTransitiveClosure_Internal(dm=0x000000015c0f0250, p=1, ornt=0, useCone=PETSC_TRUE, numPoints=0x000000016b4b1eac, points=0x000000016b4b1ea0) at
plex.c:3563:10
frame #2: 0x0000000109cd2f20 libpetsc.3.017.4.dylib`DMPlexGetTransitiveClosure(dm=0x000000015c0f0250, p=1, useCone=PETSC_TRUE, numPoints=0x000000016b4b1eac, points=0x000000016b4b1ea0) at plex.c:3650:3
frame #3: 0x0000000109ceb028 libpetsc.3.017.4.dylib`DMPlexGetCompressedClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, point=1, numPoints=0x000000016b4b1ff4, points=0x000000016b4b2010, clSec=0x000000016b4b2020,
clPoints=0x000000016b4b2018, clp=0x000000016b4b2008) at plex.c:5555:5
frame #4: 0x0000000109cec6d0 libpetsc.3.017.4.dylib`DMPlexVecGetClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, v=0x000000015c09f050, point=1, csize=0x000000016b4b21c4, values=0x000000016b4b21c8)
at plex.c:5741:3
frame #5: 0x000000010494f70c ex96`main(argc=5, argv=0x000000016b4b2788) at ex96.c:49:3
frame #6: 0x0000000104b9508c dyld`start + 520
(lldb) c
Process 64051 resuming
Command #2 'c' continued the target.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
* frame #0: 0x00000001097e4af0 libpetsc.3.017.4.dylib`DMRestoreWorkArray(dm=0x000000015c0f0250, count=129, dtype=1275069445, mem=0x000000016b4b1cf8)
at dm.c:1617:3
frame #1: 0x0000000109ccf8b8 libpetsc.3.017.4.dylib`DMPlexGetTransitiveClosure_Internal(dm=0x000000015c0f0250, p=1, ornt=0, useCone=PETSC_TRUE, numPoints=0x000000016b4b1eac, points=0x000000016b4b1ea0) at
plex.c:3612:3
frame #2: 0x0000000109cd2f20 libpetsc.3.017.4.dylib`DMPlexGetTransitiveClosure(dm=0x000000015c0f0250, p=1, useCone=PETSC_TRUE, numPoints=0x000000016b4b1eac, points=0x000000016b4b1ea0) at plex.c:3650:3
frame #3: 0x0000000109ceb028 libpetsc.3.017.4.dylib`DMPlexGetCompressedClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, point=1, numPoints=0x000000016b4b1ff4, points=0x000000016b4b2010, clSec=0x000000016b4b2020,
clPoints=0x000000016b4b2018, clp=0x000000016b4b2008) at plex.c:5555:5
frame #4: 0x0000000109cec6d0 libpetsc.3.017.4.dylib`DMPlexVecGetClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, v=0x000000015c09f050, point=1, csize=0x000000016b4b21c4, values=0x000000016b4b21c8)
at plex.c:5741:3
frame #5: 0x000000010494f70c ex96`main(argc=5, argv=0x000000016b4b2788) at ex96.c:49:3
frame #6: 0x0000000104b9508c dyld`start + 520
(lldb) c
Process 64051 resuming
Command #2 'c' continued the target.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
* frame #0: 0x00000001097e3c9c libpetsc.3.017.4.dylib`DMGetWorkArray(dm=0x000000015c0f0250, count=0, dtype=1275070475, mem=0x000000016b4b21c8)
at dm.c:1569:3
frame #1: 0x0000000109cec938 libpetsc.3.017.4.dylib`DMPlexVecGetClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, v=0x000000015c09f050, point=1, csize=0x000000016b4b21c4, values=0x000000016b4b21c8)
at plex.c:5755:12
frame #2: 0x000000010494f70c ex96`main(argc=5, argv=0x000000016b4b2788) at ex96.c:49:3
frame #3: 0x0000000104b9508c dyld`start + 520
(lldb) c
Process 64051 resuming
Command #2 'c' continued the target.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
* frame #0: 0x00000001097e4af0 libpetsc.3.017.4.dylib`DMRestoreWorkArray(dm=0x000000015c0f0250, count=0, dtype=1275069445, mem=0x000000016b4b2010) at dm.c:1617:3
frame #1: 0x0000000109cd3500 libpetsc.3.017.4.dylib`DMPlexRestoreTransitiveClosure(dm=0x000000015c0f0250, p=1, useCone=PETSC_TRUE, numPoints=0x000000016b4b1ff4, points=0x000000016b4b2010) at plex.c:3677:3
frame #2: 0x0000000109ceb728 libpetsc.3.017.4.dylib`DMPlexRestoreCompressedClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, point=1, numPoints=0x000000016b4b1ff4, points=0x000000016b4b2010, clSec=0x000000016b4b2020,
clPoints=0x000000016b4b2018, clp=0x000000016b4b2008) at plex.c:5567:5
frame #3: 0x0000000109cecea0 libpetsc.3.017.4.dylib`DMPlexVecGetClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, v=0x000000015c09f050, point=1, csize=0x000000016b4b21c4, values=0x000000016b4b21c8)
at plex.c:5767:3
frame #4: 0x000000010494f70c ex96`main(argc=5, argv=0x000000016b4b2788) at ex96.c:49:3
frame #5: 0x0000000104b9508c dyld`start + 520
(lldb) c
Process 64051 resuming
Command #2 'c' continued the target.
(lldb) clSize 0
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
* frame #0: 0x00000001097e4af0 libpetsc.3.017.4.dylib`DMRestoreWorkArray(dm=0x000000015c0f0250, count=0, dtype=1275070475, mem=0x000000016b4b21c8)
at dm.c:1617:3
frame #1: 0x0000000109cf17f8 libpetsc.3.017.4.dylib`DMPlexVecRestoreClosure(dm=0x000000015c0f0250, section=0x000000015c09e650, v=0x000000015c09f050, point=1, csize=0x000000016b4b21c4, values=0x000000016b4b21c8)
at plex.c:5876:3
frame #2: 0x000000010494f99c ex96`main(argc=5, argv=0x000000016b4b2788) at ex96.c:52:3
frame #3: 0x0000000104b9508c dyld`start + 520
(lldb) c
—
Tier 1 Canada Research Chair in Mathematical and Computational Aspects of Solid Mechanics Professor, Department of Mathematics & Statistics
Hamilton Hall room 409A, McMaster University 1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada https://www.math.mcmaster.ca/bourdin | +1 (905) 525 9140 ext. 27243 |
- [petsc-dev] Bug in DMPlexVecGetClosure/DMPlexVecRestoreClos... Blaise Bourdin
- Re: [petsc-dev] Bug in DMPlexVecGetClosure/DMPlexVecRe... Blaise Bourdin