EpetraExt: MatrixMarketFileToMultiVector does only allow for one type of map
Created by: Sbte
Expectations
Any Epetra_Map should allow for creating an Epetra_MultiVector from a MatrixMarket file
Current Behavior
Only maps constructed with
Epetra_Map (int NumGlobalElements, int IndexBase, const Epetra_Comm &Comm)
give valid results, because the implementation works with offsets. Maps based on domain partitioning or local maps for instance do not work.
Motivation and Context
I was debugging for about a day before finding out that there was no error in my code, but that instead MatrixMarketFileToMultiVector can just not handle non-standard maps, but does not give back any errors when you use one.
Definition of Done
Either an error should be given when using a map that is not of a standard format, or the implementation should be changed to allow for any map.
Possible Solution
Just loop over every line of the file, check if LID(gid) > -1
and if that's the case, set v[LID(gid)] = value
.
Steps to Reproduce
Create any map with non-continuous elements, for instance 0, 2 on proc 0 and 1, 3 on proc 1, and try to load a MatrixMarket file.