[Trilinos-Users] matrix market and aztecoo creator
Heroux, Michael A
maherou at sandia.gov
Wed Apr 16 09:46:27 MDT 2008
Daniele,
The message you see is due to a restriction in AztecOO's use of communication patterns. I am guessing that you are prescribing the column map in some way, and have ordered the column map global IDs so that some of the columns IDs associated with off-processor global row IDs are ordered before the global row IDs of local rows.
Consider a 3x3 tridiagonal matrix on two processors where PE0 gets the first two rows and PE1 gets the third row.
The matrix is A = trid(-1,2,-1) =
| 2 -1 0|
| -1 2 -1|
| 0 -1 2|
On PE0 a natural description of the row and column maps would be:
RowMap = {0, 1}
ColMap = {0, 1, 2}
On PE1:
RowMap = {2}
You might try:
ColMap = {1, 2} (*won't work with AztecOO*)
But this is better:
ColMap = {2, 1} (*works with AztecOO*)
Note that in the second case, the ColMap on PE1 has the global ID 2 listed before global ID 1. Also note that this is a restriction for AztecOO, not for Epetra. However, if you let Epetra define the column map (which is highly recommended for most cases, and happens if you use one of the constructors that does not have a ColMap argument), Epetra will do the right thing to be compatible with AztecOO.
I hope this helps.
Mike
On 4/16/08 6:45 AM, "Daniele Bettella" <sunriis at gmail.com> wrote:
Hello, I have a new problem with aztecoo: it happens when using mpi with np > 1
If I import a matrix from the matrix market in hb format it all goes flawlessly, but if I create a random matrix and save it in a matrix market file and import it in matrix market format (or if I simply build a random crsmatrix at runtime) when I call the aztecoo constructor a message comes up:
AZ_extract_comm_info: Received elements must be stored AZ_extract_comm_info: Received elements must be stored after
all 500 local elements
the matrix in this example is a 1000x1000, the example is run with np=2 so
process 1 has 500 rows and 788 columns
process 2 has 500 rows and 768 columns
the source is exactly the same for matrix market and hb, except for these two lines
Trilinos_Util_ReadHb2Epetra(matrix_file, Comm, readMap, readA, readx, readb, readxexact);
Trilinos_Util_ReadMatrixMarket2Epetra(matrix_file, Comm, readMap, readA, readx, readb, readxexact);
>From what I understand it has to be a problem in the way the matrices are built, but I can't understand what the AZ_extract_comm_info message exactly means.
p.s.
there's no problem with np=1
thanks for reading
Daniele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080416/09740560/attachment.html
More information about the Trilinos-Users
mailing list