From f8d247c53c3c3bd94fed645b5b47a9096cadc123 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 10 Oct 2024 14:30:39 +0200 Subject: Removed "options" from solver selection Now the solver name fully determines the solver (and options) to be used. For example, now one must specify "h48h0k4" as the name of the solver. This PR also fixes a couple of things in tools. --- tools/100_checkdata/checkdata.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'tools/100_checkdata/checkdata.c') diff --git a/tools/100_checkdata/checkdata.c b/tools/100_checkdata/checkdata.c index 502925f..695a4dd 100644 --- a/tools/100_checkdata/checkdata.c +++ b/tools/100_checkdata/checkdata.c @@ -1,15 +1,15 @@ #include "../tool.h" #include "../expected_distributions.h" -char *solver, *options, *filename; +char *solver, *filename; static void run(void) { - int64_t size; + int64_t size, result; char *buf; FILE *f; - size = nissy_datasize(solver, options); + size = nissy_datasize(solver); if (size <= 0) { fprintf(stderr, "Error in datasize\n"); @@ -24,22 +24,23 @@ run(void) { buf = malloc(size); fread(buf, size, 1, f); fclose(f); - nissy_checkdata(solver, options, buf); + result = nissy_checkdata(solver, buf); free(buf); + printf("checkdata %s\n", result == 0 ? "succeeded" : "failed"); + /* TODO: cross-check with expected distributions? */ } int main(int argc, char **argv) { - if (argc < 4) { + if (argc < 3) { fprintf(stderr, "Error: not enough arguments. " - "A solver, its options and a file name must be given.\n"); + "A solver and a file name must be given.\n"); return 1; } solver = argv[1]; - options = argv[2]; - filename = argv[3]; + filename = argv[2]; nissy_setlogger(log_stderr); timerun(run); -- cgit v1.3