Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check and display proper usage of example executables #51

Open
rconnorlawson opened this issue Nov 14, 2019 · 0 comments · May be fixed by #52
Open

Check and display proper usage of example executables #51

rconnorlawson opened this issue Nov 14, 2019 · 0 comments · May be fixed by #52

Comments

@rconnorlawson
Copy link

Most test executables have the following command line form:

./hornet_xxx_test <graph> <batch_size>

This behavior is not documented. If you leave off the file argument, this error occurs:

HOST error
/home/rlawson6/workspace/hornet/xlib/src/Host/FileUtil.cpp(67) [ check_regular_file ]

Unable to read file

This is fairly straightforward to sort out, but it requires spelunking in the source code to figure out the command syntax.

If you leave off the batch size, however, this much more cryptic error occurs:

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
[1]    10646 abort (core dumped)  ./build/hornet_insert_test ../../example/rome99.gr

Since this is an uncaught exception, getting reasonable debug info out of GDB is challenging. As a new user, I had no way of knowing if this is due to operator error (it was) or due to some instability in the library itself. After some pain I discovered that one can get a reasonable exception call stack by breaking on __ctx_throw(), an internal C++ function that begins the exception handling procedure. Only then did I realize that, in fact, I just needed to supply a batch size on the command line.

A preferable and simple behavior would be to check for the correct number of arguments before continuing, and output a usage message if incorrect. This won't catch malformatted arguments, but it at least gives new users more of a signpost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant