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




Reply via email to