Log In | Get Help   
Home My Page Projects Code Snippets Project Openings UPC Operations Microbenchmarking Suite
Summary Activity Tracker Lists Docs News SCM Files
[uoms] Diff of /trunk/uoms/src/utils/data_print.upc
[uoms] / trunk / uoms / src / utils / data_print.upc Repository:
ViewVC logotype

Diff of /trunk/uoms/src/utils/data_print.upc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7, Fri Apr 23 09:49:46 2010 UTC revision 15, Tue Nov 30 13:05:36 2010 UTC
# Line 1  Line 1 
1  /*****************************************************************************/  /******************************************************************************/
2  /*                                                                           */  /*                                                                           */
3  /*  Copyright (c) 2008, 2009, 2010                                           */  /*  Copyright (c) 2008, 2009, 2010                                           */
4  /*                         Computer Architecture Group (CAG)                 */  /*                         Computer Architecture Group (CAG)                 */
# Line 24  Line 24 
24  /*  You should have received a copy of the GNU Lesser General Public License */  /*  You should have received a copy of the GNU Lesser General Public License */
25  /*  along with UOMS.  If not, see <http://www.gnu.org/licenses/>.            */  /*  along with UOMS.  If not, see <http://www.gnu.org/licenses/>.            */
26  /*                                                                           */  /*                                                                           */
27  /*****************************************************************************/  /******************************************************************************/
28    
29  /*****************************************************************************/  /******************************************************************************/
30  /*                                                                           */  /*                                                                           */
31  /*    FUNDING: This development has been funded by Hewlett-Packard Spain     */  /*    FUNDING: This development has been funded by Hewlett-Packard Spain     */
32  /*                                                                           */  /*                                                                           */
# Line 35  Line 35 
35  /*    Subproject:                                                            */  /*    Subproject:                                                            */
36  /*     Improving UPC Usability and  Performance in Constellation Systems:    */  /*     Improving UPC Usability and  Performance in Constellation Systems:    */
37  /*     Implementation/Extensions of UPC Libraries.                           */  /*     Implementation/Extensions of UPC Libraries.                           */
38  /*     (UPCPU­Project -> UPC Performance and Usability Project)               */  /*     (UPCPUProject -> UPC Performance and Usability Project)                */
39  /*                                                                           */  /*                                                                           */
40  /*****************************************************************************/  /******************************************************************************/
41    
42  /*****************************************************************************  /******************************************************************************
43    
44    For further documentation, see    For further documentation, see
45    
46    [1] Files under doc/    [1] Files under doc/
47    
48  ******************************************************************************/  *******************************************************************************/
49    
50  #include <stdio.h>  #include <stdio.h>
51  #include <time.h>  #include <time.h>
# Line 64  Line 64 
64  extern char * valid_bms[NUM_BMS];  extern char * valid_bms[NUM_BMS];
65  extern int num_bms;  extern int num_bms;
66  extern int *bm_list;  extern int *bm_list;
67    extern int *bm_list;
68    extern uint64_t timeLimit;
69    extern int time_limit_set;
70    
71  /*  /*
72          Gets the aggreated bandwidth factor          Gets the aggreated bandwidth factor
# Line 73  Line 76 
76          double factor=1.0;          double factor=1.0;
77    
78          switch (operation_code) {          switch (operation_code) {
79            case FORALL_R:
80            case FORALL_W:
81            case FORALL_RW:
82            case FOR_R:
83            case FOR_W:
84            case FOR_RW:
85          case BROADCAST:          case BROADCAST:
86            case SCATTER:
87            case GATHER:
88            case PERMUTE:
89                  factor = THREADS;                  factor = THREADS;
90                          break;                          break;
91          case EXCHANGE:          case EXCHANGE:
# Line 82  Line 94 
94            case GATHERALL:            case GATHERALL:
95                  factor = THREADS+THREADS*THREADS;                  factor = THREADS+THREADS*THREADS;
96                          break;                          break;
         case SCATTER:  
                 factor = THREADS;  
                         break;  
           case GATHER:  
                 factor = THREADS;  
                         break;  
         case PERMUTE:  
                 factor = THREADS;  
                         break;  
97          default:          default:
98                          factor = 1.0;                          factor = 1.0;
99                          break;                          break;
# Line 103  Line 106 
106  */  */
107  void print_usage(char *appname){  void print_usage(char *appname){
108          printf("\nUOMS usage:\n");          printf("\nUOMS usage:\n");
109          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);
110          printf("Where:\n");          printf("Where:\n");
111          printf("-help: Print this usage information and exits\n");          printf("-help: Print this usage information and exits\n");
112          printf("-version: Print UOMS version and exits\n");          printf("-version: Print UOMS version and exits\n");
# Line 132  Line 135 
135          printf(" - UPC_IN_NOSYNC|UPC_OUT_MYSYNC\n");          printf(" - UPC_IN_NOSYNC|UPC_OUT_MYSYNC\n");
136          printf(" - UPC_IN_NOSYNC|UPC_OUT_NOSYNC\n");          printf(" - UPC_IN_NOSYNC|UPC_OUT_NOSYNC\n");
137          printf("-msglen FILE: Read user defined block sizes from FILE (in bytes). If specified it will override -minsize and -maxsize\n");          printf("-msglen FILE: Read user defined block sizes from FILE (in bytes). If specified it will override -minsize and -maxsize\n");
138          printf("-minsize SIZE: Specifies the minimum block size (in bytes). Sizes will increase by a factor of 2\n");          printf("-minsize SIZE: Specifies the minimum block size (in bytes). Sizes will increase by a factor of 2. Default is 4\n");
139          printf("-maxsize SIZE: Specifies the maximum block size (in bytes)\n");          printf("-maxsize SIZE: Specifies the maximum block size (in bytes). Default is 16MB\n");
140            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");
141          printf("-input FILE: Read user defined list of benchmarks to run from FILE\n");          printf("-input FILE: Read user defined list of benchmarks to run from FILE\n");
142          printf("Valid benchmark names are:\n");          printf("Valid benchmark names are:\n");
143          for(int i = 0; i < NUM_BMS; i++){          for(int i = 0; i < NUM_BMS; i++){
# Line 186  Line 190 
190    uname( &info );    uname( &info );
191    
192    
193    fprintf(unit,"#---------------------------------------------------\n");          fprintf(unit,"#-----------------------------------------------------\n");
194    fprintf(unit,"#    UPC Operations Microbenchmark Suite V%s             \n",VERSION);    fprintf(unit,"#    UPC Operations Microbenchmark Suite V%s             \n",VERSION);
195    fprintf(unit,"#---------------------------------------------------\n");          fprintf(unit,"#-----------------------------------------------------\n");
196    fprintf(unit,"# Date                  : %s",asctime(localtime(&T)));    fprintf(unit,"# Date                  : %s",asctime(localtime(&T)));
197    fprintf(unit,"# Machine               : %s\n",info.machine);    fprintf(unit,"# Machine               : %s\n",info.machine);
198    fprintf(unit,"# System                : %s\n",info.sysname);    fprintf(unit,"# System                : %s\n",info.sysname);
# Line 204  Line 208 
208          else          else
209            fprintf(unit,"# Warmup iteration      : Disabled\n");            fprintf(unit,"# Warmup iteration      : Disabled\n");
210    fprintf(unit,"\n");    fprintf(unit,"\n");
211            if(time_limit_set == 1){
212                    fprintf(unit,"# Time limit per block size : %ld seconds\n",timeLimit);
213                    fprintf(unit,"\n");
214            }
215          fprintf(unit,"# Problem sizes:\n");          fprintf(unit,"# Problem sizes:\n");
216          for(int i = 0; i < num_sizes; i++){          for(int i = 0; i < num_sizes; i++){
217                  fprintf(unit,"# %ld\n",sizes[i]);                  fprintf(unit,"# %ld\n",sizes[i]);
# Line 228  Line 236 
236  char *funcname;  char *funcname;
237    
238   switch (operation) {   switch (operation) {
239                    case FORALL_R:
240                    case FORALL_W:
241                    case FORALL_RW:
242                    case FOR_R:
243                    case FOR_W:
244                    case FOR_RW:
245     case BROADCAST:     case BROADCAST:
246     case SCATTER:     case SCATTER:
247     case GATHER:     case GATHER:

Legend:
Removed from v.7  
changed lines
  Added in v.15

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge