[petsc-dev] error on preallocation business
    Barry Smith 
    bsmith at mcs.anl.gov
       
    Sat Jan 21 11:50:54 CST 2012
    
    
  
  Jed,
     It appears you changed all the MatXXXSetPreallocation() routines to set call  ierr = MatSetOption(B,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_TRUE);CHKERRQ(ierr); thus generating an error if preallocation is wrong.
     The problem is that MatXXXSetPreallocation() is ALWAYS called (with default values if the user did not call it explicitly) by MatPreallocated() which calls MatPreallocationSetUp(). Hence you are ALWAYS setting error on new allocation.
     My intention was that an error would only be generated if the user explicitly called MatXXXSetPreallocation() so 
   1) Was my intention wrong and should we always default to erroring on wrong preallocation even if the user did not preallocate or   (if so we need lots of fixes because much code is broken in nightly tests)
   2) is there anyway to change it so it only errors out when the user did explicitly preallocate?
    Barry
    
    
More information about the petsc-dev
mailing list