Help text now outputs *compiled* APIs.

master
Julian M. Kunkel 2018-08-15 17:07:17 +01:00
parent 990a6ccf32
commit 4dcf36c1a4
4 changed files with 32 additions and 4 deletions

View File

@ -61,6 +61,17 @@ ior_aiori_t *available_aiori[] = {
NULL
};
void aiori_supported_apis(char * APIs){
ior_aiori_t **tmp = available_aiori;
if(*tmp != NULL){
APIs += sprintf(APIs, "%s", (*tmp)->name);
tmp++;
for (; *tmp != NULL; ++tmp) {
APIs += sprintf(APIs, "|%s", (*tmp)->name);
}
}
}
/**
* Default statfs implementation.
*

View File

@ -101,6 +101,7 @@ void aiori_initialize();
void aiori_finalize();
const ior_aiori_t *aiori_select (const char *api);
int aiori_count (void);
void aiori_supported_apis(char * APIs);
const char *aiori_default (void);
/* some generic POSIX-based backend calls */

View File

@ -1302,13 +1302,18 @@ void file_test(const int iteration, const int ntasks, const char *path, rank_pro
void print_help (void) {
int j;
char APIs[1024];
aiori_supported_apis(APIs);
char apiStr[1024];
sprintf(apiStr, "API for I/O [%s]", APIs);
fprintf(out_logfile,
"Usage: mdtest [-b branching_factor] [-B] [-c] [-C] [-d testdir] [-D] [-e number_of_bytes_to_read]\n"
" [-E] [-f first] [-F] [-h] [-i iterations] [-I items_per_dir] [-l last] [-L]\n"
" [-n number_of_items] [-N stride_length] [-p seconds] [-r]\n"
" [-R[seed]] [-s stride] [-S] [-t] [-T] [-u] [-v] [-a API]\n"
" [-V verbosity_value] [-w number_of_bytes_to_write] [-W seconds] [-y] [-z depth] -Z\n"
"\t-a: API for I/O [POSIX|MPIIO|HDF5|HDFS|S3|S3_EMC|NCMPI|RADOS]\n"
"\t-a: %s\n"
"\t-b: branching factor of hierarchical directory structure\n"
"\t-B: no barriers between phases\n"
"\t-c: collective creates: task 0 does all creates\n"
@ -1341,7 +1346,8 @@ void print_help (void) {
"\t-x: StoneWallingStatusFile; contains the number of iterations of the creation phase, can be used to split phases across runs\n"
"\t-y: sync file after writing\n"
"\t-z: depth of hierarchical directory structure\n"
"\t-Z: print time instead of rate\n"
"\t-Z: print time instead of rate\n",
apiStr
);
MPI_Initialized(&j);
@ -2163,8 +2169,13 @@ mdtest_results_t * mdtest_run(int argc, char **argv, MPI_Comm world_com, FILE *
int no_barriers = 0;
char * path = "./out";
int randomize = 0;
char APIs[1024];
aiori_supported_apis(APIs);
char apiStr[1024];
sprintf(apiStr, "API for I/O [%s]", APIs);
option_help options [] = {
{'a', NULL, "API for I/O [POSIX|MPIIO|HDF5|HDFS|S3|S3_EMC|NCMPI|RADOS]", OPTION_OPTIONAL_ARGUMENT, 's', & backend_name},
{'a', NULL, apiStr, OPTION_OPTIONAL_ARGUMENT, 's', & backend_name},
{'b', NULL, "branching factor of hierarchical directory structure", OPTION_OPTIONAL_ARGUMENT, 'd', & branch_factor},
{'d', NULL, "the directory in which the tests will run", OPTION_OPTIONAL_ARGUMENT, 's', & path},
{'B', NULL, "no barriers between phases", OPTION_OPTIONAL_ARGUMENT, 'd', & no_barriers},

View File

@ -437,8 +437,13 @@ IOR_test_t *ParseCommandLine(int argc, char **argv)
init_IOR_Param_t(& initialTestParams);
parameters = & initialTestParams;
char APIs[1024];
aiori_supported_apis(APIs);
char apiStr[1024];
sprintf(apiStr, "API for I/O [%s]", APIs);
option_help options [] = {
{'a', NULL, "API for I/O [POSIX|MPIIO|HDF5|HDFS|S3|S3_EMC|NCMPI|RADOS]", OPTION_OPTIONAL_ARGUMENT, 's', & initialTestParams.api},
{'a', NULL, apiStr, OPTION_OPTIONAL_ARGUMENT, 's', & initialTestParams.api},
{'A', NULL, "refNum -- user supplied reference number to include in the summary", OPTION_OPTIONAL_ARGUMENT, 'd', & initialTestParams.referenceNumber},
{'b', NULL, "blockSize -- contiguous bytes to write per task (e.g.: 8, 4k, 2m, 1g)", OPTION_OPTIONAL_ARGUMENT, 'l', & initialTestParams.blockSize},
{'B', NULL, "useO_DIRECT -- uses O_DIRECT for POSIX, bypassing I/O buffers", OPTION_FLAG, 'd', & initialTestParams.useO_DIRECT},