[Trilinos-Users] Sending the resulting eigenvector to master node
Mehmet Salih YILDIRIM
linux at isadamlari.org
Wed Jun 2 14:02:43 MDT 2010
Hey!
I'd been trying to send the resulting eigenvector to the master node (that
is, with MyPID() =0) and i wrote the following code:
int numMyElements;
> if (Comm.MyPID() == 0)
numMyElements = segment->pixelIndices.size(); //that is, the total
> number of elements of an eigenvector (also the row count of operator of
> eigenproblem)
else
numMyElements = 0;
> Epetra_Map targetMap(-1, numMyElements, 0, Comm);
> Epetra_Vector eigenVector(targetMap); //will be collected on the master
> node.
> Teuchos::RCP<Epetra_Vector> vectorToSend;
> const Epetra_BlockMap *sourceMap;
if (solverReturn == Anasazi::Converged) {
Anasazi::Eigensolution<ST, MV> solution =
> generalizedProblem->getSolution();
> int numEigenPairs = solution.numVecs;
> Teuchos::RCP<MV> evecs = solution.Evecs;
std::vector<Anasazi::Value<ST> > evals = solution.Evals;
> int ourEvIdx = 0;
if (numEigenPairs == 2)
if (evals[0].realpart < evals[1].realpart)
ourEvIdx = 1;
evecs->Multiply(1,*invSqrtD, *evecs, 0.0);
vectorToSend = Teuchos::rcp((*evecs)(ourEvIdx));
sourceMap = &vectorToSend->Map();
}
Epetra_Import importer(targetMap, *sourceMap);
eigenVector.Import(*vectorToSend, importer, Add); // send eigenvector to
processor 1
However i get a fault like : (something like segmentation fault i think)
*** glibc detected *** ./opencv_deneme: corrupted double-linked list:
> 0x000000002006cec0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3f7b2723e5]
/lib64/libc.so.6(cfree+0x4b)[0x3f7b27273b]
./opencv_deneme[0x4c976f]
./opencv_deneme[0x482145]
./opencv_deneme[0x42a292]
./opencv_deneme[0x482145]
./opencv_deneme[0x40f0be]
./opencv_deneme[0x40ea52]
./opencv_deneme[0x40ea52]
./opencv_deneme[0x410294]
./opencv_deneme[0x4751e6]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x3f7b21d994]
./opencv_deneme(__gxx_personality_v0+0x299)[0x40b9d9]
======= Memory map: ========
00400000-0051e000 r-xp 00000000 03:01 9864086
> /home/proje/trilinos_ile_ilk_deneme/opencv
> deneme/dist/Debug/GNU-Linux-x86/opencv_deneme
0071e000-00725000 rw-p 0011e000 03:01 9864086
> /home/proje/trilinos_ile_ilk_deneme/opencv
> deneme/dist/Debug/GNU-Linux-x86/opencv_deneme
1fff8000-20100000 rw-p 1fff8000 00:00 0
> [heap]
3a68600000-3a689f6000 r-xp 00000000 03:01 6687839
> /usr/lib64/atlas/liblapack.so.3.0
3a689f6000-3a68bf6000 ---p 003f6000 03:01 6687839
> /usr/lib64/atlas/liblapack.so.3.0
3a68bf6000-3a68bf9000 rw-p 003f6000 03:01 6687839
> /usr/lib64/atlas/liblapack.so.3.0
3a68bf9000-3a68cfd000 rw-p 3a68bf9000 00:00 0
3a69600000-3a69cec000 r-xp 00000000 03:01 6687846
> /usr/lib64/atlas/libatlas.so.3.0
3a69cec000-3a69eeb000 ---p 006ec000 03:01 6687846
> /usr/lib64/atlas/libatlas.so.3.0
3a69eeb000-3a69ef5000 rw-p 006eb000 03:01 6687846
> /usr/lib64/atlas/libatlas.so.3.0
3a6c200000-3a6c254000 r-xp 00000000 03:01 5380294
> /usr/lib64/libblas.so.3.0.3
3a6c254000-3a6c453000 ---p 00054000 03:01 5380294
> /usr/lib64/libblas.so.3.0.3
3a6c453000-3a6c454000 rw-p 00053000 03:01 5380294
> /usr/lib64/libblas.so.3.0.3
3a6ca00000-3a6ca1e000 r-xp 00000000 03:01 6687833
> /usr/lib64/atlas/libcblas.so.3.0
> and so on.
So how may i solve this problem? I couldn't figure out where I am mistaken.
Any help is appreciated,
Mehmet Salih YILDIRIM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20100602/7b2c8711/attachment.html
More information about the Trilinos-Users
mailing list