[Trilinos-Users] possible bug formatting complex values in Tpetra::MatrixMarket::Writer

Rutherford, Joseph M jmruther at illinois.edu
Sat Jun 11 10:09:01 EDT 2016


All,

I think there's a bug writing out complex type matrices in Tpetra::MatrixMarket::Writer::writeOperator():

1.)    The MATLAB mmread.m from NIST and Python scipy.io.mmread() both fail to read the file with unhelpful error messages.

2.)    scipy.io.mmwrite() writes each complex value as "re im", but Tpetra writes them as "(re,im)".

3.)    After converting Tpetra's output to "re im", I can read the files in both MATLAB and Python.

4.)    My workaround is a 1-line sed script: 's/\([0-9]*\) \([0-9]*\) (\(.*\),\(.*\))/\1 \2 \3 \4/'

This seems like it could be labeled a bug. If nothing else, other community members could benefit from this knowledge, and I've not found it in any Tpetra documentation yet.

If further details are needed, I can provide a simple driver exhibiting this problem, i/o files, etc.

Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160611/0beabbf4/attachment.html>


More information about the Trilinos-Users mailing list