--- trunk/uoms/src/utils/data_print.upc 2010/11/29 18:07:07 14 +++ trunk/uoms/src/utils/data_print.upc 2010/11/30 13:05:36 15 @@ -64,6 +64,9 @@ extern char * valid_bms[NUM_BMS]; extern int num_bms; extern int *bm_list; +extern int *bm_list; +extern uint64_t timeLimit; +extern int time_limit_set; /* Gets the aggreated bandwidth factor @@ -103,7 +106,7 @@ */ void print_usage(char *appname){ printf("\nUOMS usage:\n"); - printf("[Your UPC runtime launch command] %s [-help | -version | [-off_cache] [-warmup] [-reduce_op OP] [-sync_mode MODE] [-msglen FILE | [-minsize SIZE] [-maxsize SIZE] ] [-input FILE] [output_file]]\n",appname); + printf("[Your UPC runtime launch command] %s [-help | -version | [-off_cache] [-warmup] [-reduce_op OP] [-sync_mode MODE] [-msglen FILE | [-minsize SIZE] [-maxsize SIZE] ] [-time SECONDS] [-input FILE] [output_file]]\n",appname); printf("Where:\n"); printf("-help: Print this usage information and exits\n"); printf("-version: Print UOMS version and exits\n"); @@ -132,8 +135,9 @@ printf(" - UPC_IN_NOSYNC|UPC_OUT_MYSYNC\n"); printf(" - UPC_IN_NOSYNC|UPC_OUT_NOSYNC\n"); printf("-msglen FILE: Read user defined block sizes from FILE (in bytes). If specified it will override -minsize and -maxsize\n"); - printf("-minsize SIZE: Specifies the minimum block size (in bytes). Sizes will increase by a factor of 2\n"); - printf("-maxsize SIZE: Specifies the maximum block size (in bytes)\n"); + printf("-minsize SIZE: Specifies the minimum block size (in bytes). Sizes will increase by a factor of 2. Default is 4\n"); + printf("-maxsize SIZE: Specifies the maximum block size (in bytes). Default is 16MB\n"); + printf("-time SECONDS: Specifies the maximum run time in seconds for each block size. Disabled by default. Important: this setting will not interrupt an ongoing operation\n"); printf("-input FILE: Read user defined list of benchmarks to run from FILE\n"); printf("Valid benchmark names are:\n"); for(int i = 0; i < NUM_BMS; i++){ @@ -179,47 +183,51 @@ */ void UOMS_general_info(){ - time_t T; - struct utsname info; + time_t T; + struct utsname info; - time(&T); - uname( &info ); + time(&T); + uname( &info ); - fprintf(unit,"#---------------------------------------------------\n"); - fprintf(unit,"# UPC Operations Microbenchmark Suite V%s \n",VERSION); - fprintf(unit,"#---------------------------------------------------\n"); - fprintf(unit,"# Date : %s",asctime(localtime(&T))); - fprintf(unit,"# Machine : %s\n",info.machine); - fprintf(unit,"# System : %s\n",info.sysname); - fprintf(unit,"# Release : %s\n",info.release); - fprintf(unit,"\n"); + fprintf(unit,"#-----------------------------------------------------\n"); + fprintf(unit,"# UPC Operations Microbenchmark Suite V%s \n",VERSION); + fprintf(unit,"#-----------------------------------------------------\n"); + fprintf(unit,"# Date : %s",asctime(localtime(&T))); + fprintf(unit,"# Machine : %s\n",info.machine); + fprintf(unit,"# System : %s\n",info.sysname); + fprintf(unit,"# Release : %s\n",info.release); + fprintf(unit,"\n"); if(cache_invalidation == 1) - fprintf(unit,"# Cache invalidation : Enabled\n"); + fprintf(unit,"# Cache invalidation : Enabled\n"); else - fprintf(unit,"# Cache invalidation : Disabled\n"); - fprintf(unit,"\n"); + fprintf(unit,"# Cache invalidation : Disabled\n"); + fprintf(unit,"\n"); if(warmup == 1) - fprintf(unit,"# Warmup iteration : Enabled\n"); + fprintf(unit,"# Warmup iteration : Enabled\n"); else - fprintf(unit,"# Warmup iteration : Disabled\n"); - fprintf(unit,"\n"); + fprintf(unit,"# Warmup iteration : Disabled\n"); + fprintf(unit,"\n"); + if(time_limit_set == 1){ + fprintf(unit,"# Time limit per block size : %ld seconds\n",timeLimit); + fprintf(unit,"\n"); + } fprintf(unit,"# Problem sizes:\n"); for(int i = 0; i < num_sizes; i++){ fprintf(unit,"# %ld\n",sizes[i]); } - fprintf(unit,"\n"); - fprintf(unit,"# Synchronization mode : %s \n",char_sync_mode); - fprintf(unit,"\n"); - fprintf(unit,"# Reduce Op : %s \n",char_reduce_op); - fprintf(unit,"\n"); - fprintf(unit,"\n"); - fprintf(unit,"# List of Benchmarks to run:\n"); - fprintf(unit,"\n"); + fprintf(unit,"\n"); + fprintf(unit,"# Synchronization mode : %s \n",char_sync_mode); + fprintf(unit,"\n"); + fprintf(unit,"# Reduce Op : %s \n",char_reduce_op); + fprintf(unit,"\n"); + fprintf(unit,"\n"); + fprintf(unit,"# List of Benchmarks to run:\n"); + fprintf(unit,"\n"); for(int i = 0; i < num_bms; i++){ fprintf(unit,"# %s\n",valid_bms[bm_list[i]]); } - fprintf(unit,"\n"); + fprintf(unit,"\n"); }