Skip to content

Commit

Permalink
add version flag
Browse files Browse the repository at this point in the history
  • Loading branch information
uecker committed May 20, 2024
1 parent 2ceb0da commit 6d83e8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bart.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ static void parse_bart_opts(int* argcp, char*** argvp)
long param_end[DIMS] = { [0 ... DIMS - 1] = -1 };
const char* ref_file = NULL;
bool use_mpi = false;
bool version = false;

struct arg_s args[] = { };

Expand All @@ -151,10 +152,14 @@ static void parse_bart_opts(int* argcp, char*** argvp)
OPTL_INFILE('r', "ref-file", &ref_file, "<file>", "Obtain loop size from reference file"),
OPTL_SET('M', "mpi", &use_mpi, "Initialize MPI"),
OPT_SET('S', &mpi_shared_files, "Maps files from each rank (requires shared files system)"),
OPTL_SET(0, "version", &version, "print version"),
};

int next_arg = options(argcp, *argvp, "", help_str, ARRAY_SIZE(opts), opts, ARRAY_SIZE(args), args, true);

if (version)
debug_printf(DP_INFO, "%s\n", bart_version);

*argcp -= next_arg;
*argvp += next_arg;

Expand Down

0 comments on commit 6d83e8d

Please sign in to comment.