[petsc-dev] Bug in MatShift_MPIAIJ ?
    Eric Chamberland 
    Eric.Chamberland at giref.ulaval.ca
       
    Thu Oct  8 14:50:35 CDT 2015
    
    
  
On 08/10/15 03:30 PM, Satish Balay wrote:
> The commented code is sequential code - and shouldn't make a
> difference.
...but it does!
>
> Perhaps your application has other issues.
>
> Can you verify if your code is valgrind clean?
> http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
Yes it is valgrind clean.  We run every night the same regression tests 
with valgrind and check morning results since jun 27 2012.  Valgrind run 
over ~2000 tests (in our suite) and takes almost 13 hours to complete. 
It is costly, but believe me, we have very useful results with the 
reports since we do this check.
The point is that I do have "0 == aij->nz" because the matrix has 0 
lines on one processor.  So why should it pass into  Mat*SetPreallocation?
I understand it will speed-up things to preallocated the diagonal if you 
have not preallocated it, but the criterion of (0 ==  aij->nz) is not 
right in the case you have no lines on one processor!
In other words, after the call to Mat*SetPreallocation, in that case, it 
must still have (0 == aij->nz) because there are no lines on the 
processor...
Thanks!
Eric
    
    
More information about the petsc-dev
mailing list