[petsc-dev] Bug in MatShift_MPIAIJ ?

Barry Smith bsmith at mcs.anl.gov
Thu Oct 8 15:18:07 CDT 2015


> On Oct 8, 2015, at 2:50 PM, Eric Chamberland <Eric.Chamberland at giref.ulaval.ca> wrote:
> 
> 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...

  Sure, but why would that cause a hang or any other problem?  Calling  preallocation on a zero row matrix should be harmless. We need a test case that demonstrates the problem so we can reproduce the problem and determine the fundamental cause. 

  Barry

> 
> Thanks!
> 
> Eric
> 




More information about the petsc-dev mailing list