ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TProofBenchRunCPU.cxx
Go to the documentation of this file.
1 // @(#)root/proof:$Id$
2 // Author: Sangsu Ryu 22/06/2010
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /** \class TProofBenchRunCPU
13 \ingroup proofbench
14 
15 CPU-intensive PROOF benchmark test generates events and fill 1, 2, or 3-D histograms.
16 No I/O activity is involved.
17 
18 */
19 
20 #include "RConfigure.h"
21 
22 #include "TProofBenchRunCPU.h"
23 #include "TProofNodes.h"
24 #include "TProofPerfAnalysis.h"
25 #include "TFileCollection.h"
26 #include "TFileInfo.h"
27 #include "TProof.h"
28 #include "TString.h"
29 #include "Riostream.h"
30 #include "TMap.h"
31 #include "TEnv.h"
32 #include "TTree.h"
33 #include "TLeaf.h"
34 #include "TCanvas.h"
35 #include "TROOT.h"
36 #include "TH2.h"
37 #include "TF1.h"
38 #include "TProfile.h"
39 #include "TLegend.h"
40 #include "TKey.h"
41 #include "TRegexp.h"
42 #include "TPerfStats.h"
43 #include "TQueryResult.h"
44 #include "TMath.h"
45 #include "TStyle.h"
46 #include "TProofNodes.h"
47 #include "TGraphErrors.h"
48 #include "TLegend.h"
49 
51 
52 ////////////////////////////////////////////////////////////////////////////////
53 /// Default constructor
54 
56  TDirectory* dirproofbench, TProof* proof,
57  TProofNodes* nodes, Long64_t nevents, Int_t ntries,
58  Int_t start, Int_t stop, Int_t step, Int_t draw,
59  Int_t debug)
61  fHistType(histtype), fNHists(nhists),
62  fNEvents(nevents), fNTries(ntries), fStart(start), fStop(stop),
63  fStep(step), fDraw(draw), fDebug(debug), fDirProofBench(dirproofbench),
64  fNodes(nodes), fListPerfPlots(0),
65  fCanvas(0), fProfile_perfstat_event(0), fHist_perfstat_event(0),
66  fProfile_perfstat_evtmax(0), fNorm_perfstat_evtmax(0),
67  fProfile_queryresult_event(0), fNorm_queryresult_event(0), fProfile_cpu_eff(0),
68  fProfLegend(0), fNormLegend(0), fName(0)
69 {
70  if (TestBit(kInvalidObject)) {
71  Error("TProofBenchRunCPU", "problems validating PROOF session or enabling selector PAR");
72  return;
73  }
74 
75  fName = "CPU";
76 
77  if (!fNodes) fNodes = new TProofNodes(fProof);
78 
79  if (stop == -1) fStop = fNodes->GetNWorkersCluster();
80 
81  fListPerfPlots = new TList;
82 
83  gEnv->SetValue("Proof.StatsTrace",1);
84  gStyle->SetOptStat(0);
85 }
86 
87 ////////////////////////////////////////////////////////////////////////////////
88 /// Destructor
89 
91 {
92  fProof=0;
99 }
100 
101 ////////////////////////////////////////////////////////////////////////////////
102 /// Build histograms, profiles and graphs needed for this run
103 
105 {
106  TObject *o = 0;
107  Int_t quotient = (stop - start) / step;
108  Int_t ndiv = quotient + 1;
109  Double_t ns_min = start - step/2.;
110  Double_t ns_max = quotient*step + start + step/2.;
111 
112  fProfLegend = new TLegend(0.1, 0.8, 0.3, 0.9);
113  fNormLegend = new TLegend(0.7, 0.8, 0.9, 0.9);
114 
115  TString axtitle("Active Workers"), namelab(GetName()), sellab(GetSelName());
116  if (nx) {
117  axtitle = "Active Workers/Node";
118  namelab.Form("x_%s", GetName());
119  }
121  sellab.Form("%s_%s", GetSelName(), GetNameStem().Data());
122 
123  TString name, title;
124 
125  // Book perfstat profile (max evts)
126  name.Form("Prof_%s_PS_MaxEvts_%s", namelab.Data(), sellab.Data());
127  title.Form("Profile %s PerfStat Event - %s", namelab.Data(), sellab.Data());
128  fProfile_perfstat_evtmax = new TProfile(name, title, ndiv, ns_min, ns_max);
130  fProfile_perfstat_evtmax->GetYaxis()->SetTitle("Events/sec");
134  if ((o = fListPerfPlots->FindObject(name))) {
136  delete o;
137  }
140 
141  // Book perfstat profile
142  name.Form("Prof_%s_PS_Evts_%s", namelab.Data(), sellab.Data());
143  title.Form("Profile %s PerfStat Event - %s", namelab.Data(), sellab.Data());
144  fProfile_perfstat_event = new TProfile(name, title, ndiv, ns_min, ns_max);
146  fProfile_perfstat_event->GetYaxis()->SetTitle("Events/sec");
149  if ((o = fListPerfPlots->FindObject(name))) {
151  delete o;
152  }
155 
156  // Book perfstat histogram
157  name.Form("Hist_%s_PS_Evts_%s", namelab.Data(), sellab.Data());
158  title.Form("Histogram %s PerfStat Event - %s", namelab.Data(), sellab.Data());
159  fHist_perfstat_event = new TH2D(name, title, ndiv, ns_min, ns_max, 100, 0, 0);
161  fHist_perfstat_event->GetYaxis()->SetTitle("Events/sec");
164  if ((o = fListPerfPlots->FindObject(name))) {
166  delete o;
167  }
169 
170  // Book normalized perfstat profile (max evts)
171  name.Form("Norm_%s_PS_MaxEvts_%s", namelab.Data(), sellab.Data());
172  title.Form("Profile %s Normalized PerfStat Event - %s", namelab.Data(), sellab.Data());
173  fNorm_perfstat_evtmax = new TProfile(name, title, ndiv, ns_min, ns_max);
175  fNorm_perfstat_evtmax->GetYaxis()->SetTitle("Events/sec");
179  if ((o = fListPerfPlots->FindObject(name))) {
181  delete o;
182  }
185 
186  // Book queryresult profile
187  name.Form("Prof_%s_QR_Evts_%s", namelab.Data(), sellab.Data());
188  title.Form("Profile %s QueryResult Event - %s", namelab.Data(), sellab.Data());
189  fProfile_queryresult_event = new TProfile(name, title, ndiv, ns_min, ns_max);
191  fProfile_queryresult_event->GetYaxis()->SetTitle("Events/sec");
194  if ((o = fListPerfPlots->FindObject(name))) {
196  delete o;
197  }
199 
200  // Book normalized queryresult profile
201  name.Form("Norm_%s_QR_Evts_%s", namelab.Data(), sellab.Data());
202  title.Form("Profile %s Normalized QueryResult Event - %s", namelab.Data(), sellab.Data());
203  fNorm_queryresult_event = new TProfile(name, title, ndiv, ns_min, ns_max);
205  fNorm_queryresult_event->GetYaxis()->SetTitle("Events/sec");
208  if ((o = fListPerfPlots->FindObject(name))) {
210  delete o;
211  }
214 
215  // Book CPU efficiency profile
216  name.Form("Prof_%s_CPU_eff_%s", namelab.Data(), sellab.Data());
217  title.Form("Profile %s CPU efficiency - %s", namelab.Data(), sellab.Data());
218  fProfile_cpu_eff = new TProfile(name, title, ndiv, ns_min, ns_max);
220  fProfile_cpu_eff->GetYaxis()->SetTitle("Efficiency");
221  fProfile_cpu_eff->GetXaxis()->SetTitle(axtitle);
223  if ((o = fListPerfPlots->FindObject(name))) {
225  delete o;
226  }
228 }
229 
230 ////////////////////////////////////////////////////////////////////////////////
231 /// Run benchmark
232 /// Input parameters
233 /// nevents: Number of events to run per file. When it is -1, use data member fNEvents.
234 /// start: Start scan with 'start' workers. When it is -1, use data member fStart.
235 /// When 0, the same number of workers are activated on all nodes.
236 /// stop: Stop scan at 'stop' workers. When it is -1 , use data member fStop.
237 /// step: Scan every 'step' workers. When it is -1, use data member fStep.
238 /// ntries: Number of repetitions. When it is -1, use data member fNTries.
239 /// debug: debug switch. When it is -1, use data member fDebug.
240 /// draw: draw switch. When it is -1, use data member fDraw.
241 /// Returns
242 /// Nothing
243 
245  Int_t step, Int_t ntries, Int_t debug, Int_t draw)
246 {
247  if (!fProof){
248  Error("Run", "Proof not set");
249  return;
250  }
251 
252  nevents = (nevents == -1) ? fNEvents : nevents;
253  start = (start == -1) ? fStart : start;
254  stop = (stop == -1) ? fStop : stop;
255  step = (step == -1) ? fStep : step;
256  ntries = (ntries == -1) ? fNTries : ntries;
257  debug = (debug == -1) ? fDebug : debug;
258  draw = (draw == -1) ? fDraw : draw;
259 
260  Bool_t nx = kFALSE;
261  if (step == -2){
262  nx = kTRUE;
263  start = fStart;
264  step = 1;
265  }
266 
267  if (nx){
268  Int_t minnworkersanode = fNodes->GetMinWrksPerNode();
269  if (stop > minnworkersanode) stop = minnworkersanode;
270  }
271 
272  // Load the selector, if needed
273  if (!TClass::GetClass(fSelName)) {
274  // Is it the default selector?
276  // Load the parfile
277 #ifdef R__HAVE_CONFIG
278  TString par = TString::Format("%s/%s%s.par", ROOTETCDIR, kPROOF_BenchParDir, kPROOF_BenchCPUSelPar);
279 #else
280  TString par = TString::Format("$ROOTSYS/etc/%s%s.par", kPROOF_BenchParDir, kPROOF_BenchCPUSelPar);
281 #endif
282  Info("Run", "Uploading '%s' ...", par.Data());
283  if (fProof->UploadPackage(par) != 0) {
284  Error("Run", "problems uploading '%s' - cannot continue", par.Data());
285  return;
286  }
287  Info("Run", "Enabling '%s' ...", kPROOF_BenchCPUSelPar);
289  Error("Run", "problems enabling '%s' - cannot continue", kPROOF_BenchCPUSelPar);
290  return;
291  }
292  } else {
293  if (fParList.IsNull()) {
294  Error("Run", "you should load the class '%s' before running the benchmark", fSelName.Data());
295  return;
296  } else {
297  TString par;
298  Int_t from = 0;
299  while (fParList.Tokenize(par, from, ",")) {
300  Info("Run", "Uploading '%s' ...", par.Data());
301  if (fProof->UploadPackage(par) != 0) {
302  Error("Run", "problems uploading '%s' - cannot continue", par.Data());
303  return;
304  }
305  Info("Run", "Enabling '%s' ...", par.Data());
306  if (fProof->EnablePackage(par) != 0) {
307  Error("Run", "problems enabling '%s' - cannot continue", par.Data());
308  return;
309  }
310  }
311  }
312  }
313  // Check
314  if (!TClass::GetClass(fSelName)) {
315  Error("Run", "failed to load '%s'", fSelName.Data());
316  return;
317  }
318  }
319 
320  // Build histograms, profiles and graphs needed for this run
321  BuildHistos(start, stop, step, nx);
322 
323  // Get pad
324  if (!fCanvas) fCanvas = new TCanvas("Canvas");
325  // Cleanup up the canvas
326  fCanvas->Clear();
327 
328  // Divide the canvas as many as the number of profiles in the list
329  fCanvas->Divide(2,1);
330 
331  TString perfstats_name = "PROOF_PerfStats";
332 
333  SetParameters();
334 
335  if (nx){
336  Info("Run", "Running CPU-bound tests; %d ~ %d active worker(s)/node,"
337  " every %d worker(s)/node.", start, stop, step);
338  } else {
339  Info("Run", "Running CPU-bound tests; %d ~ %d active worker(s),"
340  " every %d worker(s).", start, stop, step);
341  }
342 
343  Int_t npad = 1; //pad number
344 
345  Int_t nnodes = fNodes->GetNNodes(); // Number of machines
346  Int_t ncores = fNodes->GetNCores(); // Number of cores
347 
348  Double_t ymi = -1., ymx = -1., emx = -1.;
349  for (Int_t nactive = start; nactive <= stop; nactive += step) {
350 
351  // For CPU effectiveness (ok for lite; should do it properly for standard clusters)
352  Int_t ncoren = (nactive < ncores) ? nactive : ncores;
353 
354  // Actvate the wanted workers
355  Int_t nw = -1;
356  if (nx) {
357  TString workers;
358  workers.Form("%dx", nactive);
359  nw = fNodes->ActivateWorkers(workers);
360  } else {
361  nw = fNodes->ActivateWorkers(nactive);
362  }
363  if (nw < 0){
364  Error("Run", "could not activate the requested number of"
365  " workers/node on the cluster; skipping the test point"
366  " (%d workers/node)", nactive);
367  continue;
368  }
369 
370  for (Int_t j = 0; j < ntries; j++) {
371 
372  if (nx){
373  Info("Run", "Running CPU-bound tests with %d active worker(s)/node;"
374  " trial %d/%d", nactive, j + 1, ntries);
375  } else {
376  Info("Run", "Running CPU-bound tests with %d active worker(s);"
377  " trial %d/%d", nactive, j + 1, ntries);
378  }
379 
380  Int_t nevents_all=0;
381  if (nx){
382  nevents_all=nevents*nactive*nnodes;
383  } else {
384  nevents_all=nevents*nactive;
385  }
386 
387  // Process
388  fProof->Process(fSelName, nevents_all, fSelOption);
389 
390  TList *l = fProof->GetOutputList();
391 
392  // Save perfstats
393  TTree *t = 0;
394  if (l) t = dynamic_cast<TTree*>(l->FindObject(perfstats_name.Data()));
395  if (t) {
396 
397  //FillPerfStatPerfPlots(t, profile_perfstat_event, nactive);
398  FillPerfStatPerfPlots(t, nactive);
399 
400  TProofPerfAnalysis pfa(t);
401  Double_t pf_eventrate = pfa.GetEvtRateAvgMax();
402 // if (pf_eventrate > emx) emx = pf_eventrate;
403  fProfile_perfstat_evtmax->Fill(nactive, pf_eventrate);
404  fCanvas->cd(npad);
408  fProfLegend->Draw();
409  gPad->Update();
410  // The normalised histos
411  // Use the first bin to set the Y range for the histo
412  Double_t nert = nx ? pf_eventrate/nactive/nnodes : pf_eventrate/nactive;
413  fNorm_perfstat_evtmax->Fill(nactive, nert);
416  Double_t dy = 5 * e1;
417  if (dy / y1 < 0.2) dy = y1 * 0.2;
418  if (dy > y1) dy = y1*.999999;
419  if (ymi < 0.) ymi = y1 - dy;
420  if (fNorm_perfstat_evtmax->GetBinContent(nactive) < ymi)
421  ymi = fNorm_perfstat_evtmax->GetBinContent(nactive) / 2.;
422  if (ymx < 0.) ymx = y1 + dy;
423  if (fNorm_perfstat_evtmax->GetBinContent(nactive) > ymx)
424  ymx = fNorm_perfstat_evtmax->GetBinContent(nactive) * 1.5;
427  fCanvas->cd(npad + 1);
429  fNormLegend->Draw();
430  gPad->Update();
431 
432  // Build up new name
433  TString newname = TString::Format("%s_%s_%dwrks%dthtry", t->GetName(), GetName(), nactive, j);
434  t->SetName(newname);
435 
436  if (debug && fDirProofBench->IsWritable()){
437  TDirectory *curdir = gDirectory;
438  TString dirn = nx ? "RunCPUx" : "RunCPU";
439  if (!fDirProofBench->GetDirectory(dirn))
440  fDirProofBench->mkdir(dirn, "RunCPU results");
441  if (fDirProofBench->cd(dirn)) {
443  t->Write();
444  l->Remove(t);
445  } else {
446  Warning("Run", "cannot cd to subdirectory '%s' to store the results!", dirn.Data());
447  }
448  curdir->cd();
449  }
450 
451  } else {
452  if (l)
453  Warning("Run", "%s: tree not found", perfstats_name.Data());
454  else
455  Error("Run", "PROOF output list is empty!");
456  }
457 
458  // Performance measures from TQueryResult
459 
460  const char *drawopt = t ? "LSAME" : "L";
461  TQueryResult *queryresult = fProof->GetQueryResult();
462  if (queryresult) {
463  queryresult->Print("F");
464  TDatime qr_start = queryresult->GetStartTime();
465  TDatime qr_end = queryresult->GetEndTime();
466  Float_t qr_proc = queryresult->GetProcTime();
467 
468  Long64_t qr_entries = queryresult->GetEntries();
469 
470  // Calculate event rate
471  Double_t qr_eventrate = qr_entries / Double_t(qr_proc);
472  if (qr_eventrate > emx) emx = qr_eventrate;
473 
474  // Calculate and fill CPU efficiency
475  Float_t qr_cpu_eff = -1.;
476  if (qr_proc > 0.) {
477  qr_cpu_eff = queryresult->GetUsedCPU() / ncoren / qr_proc ;
478  fProfile_cpu_eff->Fill(nactive, qr_cpu_eff);
479  Printf("cpu_eff: %f", qr_cpu_eff);
480  }
481 
482  // Fill and draw
483  fProfile_queryresult_event->Fill(nactive, qr_eventrate);
484  fCanvas->cd(npad);
486  fProfLegend->Draw();
487  gPad->Update();
488  // The normalised histo
489  Double_t nert = nx ? qr_eventrate/nactive/nnodes : qr_eventrate/nactive;
490  fNorm_queryresult_event->Fill(nactive, nert);
491  // Use the first bin to set the Y range for the histo
494  Double_t dy = 5 * e1;
495  if (dy / y1 < 0.2) dy = y1 * 0.2;
496  if (dy > y1) dy = y1*.999999;
497  if (ymi < 0.) ymi = y1 - dy;
498  if (fNorm_queryresult_event->GetBinContent(nactive) < ymi)
499  ymi = fNorm_queryresult_event->GetBinContent(nactive) / 2.;
500  if (ymx < 0.) ymx = y1 + dy;
501  if (fNorm_queryresult_event->GetBinContent(nactive) > ymx)
502  ymx = fNorm_queryresult_event->GetBinContent(nactive) * 1.5;
504 // fNorm_queryresult_event->SetMinimum(ymi);
506  fCanvas->cd(npad+1);
507  fNorm_queryresult_event->Draw(drawopt);
508  fNormLegend->Draw();
509  } else {
510  Warning("Run", "TQueryResult not found!");
511  }
512  gPad->Update();
513 
514  } // for iterations
515  } // for number of workers
516 
517  // Make the result persistent
518  fCanvas->cd(npad);
522  fProfLegend->Draw();
523  fCanvas->cd(npad + 1);
526  fNormLegend->Draw();
527  gPad->Update();
528 
529  //save performance profiles to file
531  TDirectory *curdir = gDirectory;
532  TString dirn = nx ? "RunCPUx" : "RunCPU";
533  if (!fDirProofBench->GetDirectory(dirn))
534  fDirProofBench->mkdir(dirn, "RunCPU results");
535  if (fDirProofBench->cd(dirn)) {
539  } else {
540  Warning("Run", "cannot cd to subdirectory '%s' to store the results!", dirn.Data());
541  }
542  curdir->cd();
543  }
544 }
545 
546 ////////////////////////////////////////////////////////////////////////////////
547 
549 {
550  // Fill performance profiles using tree 't'(PROOF_PerfStats).
551  // Input parameters
552  // t: Proof output tree (PROOF_PerfStat) containing performance statistics.
553  // profile: Profile to be filled up with information from tree 't'.
554  // nactive: Number of active workers processed the query.
555  // Return
556  // Nothing
557 
558  // find perfstat profile
560  Error("FillPerfStatPerfPlots", "no perfstat profile found");
561  return;
562  }
563 
564  // find perfstat histogram
565  if (!fHist_perfstat_event){
566  Error("FillPerfStatPerfPlots", "no perfstat histogram found");
567  return;
568  }
569 
570  // extract timing information
571  TPerfEvent pe;
572  TPerfEvent* pep = &pe;
573  t->SetBranchAddress("PerfEvents",&pep);
574  Long64_t entries = t->GetEntries();
575 
576  Double_t event_rate_packet = 0;
577 
578  for (Long64_t k=0; k<entries; k++) {
579 
580  t->GetEntry(k);
581 
582  // Skip information from workers
583  if (pe.fEvtNode.Contains(".")) continue;
584 
586  if (pe.fProcTime != 0.0) {
587  event_rate_packet = pe.fEventsProcessed / pe.fProcTime;
588  fHist_perfstat_event->Fill(Double_t(nactive), event_rate_packet);
589  }
590  }
591  }
592 
593  return;
594 }
595 
596 ////////////////////////////////////////////////////////////////////////////////
597 /// Show settings
598 
600 {
601  Printf("+++ TProofBenchRunCPU +++++++++++++++++++++++++++++++++++++++++");
602  Printf("Name = %s", fName.Data());
603  if (fProof) fProof->Print(option);
604  Printf("fHistType = k%s", GetNameStem().Data());
605  Printf("fNHists = %d", fNHists);
606  Printf("fNEvents = %lld", fNEvents);
607  Printf("fNTries = %d", fNTries);
608  Printf("fStart = %d", fStart);
609  Printf("fStop = %d", fStop);
610  Printf("fStep = %d", fStep);
611  Printf("fDraw = %d", fDraw);
612  Printf("fDebug = %d", fDebug);
613  if (fDirProofBench)
614  Printf("fDirProofBench = %s", fDirProofBench->GetPath());
615  if (fNodes) fNodes->Print(option);
616  if (fListPerfPlots) fListPerfPlots->Print(option);
617  if (fCanvas)
618  Printf("Performance Canvas: Name = %s Title = %s",
620  Printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
621 }
622 
623 ////////////////////////////////////////////////////////////////////////////////
624 /// Draw Performance plots
625 
627 {
628  // Get canvas
629  if (!fCanvas) fCanvas = new TCanvas("Canvas");
630 
631  fCanvas->Clear();
632 
633  // Divide the canvas as many as the number of profiles in the list
634  Int_t nprofiles = fListPerfPlots->GetSize();
635  if (nprofiles <= 2){
636  fCanvas->Divide(1,nprofiles);
637  } else {
638  Int_t nside = (Int_t)TMath::Sqrt((Float_t)nprofiles);
639  nside = (nside*nside<nprofiles)?nside+1:nside;
640  fCanvas->Divide(nside,nside);
641  }
642 
643  Int_t npad=1;
644  TIter nxt(fListPerfPlots);
645  TProfile* profile=0;
646  while ((profile=(TProfile*)(nxt()))){
647  fCanvas->cd(npad++);
648  profile->Draw();
649  gPad->Update();
650  }
651  return;
652 }
653 
654 ////////////////////////////////////////////////////////////////////////////////
655 /// Set histogram type
656 
658 {
659  fHistType = histtype;
660  fName.Form("%sCPU", GetNameStem().Data());
661 }
662 
663 ////////////////////////////////////////////////////////////////////////////////
664 /// Get name for this run
665 
667 {
668  TString namestem("+++undef+++");
669  if (fHistType) {
670  switch (fHistType->GetType()) {
672  namestem = "Hist1D";
673  break;
675  namestem = "Hist2D";
676  break;
678  namestem = "Hist3D";
679  break;
681  namestem = "HistAll";
682  break;
683  default:
684  break;
685  }
686  }
687  return namestem;
688 }
689 
690 ////////////////////////////////////////////////////////////////////////////////
691 /// Set parameters
692 
694 {
695  if (!fProof) {
696  Error("SetParameters", "proof not set; Doing nothing");
697  return 1;
698  }
699 
702  fProof->SetParameter("PROOF_BenchmarkNHists", fNHists);
703  fProof->SetParameter("PROOF_BenchmarkDraw", Int_t(fDraw));
704  return 0;
705 }
706 
707 ////////////////////////////////////////////////////////////////////////////////
708 /// Delete parameters set for this run
709 
711 {
712  if (!fProof){
713  Error("DeleteParameters", "proof not set; Doing nothing");
714  return 1;
715  }
716  if (fProof->GetInputList()) {
717  TObject *type = fProof->GetInputList()->FindObject("PROOF_Benchmark_HistType");
718  if (type) fProof->GetInputList()->Remove(type);
719  }
720  fProof->DeleteParameters("PROOF_BenchmarkNHists");
721  fProof->DeleteParameters("PROOF_BenchmarkDraw");
722  return 0;
723 }
724 
const int nx
Definition: kalman.C:16
double par[1]
Definition: unuranDistr.cxx:38
TVirtualPerfStats::EEventType fType
Definition: TPerfStats.h:54
const char *const kPROOF_BenchCPUSelPar
Abstract base class for PROOF benchmark runs.
long long Long64_t
Definition: RtypesCore.h:69
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:394
This class displays a legend box (TPaveText) containing several legend entries.
Definition: TLegend.h:35
CPU-intensive PROOF benchmark test generates events and fill 1, 2, or 3-D histograms.
Int_t EnablePackage(const char *package, Bool_t notOnClient=kFALSE, TList *workers=0)
Enable specified package.
Definition: TProof.cxx:8643
TString GetNameStem() const
Get name for this run.
float Float_t
Definition: RtypesCore.h:53
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
Definition: TH1.cxx:8266
const char Option_t
Definition: RtypesCore.h:62
virtual void Print(Option_t *option="") const
Print status of PROOF cluster.
Definition: TProof.cxx:4804
R__EXTERN TStyle * gStyle
Definition: TStyle.h:423
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
Definition: TLegend.cxx:373
void SetParameter(const char *par, const char *value)
Set input list parameter.
Definition: TProof.cxx:10400
Set of tools to analyse the performance tree.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:892
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Definition: TCanvas.cxx:659
TList * GetOutputList()
Get list with all object created during processing (see Process()).
Definition: TProof.cxx:10386
Int_t GetMinWrksPerNode() const
Definition: TProofNodes.h:53
TProfile * fProfile_perfstat_event
virtual void SetMinimum(Double_t minimum=-1111)
Definition: TH1.h:395
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Definition: TTree.cxx:5144
Basic string class.
Definition: TString.h:137
ClassImp(TProofBenchRunCPU) TProofBenchRunCPU
Default constructor.
int Int_t
Definition: RtypesCore.h:41
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory and return a pointer to the created directory.
Definition: TDirectory.cxx:955
bool Bool_t
Definition: RtypesCore.h:59
const char *const kPROOF_BenchParDir
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Definition: TList.cxx:497
Profile Historam.
Definition: TProfile.h:34
virtual const char * GetPath() const
Returns the full path of the directory.
Definition: TDirectory.cxx:909
Int_t SetParameters()
Set parameters.
void FillPerfStatPerfPlots(TTree *t, Int_t nactive)
void Run(Long64_t nevents, Int_t start, Int_t stop, Int_t step, Int_t ntries, Int_t debug, Int_t draw)
Run benchmark Input parameters nevents: Number of events to run per file.
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=0)
Set the value of a resource or create a new resource.
Definition: TEnv.cxx:749
TProfile * fProfile_queryresult_event
const char * Data() const
Definition: TString.h:349
#define SafeDelete(p)
Definition: RConfig.h:436
void Print(Option_t *option="") const
Description: Print node information.
void Print(Option_t *opt="") const
Print query content. Use opt = "F" for a full listing.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
Definition: TString.cxx:2321
TProfile * fProfile_perfstat_evtmax
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
Definition: TTree.cxx:7510
virtual const char * GetSelName()
virtual void SetMarkerColor(Color_t mcolor=1)
Definition: TAttMarker.h:51
TString fEvtNode
Definition: TPerfStats.h:52
void Clear(Option_t *option="")
Remove all primitives from the canvas.
Definition: TCanvas.cxx:678
void SetHistType(TPBHistType *histtype)
Set histogram type.
std::vector< std::vector< double > > Data
Double_t GetEvtRateAvgMax() const
TQueryResult * GetQueryResult(const char *ref=0)
Return pointer to the full TQueryResult instance owned by the player and referenced by 'ref'...
Definition: TProof.cxx:2155
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:918
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
Definition: TH1.cxx:2925
A container class for query results.
Definition: TQueryResult.h:44
Long64_t GetEntries() const
Definition: TQueryResult.h:130
void Error(const char *location, const char *msgfmt,...)
const char * GetName() const
Returns name of object.
Definition: TPad.h:255
A doubly linked list.
Definition: TList.h:47
Int_t GetNNodes() const
Definition: TProofNodes.h:51
TDirectory * fDirProofBench
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file).
Definition: TProof.cxx:8909
TThread * t[5]
Definition: threadsh1.C:13
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition: TTree.cxx:8780
EHistType GetType() const
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2878
Float_t GetUsedCPU() const
Definition: TQueryResult.h:133
TProofNodes * fNodes
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
Long64_t fEventsProcessed
Definition: TPerfStats.h:60
Double_t fProcTime
Definition: TPerfStats.h:64
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition: TList.cxx:675
Int_t GetNCores() const
Definition: TProofNodes.h:52
TString fSelOption
void DrawPerfPlots()
Draw Performance plots.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition: TString.cxx:2308
Int_t Fill(const Double_t *v)
Definition: TProfile.h:56
TLine * l
Definition: textangle.C:4
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:51
virtual void SetMarkerStyle(Style_t mstyle=1)
Definition: TAttMarker.h:53
TAxis * GetYaxis()
Definition: TH1.h:320
virtual Long64_t Process(TDSet *dset, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process a data set (TDSet) using the specified selector (.C) file or Tselector object Entry- or event...
Definition: TProof.cxx:5304
Bool_t IsNull() const
Definition: TString.h:387
void AddInput(TObject *obj)
Add objects that might be needed during the processing of the selector (see Process()).
Definition: TProof.cxx:10312
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition: TString.cxx:2227
#define Printf
Definition: TGeoToOCC.h:18
virtual Double_t GetBinError(Int_t bin) const
Return bin error of a Profile histogram.
Definition: TProfile.cxx:861
TDatime GetStartTime() const
Definition: TQueryResult.h:125
virtual ~TProofBenchRunCPU()
Destructor.
void Print(Option_t *option="") const
Show settings.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
const char * GetTitle() const
Returns title of object.
Definition: TPad.h:256
virtual Double_t GetBinContent(Int_t bin) const
Return bin content of a Profile histogram.
Definition: TProfile.cxx:796
TPBHistType * fHistType
The Canvas class.
Definition: TCanvas.h:48
TList * GetInputList()
Get input list.
Definition: TProof.cxx:10331
virtual Int_t GetSize() const
Definition: TCollection.h:95
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
Definition: TTree.cxx:8064
void DeleteParameters(const char *wildcard)
Delete the input list parameters specified by a wildcard (e.g.
Definition: TProof.cxx:10511
double Double_t
Definition: RtypesCore.h:55
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
Definition: TLegend.cxx:280
TProfile * fNorm_queryresult_event
Int_t ActivateWorkers(Int_t nwrks)
Description: Activate 'nwrks' workers; calls TProof::SetParallel and rebuild the internal lists Input...
TProfile * fNorm_perfstat_evtmax
Describe directory structure in memory.
Definition: TDirectory.h:44
int type
Definition: TGX11.cxx:120
R__EXTERN TEnv * gEnv
Definition: TEnv.h:174
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition: TProof.h:342
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition: TClass.cxx:2801
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition: TList.cxx:349
Int_t DeleteParameters()
Delete parameters set for this run.
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
const char Int_t const char TProof * proof
Definition: TXSlave.cxx:46
const char *const kPROOF_BenchSelCPUDef
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
Definition: TDirectory.cxx:433
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
Definition: TPad.cxx:1073
virtual void Add(TObject *obj)
Definition: TList.h:81
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:567
virtual Bool_t IsWritable() const
Definition: TDirectory.h:171
virtual TDirectory * GetDirectory(const char *namecycle, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory using apath.
Definition: TDirectory.cxx:336
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
Definition: TStyle.cxx:1252
#define gPad
Definition: TVirtualPad.h:288
TProfile * fProfile_cpu_eff
bool debug
virtual Long64_t GetEntries() const
Definition: TTree.h:386
A TTree object has a header with a name and a title.
Definition: TTree.h:98
#define gDirectory
Definition: TDirectory.h:221
Double_t Sqrt(Double_t x)
Definition: TMath.h:464
void BuildHistos(Int_t start, Int_t stop, Int_t step, Bool_t nx)
Build histograms, profiles and graphs needed for this run.
const Bool_t kTRUE
Definition: Rtypes.h:91
Float_t GetProcTime() const
Definition: TQueryResult.h:143
Int_t Fill(Double_t)
Invalid Fill method.
Definition: TH2.cxx:287
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
Definition: TNamed.cxx:152
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write all objects in this collection.
TAxis * GetXaxis()
Definition: TH1.h:319
PROOF worker node information.
Definition: TProofNodes.h:30
TDatime GetEndTime() const
Definition: TQueryResult.h:126
virtual void SetName(const char *name)
Change the name of this tree.
Definition: TTree.cxx:8269
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Definition: TDatime.h:39
const char * GetName() const
Returns name of object.
2-D histogram with a double per channel (see TH1 documentation)}
Definition: TH2.h:297
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:904