@@ -258,7 +258,7 @@ void print_info (MPI_Info *info_used) {
258258}
259259
260260/*----< usage() >------------------------------------------------------------*/
261- static void usage (char * argv0 ) {
261+ static void usage (char * argv0 ) {
262262 char * help = "Usage: %s [OPTION] FILE\n\
263263 [-h] Print this help message\n\
264264 [-v] Verbose mode\n\
@@ -281,6 +281,8 @@ static void usage (char *argv0) {
281281 [-g num] Number of subfiles, used by Log-based VOL and ADIOS I/O only,\n\
282282 -1 for one subfile per compute node, 0 to disable subfiling,\n\
283283 (default: 0).\n\
284+ [-e num] Artificially increase the problem size num times, by\n\
285+ multiplying the last dimesnion size by num. (default: 1)\n\
284286 [-t time] Add sleep time to emulate the computation in order to \n\
285287 overlapping I/O when Async VOL is used.\n\
286288 [-i path] Input file path (folder name when subfiling is used, file\n\
@@ -365,6 +367,7 @@ int main (int argc, char **argv) {
365367 cfg .xtype = NC_DOUBLE ;
366368 cfg .sort_reqs = 1 ;
367369 cfg .isReqSorted = 0 ;
370+ cfg .factor = 1 ;
368371
369372 for (i = 0 ; i < MAX_NUM_DECOMP ; i ++ ) {
370373 cfg .G_case .nvars_D [i ] = 0 ;
@@ -388,7 +391,7 @@ int main (int argc, char **argv) {
388391 ffreq = 1 ;
389392
390393 /* command-line arguments */
391- while ((i = getopt (argc , argv , "vkur:s:o:i:jmqf:ha:x:g:y:pt:" )) != EOF )
394+ while ((i = getopt (argc , argv , "vkur:s:o:i:jmqf:ha:x:g:y:pt:e: " )) != EOF )
392395 switch (i ) {
393396 case 'v' :
394397 cfg .verbose = 1 ;
@@ -409,48 +412,48 @@ int main (int argc, char **argv) {
409412 cfg .io_stride = atoi (optarg );
410413 break ;
411414 case 'a' :
412- if (strcmp (optarg , "pnetcdf" ) == 0 )
415+ if (strcmp (optarg , "pnetcdf" ) == 0 )
413416 cfg .api = pnetcdf ;
414- else if (strcmp (optarg , "hdf5" ) == 0 )
417+ else if (strcmp (optarg , "hdf5" ) == 0 )
415418 cfg .api = hdf5 ;
416- else if (strcmp (optarg , "hdf5_md" ) == 0 )
419+ else if (strcmp (optarg , "hdf5_md" ) == 0 )
417420 cfg .api = hdf5_md ;
418- else if (strcmp (optarg , "hdf5_log" ) == 0 )
421+ else if (strcmp (optarg , "hdf5_log" ) == 0 )
419422 cfg .api = hdf5_log ;
420- else if (strcmp (optarg , "netcdf4" ) == 0 )
423+ else if (strcmp (optarg , "netcdf4" ) == 0 )
421424 cfg .api = netcdf4 ;
422- else if (strcmp (optarg , "adios" ) == 0 )
425+ else if (strcmp (optarg , "adios" ) == 0 )
423426 cfg .api = adios ;
424427 else
425428 ERR_OUT ("Unknown API" )
426429 break ;
427430 /*
428431 case 'l':
429- if (strcmp (optarg, "contig") == 0)
432+ if (strcmp(optarg, "contig") == 0)
430433 cfg.layout = contig;
431- else if (strcmp (optarg, "chunk") == 0)
434+ else if (strcmp(optarg, "chunk") == 0)
432435 cfg.layout = chunk;
433436 else
434437 ERR_OUT("Unknown layout")
435438 break;
436439 */
437440 case 'x' :
438- if (strcmp (optarg , "canonical" ) == 0 )
441+ if (strcmp (optarg , "canonical" ) == 0 )
439442 cfg .strategy = canonical ;
440- else if (strcmp (optarg , "log" ) == 0 )
443+ else if (strcmp (optarg , "log" ) == 0 )
441444 cfg .strategy = log ;
442- else if (strcmp (optarg , "blob" ) == 0 )
445+ else if (strcmp (optarg , "blob" ) == 0 )
443446 cfg .strategy = blob ;
444447 else
445448 ERR_OUT ("Unknown I/O strategy" )
446449 break ;
447450
448451 case 'o' :
449- strncpy (cfg .out_path , optarg , E3SM_IO_MAX_PATH );
452+ strncpy (cfg .out_path , optarg , E3SM_IO_MAX_PATH );
450453 cfg .wr = 1 ;
451454 break ;
452455 case 'i' :
453- strncpy (cfg .in_path , optarg , E3SM_IO_MAX_PATH );
456+ strncpy (cfg .in_path , optarg , E3SM_IO_MAX_PATH );
454457 cfg .rd = 1 ;
455458 break ;
456459 case 'm' :
@@ -485,24 +488,27 @@ int main (int argc, char **argv) {
485488 cfg .profiling = 1 ;
486489 break ;
487490 case 'z' :
488- if (strcmp (optarg , "deflate" ) == 0 )
491+ if (strcmp (optarg , "deflate" ) == 0 )
489492 cfg .filter = deflate ;
490- else if (strcmp (optarg , "zlib" ) == 0 )
493+ else if (strcmp (optarg , "zlib" ) == 0 )
491494 cfg .filter = deflate ;
492495 else
493496 ERR_OUT ("Unknown filter" )
494497 break ;
498+ case 'e' :
499+ cfg .factor = atoi (optarg );
500+ break ;
495501 case 'h' :
496502 default :
497- if (cfg .rank == 0 ) usage (argv [0 ]);
503+ if (cfg .rank == 0 ) usage (argv [0 ]);
498504 goto err_out ;
499505 }
500506
501507 if (optind >= argc || argv [optind ] == NULL ) { /* input file is mandatory */
502- if (!cfg .rank ) usage (argv [0 ]);
508+ if (!cfg .rank ) usage (argv [0 ]);
503509 ERR_OUT ("Decomposition file not provided" )
504510 }
505- strncpy (cfg .decomp_path , argv [optind ], E3SM_IO_MAX_PATH );
511+ strncpy (cfg .decomp_path , argv [optind ], E3SM_IO_MAX_PATH );
506512
507513 cfg .F_case_h0 .nrecs = 1 ; /* force only one record for F h0 case */
508514 cfg .F_case_h1 .nrecs = nrecs ;
0 commit comments