[Trilinos-Users] Problems with Insert

Heroux, Michael A maherou at sandia.gov
Wed Apr 1 19:28:29 MDT 2009


John,

The source map (*epRowMapPtr) must generally have unique GIDs (there are only a few very advanced cases where this is not required).  You can test this condition using the UniqueGIDs() method on the map class.

All of the IDs in the target map (*guardMapPtr) must be present somewhere in the source map but the Epetra_Import constructor should complain if that is not true.

These operations are all collective, so each process must participate.

It looks like there might be a memory error.  Can you run this with valgrind or purify?  It might help you detect where the first memory violation occurs.  Leave symbols in (-g on the compiler argument list) if you are not already.

I can't think of anything else at this point.

If you can explain the broader context I might be able to give more ideas.  Usually when you are getting vectors back from Trilinos, the import objects you need are already built as part of the matrix object you are using.

I hope this helps.

Mike


On 4/1/09 7:37 PM, "John R. Cary" <cary at colorado.edu> wrote:

No doubt this is a problem with my code, but looking for ideas
on how to debug.

I have narrowed down a crash when using trilinos to being inside
a call to Epetra_DistObject::Import,
which I am trying to use to get my vector back out of trilinos.  The crash
traceback is shown below.  The call in the source is

   resultGuardPtr->Import(*rowEpVecPtr, *guardImporterPtr, Insert);

where elsewhere I have

  resultGuardPtr = new Epetra_Vector(*guardMapPtr);
  ...
  rowEpVecPtr = new Epetra_Vector(*epRowMapPtr);
  ...
  guardImporterPtr = new Epetra_Import(*guardMapPtr, *epRowMapPtr);


not necessarily in that order.  Given the crash below, how do I
go about debugging without going into the trilinos code?  Are
there preconditions for the call to Import that I can test on?

Thanks......John Cary








../../vpmultif/VpEpetraUpdater.cpp, line 1132, adiemfld_psolvx, case
SOLVE, fillReadVector returned on rank 0.
../../vpmultif/VpEpetraUpdater.cpp, line 1661, adiemfld_psolvx, is
calling Iterate from rank 0.
../../vpmultif/VpEpetraUpdater.cpp, line 1675, adiemfld_psolvx, Iterate
returned on rank 0.
../../vpmultif/VpEpetraUpdater.cpp, line 1172, adiemfld_psolvx,
updateVectors returned on rank 0.
../../vpmultif/VpEpetraUpdater.cpp, line 1222, adiemfld_psolvx, case
SOLVE , calling Import on rank 0.
[octet:11150] *** Process received signal ***
[octet:11149] *** Process received signal ***
[octet:11150] Signal: Segmentation fault (11)
[octet:11150] Signal code: Address not mapped (1)
[octet:11150] Failing at address: (nil)
[octet:11149] Signal: Segmentation fault (11)
[octet:11149] Signal code: Address not mapped (1)
[octet:11149] Failing at address: 0x58
[octet:11149] [ 0] /lib64/libpthread.so.0 [0x35cb40ed30]
[octet:11149] [ 1]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(_ZN21Epetra_MpiDistributor2DoEPciRiRS0_+0x26)
[0x336b84e]
[octet:11149] [ 2]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(_ZN17Epetra_DistObject10DoTransferERK20Epetra_SrcDistObject18Epetra_CombineModeiiiiPiS4_S4_S4_RiRPcS5_S7_R18Epetra_DistributorbPK18Epetra_OffsetIndex+0x6a3)
[0x330135f]
[octet:11149] [ 3]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(_ZN17Epetra_DistObject6ImportERK20Epetra_SrcDistObjectRK13Epetra_Import18Epetra_CombineModePK18Epetra_OffsetIndex+0x31a)
[0x3302414]
[octet:11149] [ 4]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(_ZN15VpEpetraUpdaterIdLm2EE10mainUpdateEd+0xa7b)
[0x26681eb]
[octet:11149] [ 5]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(_ZN8VpDynObjIdLm2EE6updateEd+0x1d0)
[0x2846fc0]
[octet:11149] [ 6]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(_ZN17VpFieldUpdateStepIdLm2EE6updateEd+0xa4)
[0x27b8064]
[octet:11149] [ 7]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(_ZN12VpMultiFieldIdLm2EE6updateEd+0x7c)
[0x236e34c]
[octet:11149] [ 8]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(_ZN8VpDomainIdLm2EE6updateEd+0x1253)
[0xf065c3]
[octet:11149] [ 9]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(main+0x1b74)
[0xebd4d4]
[octet:11149] [10] /lib64/libc.so.6(__libc_start_main+0xfa) [0x35ca81e32a]
[octet:11149] [11]
/home/research/cary/projects/vorpal-periodicEpetra-r12005/parallel/vorpal/vorpal(_ZN14TxAttributeSet9parseLineERKSs+0x169)
[0xeb8ae9]


_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/pipermail/trilinos-users/attachments/20090401/93f7ce47/attachment.html 


More information about the Trilinos-Users mailing list