[petsc-dev] petsc-dev very broken
Barry Smith
bsmith at mcs.anl.gov
Sat Jan 21 20:37:39 CST 2012
We cannot have MatPreallocated() inside MatSetValues() because MatSetValues() is not collective but MatPreallocated() -> MatSetUpPreallocation() -> MatMPIAIJSetPreallocation() is collective.
Likely this bug has been around a long time but Jed's changes to preallocation business has exposed it.
How to fix?
1) Error out if non preallocated matrix sent to MatSetValues()? Yuck? Cause this means user must then always call MatPreallocated() or MatSetUp() before ever using it.
MatCreate()
MatSetSizes()
MatSetType()
MatSetUp() or MatXXXSetPreallocation() or MatSetUpPreallocation()
use
2) Pray every one always calls MatSetValues() on each process if not preallocating and make sure internally we never screw up. Yuck.
Barry
More information about the petsc-dev
mailing list