* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 * frame #0: 0x00000001132795f0 libpetsc.3.017.3.dylib`KSPSetFromOptions(ksp=0x00007f899f149a70) at itcl.c:324:19 frame #1: 0x0000000112eddda4 libpetsc.3.017.3.dylib`PCSetUp_FieldSplit(pc=0x00007f899f08d870) at fieldsplit.c:1087:32 frame #2: 0x0000000112dfb874 libpetsc.3.017.3.dylib`PCSetUp(pc=0x00007f899f08d870) at precon.c:991:5 frame #3: 0x0000000113285834 libpetsc.3.017.3.dylib`KSPSetUp(ksp=0x00007f899e95f670) at itfunc.c:401:3 frame #4: 0x000000011328b5e9 libpetsc.3.017.3.dylib`KSPSolve_Private(ksp=0x00007f899e95f670, b=0x00007f899f0dec70, x=0x00007f899f0ce870) at itfunc.c:835:3 frame #5: 0x000000011328aa66 libpetsc.3.017.3.dylib`KSPSolve(ksp=0x00007f899e95f670, b=0x00007f899f0dec70, x=0x00007f899f0ce870) at itfunc.c:1066:3 frame #6: 0x000000010e7c94e8 ex1111`main(argc=12, args=0x00007ff7b1739328) at ex1111.c:33:3 frame #7: 0x000000011703751e dyld`start + 462 The SetFromOptions doesn't always traverse all the sub-methods suitably calling SetFromOptions on them because they may not have been created by the time that the SetFromOptions is first called. In this case, the PCSetUp_FieldSplit() creates the sub solvers and calls the options database on them after the initial call to PCSetFromOptions_FieldSplit() I've attached a patch that should fix this particular issue. |
fix-fieldsplit-recall-setfromoptions.patch
Description: Binary data
I ran it with your test code, and it seemed to resolve the issue and ran the test suite, and it did not break anything. A redesigned/implemented PETSc would need some thought on how to improve the SetFromOptions model to prevent this kind of difficulty. Barry
|
