[Trilinos-Users] Tpetra::MatrixMarket: Write and Read MultiVector

Sander Schaffner ssander at student.ethz.ch
Fri Feb 6 02:25:15 MST 2015


Hi

I'm trying to write a MultiVector with 
Tpetra::MatrixMarket::Writer.writeDenseFile. The goal is to read the 
same MultiVector afterwards with 
Tpetra::MatrixMarket::Reader.readDenseFile. But there are some reasons 
why this doesn't work:

If i generate a MultiVector with two Vectors (dimension 128) where the 
first holds the values 0 and the second 1 I get this output on 32 cores:

%%MatrixMarket matrix array real general
128 2
0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

and so on. So I get first the local part of processor 0 for both Vectors 
and so on.

The reader does not accept this file. It complains about the spaces. If 
I manually get ridd of them it reads the file. But then it handles the 
first half of the values as Vector 1 and the second part as Vector 2. So 
in the End we have the following:

[0 0 0 0 0 ... 0] -> [0 0 0 0 1 1 1 1 ...]
[1 1 1 1 ... 1] -> [0 0 0 0 1 1 1 1 ...]

Is there a way of directly read in a MatrixMarket file created by the 
Writer? What other options are there to write/read MultiVectors?

Any help is appreciated.

Sander


More information about the Trilinos-Users mailing list