Esempio n. 1
0
void print_perf(FILE *out,double nodetime,double realtime,int nprocs,
		int nsteps,real delta_t,
		double nbfs,double mflop)
{
  real runtime;

  fprintf(out,"\n");

  if (nodetime == 0.0) {
    fprintf(out,"nodetime = 0! Infinite Giga flopses!\n");
  }

  if (nprocs > 1) 
  {
      nodetime = realtime;
      fprintf(out,"\tParallel run - timing based on wallclock.\n\n");
  }

  if ((nodetime > 0) && (realtime > 0)) {
    fprintf(out,"%12s %10s %10s %8s\n","","NODE (s)","Real (s)","(%)");
    fprintf(out,"%12s %10.3f %10.3f %8.1f\n","Time:",
	    nodetime, realtime, 100.0*nodetime/realtime);
    if (nodetime > 60) {
      fprintf(out,"%12s %10s","","");
      pr_difftime(out,nodetime);
    }
    if (delta_t > 0) {
      mflop = mflop/nodetime;
      runtime = nsteps*delta_t;
      fprintf(out,"%12s %10s %10s %10s %10s\n",
	      "","(Mnbf/s)",(mflop > 1000) ? "(GFlops)" : "(MFlops)",
	      "(ns/day)","(hour/ns)");
      fprintf(out,"%12s %10.3f %10.3f %10.3f %10.3f\n","Performance:",
	      nbfs/nodetime,(mflop > 1000) ? (mflop/1000) : mflop,
	      runtime*24*3.6/nodetime,1000*nodetime/(3600*runtime));
    } else {
      fprintf(out,"%12s %10s %10s %14s\n",
	      "","(Mnbf/s)",(mflop > 1000) ? "(GFlops)" : "(MFlops)",
	      "(steps/hour)");
      fprintf(out,"%12s %10.3f %10.3f %14.1f\n","Performance:",
	      nbfs/nodetime,(mflop > 1000) ? (mflop/1000) : mflop,
	      nsteps*3600.0/nodetime);
    }
  }
}
Esempio n. 2
0
void print_perf(FILE *out, double time_per_thread, double time_per_node,
                gmx_int64_t nsteps, double delta_t,
                double nbfs, double mflop)
{
    double wallclocktime;

    fprintf(out, "\n");

    if (time_per_node > 0)
    {
        fprintf(out, "%12s %12s %12s %10s\n", "", "Core t (s)", "Wall t (s)", "(%)");
        fprintf(out, "%12s %12.3f %12.3f %10.1f\n", "Time:",
                time_per_thread, time_per_node, 100.0*time_per_thread/time_per_node);
        /* only print day-hour-sec format if time_per_node is more than 30 min */
        if (time_per_node > 30*60)
        {
            fprintf(out, "%12s %12s", "", "");
            pr_difftime(out, time_per_node);
        }
        if (delta_t > 0)
        {
            mflop         = mflop/time_per_node;
            wallclocktime = nsteps*delta_t;

            if (getenv("GMX_DETAILED_PERF_STATS") == NULL)
            {
                fprintf(out, "%12s %12s %12s\n",
                        "", "(ns/day)", "(hour/ns)");
                fprintf(out, "%12s %12.3f %12.3f\n", "Performance:",
                        wallclocktime*24*3.6/time_per_node, 1000*time_per_node/(3600*wallclocktime));
            }
            else
            {
                fprintf(out, "%12s %12s %12s %12s %12s\n",
                        "", "(Mnbf/s)", (mflop > 1000) ? "(GFlops)" : "(MFlops)",
                        "(ns/day)", "(hour/ns)");
                fprintf(out, "%12s %12.3f %12.3f %12.3f %12.3f\n", "Performance:",
                        nbfs/time_per_node, (mflop > 1000) ? (mflop/1000) : mflop,
                        wallclocktime*24*3.6/time_per_node, 1000*time_per_node/(3600*wallclocktime));
            }
        }
        else
        {
            if (getenv("GMX_DETAILED_PERF_STATS") == NULL)
            {
                fprintf(out, "%12s %14s\n",
                        "", "(steps/hour)");
                fprintf(out, "%12s %14.1f\n", "Performance:",
                        nsteps*3600.0/time_per_node);
            }
            else
            {
                fprintf(out, "%12s %12s %12s %14s\n",
                        "", "(Mnbf/s)", (mflop > 1000) ? "(GFlops)" : "(MFlops)",
                        "(steps/hour)");
                fprintf(out, "%12s %12.3f %12.3f %14.1f\n", "Performance:",
                        nbfs/time_per_node, (mflop > 1000) ? (mflop/1000) : mflop,
                        nsteps*3600.0/time_per_node);
            }
        }
    }
}
Esempio n. 3
0
void print_perf(FILE *out, double nodetime, double realtime, int nprocs,
                gmx_large_int_t nsteps, real delta_t,
                double nbfs, double mflop,
                int omp_nth_pp)
{
    real runtime;

    fprintf(out, "\n");

    if (realtime > 0)
    {
        fprintf(out, "%12s %12s %12s %10s\n", "", "Core t (s)", "Wall t (s)", "(%)");
        fprintf(out, "%12s %12.3f %12.3f %10.1f\n", "Time:",
                nodetime, realtime, 100.0*nodetime/realtime);
        /* only print day-hour-sec format if realtime is more than 30 min */
        if (realtime > 30*60)
        {
            fprintf(out, "%12s %12s", "", "");
            pr_difftime(out, realtime);
        }
        if (delta_t > 0)
        {
            mflop   = mflop/realtime;
            runtime = nsteps*delta_t;

            if (getenv("GMX_DETAILED_PERF_STATS") == NULL)
            {
                fprintf(out, "%12s %12s %12s\n",
                        "", "(ns/day)", "(hour/ns)");
                fprintf(out, "%12s %12.3f %12.3f\n", "Performance:",
                        runtime*24*3.6/realtime, 1000*realtime/(3600*runtime));
            }
            else
            {
                fprintf(out, "%12s %12s %12s %12s %12s\n",
                        "", "(Mnbf/s)", (mflop > 1000) ? "(GFlops)" : "(MFlops)",
                        "(ns/day)", "(hour/ns)");
                fprintf(out, "%12s %12.3f %12.3f %12.3f %12.3f\n", "Performance:",
                        nbfs/realtime, (mflop > 1000) ? (mflop/1000) : mflop,
                        runtime*24*3.6/realtime, 1000*realtime/(3600*runtime));
            }
        }
        else
        {
            if (getenv("GMX_DETAILED_PERF_STATS") == NULL)
            {
                fprintf(out, "%12s %14s\n",
                        "", "(steps/hour)");
                fprintf(out, "%12s %14.1f\n", "Performance:",
                        nsteps*3600.0/realtime);
            }
            else
            {
                fprintf(out, "%12s %12s %12s %14s\n",
                        "", "(Mnbf/s)", (mflop > 1000) ? "(GFlops)" : "(MFlops)",
                        "(steps/hour)");
                fprintf(out, "%12s %12.3f %12.3f %14.1f\n", "Performance:",
                        nbfs/realtime, (mflop > 1000) ? (mflop/1000) : mflop,
                        nsteps*3600.0/realtime);
            }
        }
    }
}