GraphBLAS / LAGraph

This is a library plus a test harness for collecting algorithms that use the GraphBLAS. For test coverage reports, see https://graphblas.org/LAGraph/ . Documentation: https://lagraph.readthedocs.org
Other
229 stars 61 forks source link

LAGraph_mmread needs more information on errors #21

Closed mcmillan03 closed 2 years ago

mcmillan03 commented 5 years ago

I was reading an mtx file I created and got the following:

reading input graph: Data/hpec_coauthors.mtx
LAGraph_mmread: bad type
GrB failure: [5] 

It would be helpful to provide more information regarding the error, especially the line number in the file it was parsing. I did not know if this is because I forgot to put 'general' in the header or if it was because I was incorrectly using zero based indices in my file. Bad on me as I changed both things at once and the error went away.

DrTimothyAldenDavis commented 5 years ago

Yes, we need to add a uniform error reporting method, like GrB_error in GraphBLAS.

I really don't like GrB_error, though. It requires thread-local-storage to keep track of the last error, and that makes it a real pain to implement. I would prefer to have a simpler thread-safe method where the status and error message are returned directly to the caller, without requiring thread-local-storage to be used.

But I can at least see about fixing this particular error message to make it more useful.

On Sat, Aug 10, 2019 at 12:47 AM Doc McMillan notifications@github.com wrote:

I was reading an mtx file I created and got the following:

reading input graph: Data/hpec_coauthors.mtx LAGraph_mmread: bad type GrB failure: [5]

It would be helpful to provide more information regarding the error, especially the line number in the file it was parsing. I did not know if this is because I forgot to put 'general' in the header or if it was because I was incorrectly using zero based indices in my file. Bad on me as I changed both things at once and the error went away.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GraphBLAS/LAGraph/issues/21?email_source=notifications&email_token=AEYIIOLV3WGE3VJD4VG7QQLQDZJA5A5CNFSM4IKYUVOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HEQPWUQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AEYIIOMBPWSDEO5UYBXLQRLQDZJA5ANCNFSM4IKYUVOA .

DrTimothyAldenDavis commented 2 years ago

The messages are more informative now.