[petsc-users] How to understand these error messages
Jed Brown
jedbrown at mcs.anl.gov
Fri Jun 21 05:33:34 CDT 2013
Fande Kong <fd.kong at siat.ac.cn> writes:
> The code works well with less cores. And It also works well with
> petsc-3.3-p7. But it does not work with petsc-3.4.1. Thus, If you can check
> the differences between petsc-3.3-p7 and petsc-3.4.1, you can figure out
> the reason.
That is one way to start debugging, but there are no changes to the core
MatStash code, and many, many changes to PETSc in total. The relevant
snippet of code is here:
if (stash->reproduce) {
i = stash->reproduce_count++;
ierr = MPI_Wait(stash->recv_waits+i,&recv_status);CHKERRQ(ierr);
} else {
ierr = MPI_Waitany(2*stash->nrecvs,stash->recv_waits,&i,&recv_status);CHKERRQ(ierr);
}
if (recv_status.MPI_SOURCE < 0) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Negative MPI source!");
So MPI returns correctly (stash->reproduce will be FALSE unless you
changed it). You could change the line above to the following:
if (recv_status.MPI_SOURCE < 0) SETERRQ5(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Negative MPI source: stash->nrecvs=%D i=%d MPI_SOURCE=%d MPI_TAG=%d MPI_ERROR=%d",
stash->nrecvs,i,recv_status.MPI_SOURCE,recv_status.MPI_TAG,recv_status.MPI_ERROR);
It would help to debug --with-debugging=1, so that more checks for
corrupt data are performed. You can still make the compiler optimize if
it takes a long time to reach the error condition.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130621/9fe19c1a/attachment.pgp>
More information about the petsc-users
mailing list