[petsc-dev] Bug in MatShift_MPIAIJ ?

Jed Brown jed at jedbrown.org
Wed Oct 7 14:33:15 CDT 2015


Eric Chamberland <Eric.Chamberland at giref.ulaval.ca> writes:

> Hi Barry,
>
> just compiled/tested with 3.6.2.
>
> On a 2 processes example, the non-debug version is hanging silently and 
> indefinitely but in debug mode, it now abort when calling MatShift when 
> a process has no entries:
>
> #0  0x00007fffdbc6c065 in raise () from /lib64/libc.so.6
> #1  0x00007fffdbc6d4e8 in abort () from /lib64/libc.so.6
> #2  0x00007fffe2aea789 in PetscTraceBackErrorHandler (comm=0x22d9630, 
> line=5264, fun=0x7fffe463b74f <__func__.21315> "MatSetOption", 
> file=0x7fffe46384b8 
> "/home/mefpp_ericc/petsc-3.6.2/src/mat/interface/matrix.c", n=62, 
> p=PETSC_ERROR_INITIAL, mess=0x7ffffffd1100 "Enum value must be same on 
> all processes, argument # 2", ctx=0x0) at 
> /home/mefpp_ericc/petsc-3.6.2/src/sys/error/errtrace.c:243
> #3  0x00007fffe2ae53ae in PetscError (comm=0x22d9630, line=5264, 
> func=0x7fffe463b74f <__func__.21315> "MatSetOption", file=0x7fffe46384b8 
> "/home/mefpp_ericc/petsc-3.6.2/src/mat/interface/matrix.c", n=62, 
> p=PETSC_ERROR_INITIAL, mess=0x7fffe4639b78 "Enum value must be same on 
> all processes, argument # %d") at 
> /home/mefpp_ericc/petsc-3.6.2/src/sys/error/err.c:377
> #4  0x00007fffe33eeae3 in MatSetOption (mat=0x2b06d00, 
> op=MAT_NO_OFF_PROC_ENTRIES, flg=PETSC_FALSE) at 
> /home/mefpp_ericc/petsc-3.6.2/src/mat/interface/matrix.c:5264
> #5  0x00007fffe2e4126e in MatShift_Basic (Y=0x2b06d00, a=1) at 
> /home/mefpp_ericc/petsc-3.6.2/src/mat/utils/gcreate.c:22
> #6  0x00007fffe330de85 in MatShift_MPIAIJ (Y=0x2b06d00, a=1) at 
> /home/mefpp_ericc/petsc-3.6.2/src/mat/impls/aij/mpi/mpiaij.c:2614
> #7  0x00007fffe2e3b1b4 in MatShift (Y=0x2b06d00, a=1) at 
> /home/mefpp_ericc/petsc-3.6.2/src/mat/utils/axpy.c:171
>
> Is it possible for us to only apply the "missing" patch that you 
> mentioned (the one which breaks the ABI...) but may make petsc usable 
> for us?

If I recall correctly, that patch is only checking for incorrect use by
ensuring that the flags are set collectively.  If your code is correct
then it doesn't affect you and if your code is incorrect, it will error
now where as it would behave incorrectly before.  The implementation was
done by changing some enum values, which is why it breaks the ABI.

As Satish says, you can apply the patch and see if your code errors.

If your example is simple, you can send it along so we can debug and add
it to the test suite.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20151007/b69ed4db/attachment.sig>


More information about the petsc-dev mailing list