rootmarks.C

Go to the documentation of this file.
00001 {
00002 //  Prints a summary of all ROOT benchmarks (must be run before)
00003 //  The ROOTMARK number printed is by reference to a Pentium IV 2.4 Ghz
00004 //  (with 512 MBytes memory and 120 GBytes IDE disk)
00005 //  taken by definition as 600 ROOTMARKS in batch mode in executing
00006 //     root -b -q benchmarks.C
00007 //
00008 
00009    Float_t rtall   = 0;
00010    Float_t cpall   = 0;
00011    Float_t norm    = 600;
00012    Float_t rtmark,cpmark;
00013    Bool_t batch = gROOT->IsBatch();
00014 
00015    printf("---------------ROOT %s benchmarks summary--------------------\n",gROOT->GetVersion());
00016    gBenchmark->Summary(rtall,cpall);
00017    printf("\n---------------ROOT %s benchmarks summary (in ROOTMARKS)-----\n",gROOT->GetVersion());
00018    printf("   For comparison, a Pentium IV 2.4Ghz is benchmarked at 600 ROOTMARKS\n");
00019    Float_t hsimple_rt = gBenchmark->GetRealTime("hsimple");
00020    Float_t hsimple_ct = gBenchmark->GetCpuTime("hsimple");
00021    if (hsimple_rt > 0) {
00022       if (batch) {
00023          rtmark = norm*(0.29/hsimple_rt);
00024          cpmark = norm*(0.28/hsimple_ct);
00025       } else {
00026          rtmark = norm*(0.99/hsimple_rt);
00027          cpmark = norm*(0.43/hsimple_ct);
00028       }
00029       printf("hsimple     = %7.2f RealMARKS,  = %7.2f CpuMARKS\n",rtmark,cpmark);
00030    }
00031 
00032    Float_t hsum_rt = gBenchmark->GetRealTime("hsum");
00033    Float_t hsum_ct = gBenchmark->GetCpuTime("hsum");
00034    if (hsum_rt > 0) {
00035       if (batch) {
00036          rtmark = norm*(0.16/hsum_rt);
00037          cpmark = norm*(0.15/hsum_ct);
00038       } else {
00039          rtmark = norm*(0.99/hsum_rt);
00040          cpmark = norm*(0.24/hsum_ct);
00041       }
00042       printf("hsum        = %7.2f RealMARKS,  = %7.2f CpuMARKS\n",rtmark,cpmark);
00043    }
00044 
00045    Float_t fillrandom_rt = gBenchmark->GetRealTime("fillrandom");
00046    Float_t fillrandom_ct = gBenchmark->GetCpuTime("fillrandom");
00047    if (fillrandom_rt > 0) {
00048       if (batch) {
00049          rtmark = norm*(0.02/fillrandom_rt);
00050          cpmark = norm*(0.01/fillrandom_ct);
00051       } else {
00052          rtmark = norm*(0.48/fillrandom_rt);
00053          cpmark = norm*(0.04/fillrandom_ct);
00054       }
00055       printf("fillrandom  = %7.2f RealMARKS,  = %7.2f CpuMARKS\n",rtmark,cpmark);
00056    }
00057 
00058    Float_t fit1_rt = gBenchmark->GetRealTime("fit1");
00059    Float_t fit1_ct = gBenchmark->GetCpuTime("fit1");
00060    if (fit1_rt > 0) {
00061       if (batch) {
00062          rtmark = norm*(0.04/fit1_rt);
00063          cpmark = norm*(0.03/fit1_ct);
00064       } else {
00065          rtmark = norm*(0.13/fit1_rt);
00066          cpmark = norm*(0.03/fit1_ct);
00067       }
00068       printf("fit1        = %7.2f RealMARKS,  = %7.2f CpuMARKS\n",rtmark,cpmark);
00069    }
00070 
00071    Float_t tornado_rt = gBenchmark->GetRealTime("tornado");
00072    Float_t tornado_ct = gBenchmark->GetCpuTime("tornado");
00073    if (tornado_rt > 0) {
00074       if (batch) {
00075          rtmark = norm*(0.05/tornado_rt);
00076          cpmark = norm*(0.04/tornado_ct);
00077       } else {
00078          rtmark = norm*(0.11/tornado_rt);
00079          cpmark = norm*(0.03/tornado_ct);
00080       }
00081       printf("tornado     = %7.2f RealMARKS,  = %7.2f CpuMARKS\n",rtmark,cpmark);
00082    }
00083 
00084    Float_t na49_rt = gBenchmark->GetRealTime("na49");
00085    Float_t na49_ct = gBenchmark->GetCpuTime("na49");
00086    if (na49_rt > 0) {
00087       rtmark = norm*(1.39/na49_rt);
00088       cpmark = norm*(1.39/na49_ct);
00089       printf("na49        = %7.2f RealMARKS,  = %7.2f CpuMARKS\n",rtmark,cpmark);
00090    }
00091 
00092    Float_t geometry_rt = gBenchmark->GetRealTime("geometry");
00093    Float_t geometry_ct = gBenchmark->GetCpuTime("geometry");
00094    if (geometry_rt > 0) {
00095       rtmark = norm*(0.19/geometry_rt);
00096       cpmark = norm*(0.18/geometry_ct);
00097       printf("geometry    = %7.2f RealMARKS,  = %7.2f CpuMARKS\n",rtmark,cpmark);
00098    }
00099 
00100    Float_t na49view_rt = gBenchmark->GetRealTime("na49view");
00101    Float_t na49view_ct = gBenchmark->GetCpuTime("na49view");
00102    if (na49view_rt > 0) {
00103       if (batch) {
00104          rtmark = norm*(0.03/na49view_rt);
00105          cpmark = norm*(0.03/na49view_ct);
00106       } else {
00107          rtmark = norm*(0.33/na49view_rt);
00108          cpmark = norm*(0.05/na49view_ct);
00109       }
00110       printf("na49view    = %7.2f RealMARKS,  = %7.2f CpuMARKS\n",rtmark,cpmark);
00111    }
00112 
00113    Float_t ntuple1_rt = gBenchmark->GetRealTime("ntuple1");
00114    Float_t ntuple1_ct = gBenchmark->GetCpuTime("ntuple1");
00115    if (ntuple1_rt > 0) {
00116       if (batch) {
00117          rtmark = norm*(0.29/ntuple1_rt);
00118          cpmark = norm*(0.27/ntuple1_ct);
00119       } else {
00120          rtmark = norm*(1.79/ntuple1_rt);
00121          cpmark = norm*(0.28/ntuple1_ct);
00122       }
00123       printf("ntuple1     = %7.2f RealMARKS,  = %7.2f CpuMARKS\n",rtmark,cpmark);
00124    }
00125 
00126    if (rtall) {
00127       Float_t rtbrun, cpbrun;
00128       if (batch) {
00129          rtbrun    = 3.45;
00130          cpbrun    = 3.24;
00131       } else {
00132          rtbrun    = 5.79;
00133          cpbrun    = 4.08;
00134       }
00135       Float_t rootmarks = norm*(rtbrun+cpbrun)/(rtall+cpall);
00136       printf("\n");
00137       printf("****************************************************\n");
00138       printf("* Your machine is estimated at %7.2f ROOTMARKS   *\n",rootmarks);
00139       printf("****************************************************\n");
00140    } else {
00141       printf(" You must run the ROOT benchmarks before executing this command\n");
00142    }
00143 }

Generated on Tue Jul 5 15:45:10 2011 for ROOT_528-00b_version by  doxygen 1.5.1