示例#1
0
System::Void Make_Balcon(std::ofstream& out, int x, int y) {
	Make_Line(out, x, y, x, y - 10);
	Make_Line(out, x, y, x + 30, y);
	Make_Line(out, x + 30, y, x + 30, y - 10);
	Make_Line(out, x, y - 10, x + 30, y - 10);
	Make_Line(out, x + 10, y - 10, x + 20, y - 10);
	Make_Line(out, x + 10, y - 10, x + 10, y - 30);
	Make_Line(out, x + 20, y - 10, x + 20, y - 30);
	Make_Line(out, x + 10, y - 30, x + 20, y - 30);
}
示例#2
0
System::Void Make_Asset(std::ofstream& out, int x, int y) {
	Make_Line(out, x, y, x, y - 5);
	Make_Line(out, x, y, x + 40, y);
	Make_Line(out, x + 40, y, x + 40, y - 5);
	Make_Line(out, x, y - 5, x + 40, y - 5);
	Make_Line(out, x + 20, y - 5, x + 20, y - 20);
	Make_Line(out, x, y - 20, x + 20, y - 30);
	Make_Line(out, x + 40, y - 20, x + 20, y - 30);
	Make_Line(out, x, y - 20, x + 40, y - 20);
}
示例#3
0
System::Void Make_House(std::ofstream& out) {
	Make_Line(out, 80, 0, 210, 0);
	Make_Line(out, 80, 150, 210, 150);
	Make_Line(out, 80, 0, 80, 150);
	Make_Line(out, 210, 0, 210, 150);
	Make_Line(out, 140, 120, 160, 120);
	Make_Line(out, 140, 120, 140, 150);
	Make_Line(out, 160, 120, 160, 150);
}
示例#4
0
void Output(struct comm_info* c_info,struct Bench* Bmark,MODES BMODE,
	    int tmp_NP, int header,int size,int n_sample,double *time)
/*****************************************************************/

/*-----------------------------------------------------------------
             VARIABLE |       TYPE        |   MEANING
-------------------------------------------------------------------
Input      :  c_info  | struct comm_info* | see comm_info.h 
              Bmark   | struct Bench*     | current enchmark
              tmp_NP  | int               | number of nodes
	      header  | int               | first call or not (header flag)
              size    | int               | message length in byte
	      n_sample| int               | repetition count
	      time    | double*           | time of measurement
	              |                   |
Output     :          |                   |
                      |                   |
In/Out     :  -       | -                 | -
                      |                   |  
-------------------------------------------------------------------
-------------------------------------------------------------------
Description: Output of results (header and bare data of measurement)
-----------------------------------------------------------------*/
{
  double scaled_time[MAX_TIMINGS];
  
  int DO_OUT;
  int GROUP_OUT;
  int i,i_gr;
  int li_len;
  int edit_type;
  
  ierr = 0;

  DO_OUT    = (c_info->w_rank  == 0 );
  GROUP_OUT = (c_info->group_mode > 0 );

  if (DO_OUT) 
    {
      if(!all_times)
	{
          all_times = 
  (double*)v_alloc(c_info->w_num_procs * Bmark->Ntimes * sizeof(double), 
                  "Output 1");
	}
#ifdef CHECK
      if(!all_defect)
	{
          all_defect = (double*)v_alloc(c_info->w_num_procs * sizeof(double), 
                  "Output 1");
          for(i=0; i<c_info->w_num_procs; i++) all_defect[i]=0.;
	}
#endif  	  
    }

/* Scale the timings */
  for(i=0; i<Bmark->Ntimes;  i++)
  scaled_time[i] = time[i] * SCALE * Bmark->scale_time;


/* collect all times  */
  ierr=MPI_Gather(scaled_time,Bmark->Ntimes,MPI_DOUBLE,all_times,Bmark->Ntimes,MPI_DOUBLE,0,MPI_COMM_WORLD);
  MPI_ERRHAND(ierr);

#ifdef CHECK      
/* collect all defects */	      
  ierr=MPI_Gather(&defect,1,MPI_DOUBLE,all_defect,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
  MPI_ERRHAND(ierr);

#endif
  if( DO_OUT )
    {
      BTYPES type= Bmark->RUN_MODES[0].type;
      if ( Bmark->RUN_MODES[0].NONBLOCKING )
           edit_type = 4;
      else if ( type == SingleTransfer && c_info->group_mode != 0 )
           edit_type=0;
      else if ( type == ParallelTransfer || type == SingleTransfer )
           edit_type=1;
      else if (type == Collective )
#ifdef MPIIO
           edit_type=1;
#else
           edit_type=2;
#endif
      else 
           edit_type=3;

      if( header )
	{
        fprintf(unit,"\n");            /* FOR GNUPLOT: CURVE SEPERATOR  */


          if( GROUP_OUT ) {strcpy(aux_string,"&Group") ; li_len=1;}
          else            {strcpy(aux_string,"");  li_len=0;}
	  if ( edit_type == 0 )
	    {
	      li_len+=4;
	      strcat(aux_string,"&#bytes&#repetitions&t[usec]&Mbytes/sec&");
	    }
	  else if ( edit_type == 1 )
	    {
	      li_len+=6;
	      strcat(aux_string,
		     "&#bytes&#repetitions&t_min[usec]&t_max[usec]&t_avg[usec]&Mbytes/sec&");
	    }
	  else if ( edit_type == 2 )
	    {
	      li_len+=5;
	      strcat(aux_string,
		     "&#bytes&#repetitions&t_min[usec]&t_max[usec]&t_avg[usec]&");
	    }
	  else if ( edit_type == 3 )
	    {
	      li_len+=4;
	      strcat(aux_string,
		     "&#repetitions&t_min[usec]&t_max[usec]&t_avg[usec]&");
	    }
          else
            {
	      li_len+=6;
	      strcat(aux_string,
		     "&#bytes&#repetitions&t_ovrl[usec]&t_pure[usec]&t_CPU[usec]& overlap[%]&");
            }
#ifdef CHECK
          if( Bmark->RUN_MODES[0].type != Sync &&
              strcmp(Bmark->name,"Window") )
          {
	  li_len+=1;
	  strcat(aux_string,"&defects&");
          }
#endif
        Make_Line(li_len);
        if( c_info->n_groups > 1) 
        fprintf(unit,"# Benchmarking Multi-%s ",Bmark->name);
        else
        fprintf(unit,"# Benchmarking %s ",Bmark->name);
        Show_Procids(c_info); 

        Make_Line(li_len);

        switch(BMODE->AGGREGATE)
          {
          case 1:
          fprintf(unit,"#\n#    MODE: AGGREGATE \n#\n");
          break;
          case 0:
          fprintf(unit,"#\n#    MODE: NON-AGGREGATE \n#\n");
          break;
          }
	  Print_Headlines(c_info,tmp_NP,Bmark->name,li_len,aux_string);
	}     



      if( GROUP_OUT )
      {


      for( i_gr=0; i_gr<c_info->n_groups; i_gr++ )
	{
	  if(i_gr == 0) fprintf(unit,"\n");

    	  Display_Times(Bmark, all_times, c_info, i_gr, n_sample, size, edit_type);
	} 
      }
      else
    	  Display_Times(Bmark, all_times, c_info,  0, n_sample, size, edit_type);
    } 
示例#5
0
System::Void Make_Window(std::ofstream& out, int x, int y) {
	Make_Line(out, x, y, x, y - 30);
	Make_Line(out, x, y, x + 10, y);
	Make_Line(out, x + 10, y, x + 10, y - 30);
	Make_Line(out, x, y - 30, x + 10, y - 30);
}