ginkgo-project / ginkgo

Numerical linear algebra software package
https://ginkgo-project.github.io/
BSD 3-Clause "New" or "Revised" License
384 stars 86 forks source link

Discard trailing entries of a line in a MM-format file #1628

Open MarcelKoch opened 1 week ago

MarcelKoch commented 1 week ago

This PR will discard any character in a line of a MM-format file after the values have been read in. This addresses #1627, using multiple columns within the MM-file will now lead to an exception. However, the exception is thrown by the read_entry function and thus the exception message is not very helpful.

nbeams commented 1 week ago

LGTM! I just have one question: Does the GKO_CHECK_STREAM also throw in case we don't read enough elements?

With the current develop (not this PR) I tried a case where I left off one element, and it threw a read error.