[Trilinos-Users] Epetra and importing into serial maps

Jonas Thies jonas at math.uu.se
Wed Apr 18 03:04:58 MDT 2012


Hi all,

I am trying to accomplish something like this

- from a distributed Epetra_CrsMatrix A, say based on MPI_COMM_WORLD
- extract a serial submatrix A_loc of which I can guarantee that all 
required data is already on the process.

There may be a varying number of A_locs per processor (or none at all),
and I want a loop like this

for (int i=0;i<nblocks;i++) A_loc[i]->Import(A,import[i],Zero)).

. So what I tried up to now is:

- A_loc based on a map with a SerialComm or MpiComm(MPI_COMM_SELF)
- building Epetra_Import objects in a loop -> program hangs if not the 
same number of A_locs on each process (some collective communication 
there even though the number of Export/ImportIDs is 0?)
- building an Epetra_Export object works but then the actual 
A_loc->Import call gives errors, segfaults etc., depending
on how exactly I try to do it.

How should I do this, I think I basically want to call the private 
member function ´CopyAndPermute´. Is it actually allowed to have
different comms in the two maps?

Thanks!
Jonas



-- 
Jonas Thies
Centre for Interdisciplinary Mathematics
Uppsala University
phone +46 (0)18 471 32 09




More information about the Trilinos-Users mailing list