ROOT  6.06/08
Reference Guide
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 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TProofBenchRunCPU //
15 // //
16 // CPU-intensive PROOF benchmark test generates events and fill 1, 2, //
17 // or 3-D histograms. No I/O activity is involved. //
18 // //
19 //////////////////////////////////////////////////////////////////////////
20 
21 #include "RConfigure.h"
22 
23 #include "TProofBenchRunCPU.h"
24 #include "TProofNodes.h"
25 #include "TProofPerfAnalysis.h"
26 #include "TFileCollection.h"
27 #include "TFileInfo.h"
28 #include "TProof.h"
29 #include "TString.h"
30 #include "Riostream.h"
31 #include "TMap.h"
32 #include "TEnv.h"
33 #include "TTree.h"
34 #include "TLeaf.h"
35 #include "TCanvas.h"
36 #include "TROOT.h"
37 #include "TH2.h"
38 #include "TF1.h"
39 #include "TProfile.h"
40 #include "TLegend.h"
41 #include "TKey.h"
42 #include "TRegexp.h"
43 #include "TPerfStats.h"
44 #include "TQueryResult.h"
45 #include "TMath.h"
46 #include "TStyle.h"
47 #include "TProofNodes.h"
48 #include "TGraphErrors.h"
49 #include "TLegend.h"
50 
52 
53 ////////////////////////////////////////////////////////////////////////////////
54 /// Default constructor
55 
57  TDirectory* dirproofbench, TProof* proof,
58  TProofNodes* nodes, Long64_t nevents, Int_t ntries,
59  Int_t start, Int_t stop, Int_t step, Int_t draw,
60  Int_t debug)
62  fHistType(histtype), fNHists(nhists),
63  fNEvents(nevents), fNTries(ntries), fStart(start), fStop(stop),
64  fStep(step), fDraw(draw), fDebug(debug), fDirProofBench(dirproofbench),
65  fNodes(nodes), fListPerfPlots(0),
66  fCanvas(0), fProfile_perfstat_event(0), fHist_perfstat_event(0),
67  fProfile_perfstat_evtmax(0), fNorm_perfstat_evtmax(0),
68  fProfile_queryresult_event(0), fNorm_queryresult_event(0), fProfile_cpu_eff(0),
69  fProfLegend(0), fNormLegend(0), fName(0)
70 {
71  if (TestBit(kInvalidObject)) {
72  Error("TProofBenchRunCPU", "problems validating PROOF session or enabling selector PAR");
73  return;
74  }
75 
76  fName = "CPU";
77 
78  if (!fNodes) fNodes = new TProofNodes(fProof);
79 
80  if (stop == -1) fStop = fNodes->GetNWorkersCluster();
81 
82  fListPerfPlots = new TList;
83 
84  gEnv->SetValue("Proof.StatsTrace",1);
85  gStyle->SetOptStat(0);
86 }
87 
88 ////////////////////////////////////////////////////////////////////////////////
89 /// Destructor
90 
92 {
93  fProof=0;
100 }
101 
102 ////////////////////////////////////////////////////////////////////////////////
103 /// Build histograms, profiles and graphs needed for this run
104 
106 {
107  TObject *o = 0;
108  Int_t quotient = (stop - start) / step;
109  Int_t ndiv = quotient + 1;
110  Double_t ns_min = start - step/2.;
111  Double_t ns_max = quotient*step + start + step/2.;
112 
113  fProfLegend = new TLegend(0.1, 0.8, 0.3, 0.9);
114  fNormLegend = new TLegend(0.7, 0.8, 0.9, 0.9);
115 
116  TString axtitle("Active Workers"), namelab(GetName()), sellab(GetSelName());
117  if (nx) {
118  axtitle = "Active Workers/Node";
119  namelab.Form("x_%s", GetName());
120  }
122  sellab.Form("%s_%s", GetSelName(), GetNameStem().Data());
123 
124  TString name, title;
125 
126  // Book perfstat profile (max evts)
127  name.Form("Prof_%s_PS_MaxEvts_%s", namelab.Data(), sellab.Data());
128  title.Form("Profile %s PerfStat Event - %s", namelab.Data(), sellab.Data());
129  fProfile_perfstat_evtmax = new TProfile(name, title, ndiv, ns_min, ns_max);
131  fProfile_perfstat_evtmax->GetYaxis()->SetTitle("Events/sec");
135  if ((o = fListPerfPlots->FindObject(name))) {
137  delete o;
138  }
141 
142  // Book perfstat profile
143  name.Form("Prof_%s_PS_Evts_%s", namelab.Data(), sellab.Data());
144  title.Form("Profile %s PerfStat Event - %s", namelab.Data(), sellab.Data());
145  fProfile_perfstat_event = new TProfile(name, title, ndiv, ns_min, ns_max);
147  fProfile_perfstat_event->GetYaxis()->SetTitle("Events/sec");
150  if ((o = fListPerfPlots->FindObject(name))) {
152  delete o;
153  }
156 
157  // Book perfstat histogram
158  name.Form("Hist_%s_PS_Evts_%s", namelab.Data(), sellab.Data());
159  title.Form("Histogram %s PerfStat Event - %s", namelab.Data(), sellab.Data());
160  fHist_perfstat_event = new TH2D(name, title, ndiv, ns_min, ns_max, 100, 0, 0);
162  fHist_perfstat_event->GetYaxis()->SetTitle("Events/sec");
165  if ((o = fListPerfPlots->FindObject(name))) {
167  delete o;
168  }
170 
171  // Book normalized perfstat profile (max evts)
172  name.Form("Norm_%s_PS_MaxEvts_%s", namelab.Data(), sellab.Data());
173  title.Form("Profile %s Normalized PerfStat Event - %s", namelab.Data(), sellab.Data());
174  fNorm_perfstat_evtmax = new TProfile(name, title, ndiv, ns_min, ns_max);
176  fNorm_perfstat_evtmax->GetYaxis()->SetTitle("Events/sec");
180  if ((o = fListPerfPlots->FindObject(name))) {
182  delete o;
183  }
186 
187  // Book queryresult profile
188  name.Form("Prof_%s_QR_Evts_%s", namelab.Data(), sellab.Data());
189  title.Form("Profile %s QueryResult Event - %s", namelab.Data(), sellab.Data());
190  fProfile_queryresult_event = new TProfile(name, title, ndiv, ns_min, ns_max);
192  fProfile_queryresult_event->GetYaxis()->SetTitle("Events/sec");
195  if ((o = fListPerfPlots->FindObject(name))) {
197  delete o;
198  }
200 
201  // Book normalized queryresult profile
202  name.Form("Norm_%s_QR_Evts_%s", namelab.Data(), sellab.Data());
203  title.Form("Profile %s Normalized QueryResult Event - %s", namelab.Data(), sellab.Data());
204  fNorm_queryresult_event = new TProfile(name, title, ndiv, ns_min, ns_max);
206  fNorm_queryresult_event->GetYaxis()->SetTitle("Events/sec");
209  if ((o = fListPerfPlots->FindObject(name))) {
211  delete o;
212  }
215 
216  // Book CPU efficiency profile
217  name.Form("Prof_%s_CPU_eff_%s", namelab.Data(), sellab.Data());
218  title.Form("Profile %s CPU efficiency - %s", namelab.Data(), sellab.Data());
219  fProfile_cpu_eff = new TProfile(name, title, ndiv, ns_min, ns_max);
221  fProfile_cpu_eff->GetYaxis()->SetTitle("Efficiency");
222  fProfile_cpu_eff->GetXaxis()->SetTitle(axtitle);
224  if ((o = fListPerfPlots->FindObject(name))) {
226  delete o;
227  }
229 }
230 
231 ////////////////////////////////////////////////////////////////////////////////
232 /// Run benchmark
233 /// Input parameters
234 /// nevents: Number of events to run per file. When it is -1, use data member fNEvents.
235 /// start: Start scan with 'start' workers. When it is -1, use data member fStart.
236 /// When 0, the same number of workers are activated on all nodes.
237 /// stop: Stop scan at 'stop' workers. When it is -1 , use data member fStop.
238 /// step: Scan every 'step' workers. When it is -1, use data member fStep.
239 /// ntries: Number of repetitions. When it is -1, use data member fNTries.
240 /// debug: debug switch. When it is -1, use data member fDebug.
241 /// draw: draw switch. When it is -1, use data member fDraw.
242 /// Returns
243 /// Nothing
244 
245 void TProofBenchRunCPU::Run(Long64_t nevents, Int_t start, Int_t stop,
246  Int_t step, Int_t ntries, Int_t debug, Int_t draw)
247 {
248  if (!fProof){
249  Error("Run", "Proof not set");
250  return;
251  }
252 
253  nevents = (nevents == -1) ? fNEvents : nevents;
254  start = (start == -1) ? fStart : start;
255  stop = (stop == -1) ? fStop : stop;
256  step = (step == -1) ? fStep : step;
257  ntries = (ntries == -1) ? fNTries : ntries;
258  debug = (debug == -1) ? fDebug : debug;
259  draw = (draw == -1) ? fDraw : draw;
260 
261  Bool_t nx = kFALSE;
262  if (step == -2){
263  nx = kTRUE;
264  start = fStart;
265  step = 1;
266  }
267 
268  if (nx){
269  Int_t minnworkersanode = fNodes->GetMinWrksPerNode();
270  if (stop > minnworkersanode) stop = minnworkersanode;
271  }
272 
273  // Load the selector, if needed
274  if (!TClass::GetClass(fSelName)) {
275  // Is it the default selector?
277  // Load the parfile
279  Info("Run", "Uploading '%s' ...", par.Data());
280  if (fProof->UploadPackage(par) != 0) {
281  Error("Run", "problems uploading '%s' - cannot continue", par.Data());
282  return;
283  }
284  Info("Run", "Enabling '%s' ...", kPROOF_BenchCPUSelPar);
286  Error("Run", "problems enabling '%s' - cannot continue", kPROOF_BenchCPUSelPar);
287  return;
288  }
289  } else {
290  if (fParList.IsNull()) {
291  Error("Run", "you should load the class '%s' before running the benchmark", fSelName.Data());
292  return;
293  } else {
294  TString par;
295  Int_t from = 0;
296  while (fParList.Tokenize(par, from, ",")) {
297  Info("Run", "Uploading '%s' ...", par.Data());
298  if (fProof->UploadPackage(par) != 0) {
299  Error("Run", "problems uploading '%s' - cannot continue", par.Data());
300  return;
301  }
302  Info("Run", "Enabling '%s' ...", par.Data());
303  if (fProof->EnablePackage(par) != 0) {
304  Error("Run", "problems enabling '%s' - cannot continue", par.Data());
305  return;
306  }
307  }
308  }
309  }
310  // Check
311  if (!TClass::GetClass(fSelName)) {
312  Error("Run", "failed to load '%s'", fSelName.Data());
313  return;
314  }
315  }
316 
317  // Build histograms, profiles and graphs needed for this run
318  BuildHistos(start, stop, step, nx);
319 
320  // Get pad
321  if (!fCanvas) fCanvas = new TCanvas("Canvas");
322  // Cleanup up the canvas
323  fCanvas->Clear();
324 
325  // Divide the canvas as many as the number of profiles in the list
326  fCanvas->Divide(2,1);
327 
328  TString perfstats_name = "PROOF_PerfStats";
329 
330  SetParameters();
331 
332  if (nx){
333  Info("Run", "Running CPU-bound tests; %d ~ %d active worker(s)/node,"
334  " every %d worker(s)/node.", start, stop, step);
335  } else {
336  Info("Run", "Running CPU-bound tests; %d ~ %d active worker(s),"
337  " every %d worker(s).", start, stop, step);
338  }
339 
340  Int_t npad = 1; //pad number
341 
342  Int_t nnodes = fNodes->GetNNodes(); // Number of machines
343  Int_t ncores = fNodes->GetNCores(); // Number of cores
344 
345  Double_t ymi = -1., ymx = -1., emx = -1.;
346  for (Int_t nactive = start; nactive <= stop; nactive += step) {
347 
348  // For CPU effectiveness (ok for lite; should do it properly for standard clusters)
349  Int_t ncoren = (nactive < ncores) ? nactive : ncores;
350 
351  // Actvate the wanted workers
352  Int_t nw = -1;
353  if (nx) {
354  TString workers;
355  workers.Form("%dx", nactive);
356  nw = fNodes->ActivateWorkers(workers);
357  } else {
358  nw = fNodes->ActivateWorkers(nactive);
359  }
360  if (nw < 0){
361  Error("Run", "could not activate the requested number of"
362  " workers/node on the cluster; skipping the test point"
363  " (%d workers/node)", nactive);
364  continue;
365  }
366 
367  for (Int_t j = 0; j < ntries; j++) {
368 
369  if (nx){
370  Info("Run", "Running CPU-bound tests with %d active worker(s)/node;"
371  " trial %d/%d", nactive, j + 1, ntries);
372  } else {
373  Info("Run", "Running CPU-bound tests with %d active worker(s);"
374  " trial %d/%d", nactive, j + 1, ntries);
375  }
376 
377  Int_t nevents_all=0;
378  if (nx){
379  nevents_all=nevents*nactive*nnodes;
380  } else {
381  nevents_all=nevents*nactive;
382  }
383 
384  // Process
385  fProof->Process(fSelName, nevents_all, fSelOption);
386 
387  TList *l = fProof->GetOutputList();
388 
389  // Save perfstats
390  TTree *t = 0;
391  if (l) t = dynamic_cast<TTree*>(l->FindObject(perfstats_name.Data()));
392  if (t) {
393 
394  //FillPerfStatPerfPlots(t, profile_perfstat_event, nactive);
395  FillPerfStatPerfPlots(t, nactive);
396 
397  TProofPerfAnalysis pfa(t);
398  Double_t pf_eventrate = pfa.GetEvtRateAvgMax();
399 // if (pf_eventrate > emx) emx = pf_eventrate;
400  fProfile_perfstat_evtmax->Fill(nactive, pf_eventrate);
401  fCanvas->cd(npad);
405  fProfLegend->Draw();
406  gPad->Update();
407  // The normalised histos
408  // Use the first bin to set the Y range for the histo
409  Double_t nert = nx ? pf_eventrate/nactive/nnodes : pf_eventrate/nactive;
410  fNorm_perfstat_evtmax->Fill(nactive, nert);
413  Double_t dy = 5 * e1;
414  if (dy / y1 < 0.2) dy = y1 * 0.2;
415  if (dy > y1) dy = y1*.999999;
416  if (ymi < 0.) ymi = y1 - dy;
417  if (fNorm_perfstat_evtmax->GetBinContent(nactive) < ymi)
418  ymi = fNorm_perfstat_evtmax->GetBinContent(nactive) / 2.;
419  if (ymx < 0.) ymx = y1 + dy;
420  if (fNorm_perfstat_evtmax->GetBinContent(nactive) > ymx)
421  ymx = fNorm_perfstat_evtmax->GetBinContent(nactive) * 1.5;
424  fCanvas->cd(npad + 1);
426  fNormLegend->Draw();
427  gPad->Update();
428 
429  // Build up new name
430  TString newname = TString::Format("%s_%s_%dwrks%dthtry", t->GetName(), GetName(), nactive, j);
431  t->SetName(newname);
432 
433  if (debug && fDirProofBench->IsWritable()){
434  TDirectory *curdir = gDirectory;
435  TString dirn = nx ? "RunCPUx" : "RunCPU";
436  if (!fDirProofBench->GetDirectory(dirn))
437  fDirProofBench->mkdir(dirn, "RunCPU results");
438  if (fDirProofBench->cd(dirn)) {
440  t->Write();
441  l->Remove(t);
442  } else {
443  Warning("Run", "cannot cd to subdirectory '%s' to store the results!", dirn.Data());
444  }
445  curdir->cd();
446  }
447 
448  } else {
449  if (l)
450  Warning("Run", "%s: tree not found", perfstats_name.Data());
451  else
452  Error("Run", "PROOF output list is empty!");
453  }
454 
455  // Performance measures from TQueryResult
456 
457  const char *drawopt = t ? "LSAME" : "L";
458  TQueryResult *queryresult = fProof->GetQueryResult();
459  if (queryresult) {
460  queryresult->Print("F");
461  TDatime qr_start = queryresult->GetStartTime();
462  TDatime qr_end = queryresult->GetEndTime();
463  Float_t qr_proc = queryresult->GetProcTime();
464 
465  Long64_t qr_entries = queryresult->GetEntries();
466 
467  // Calculate event rate
468  Double_t qr_eventrate = qr_entries / Double_t(qr_proc);
469  if (qr_eventrate > emx) emx = qr_eventrate;
470 
471  // Calculate and fill CPU efficiency
472  Float_t qr_cpu_eff = -1.;
473  if (qr_proc > 0.) {
474  qr_cpu_eff = queryresult->GetUsedCPU() / ncoren / qr_proc ;
475  fProfile_cpu_eff->Fill(nactive, qr_cpu_eff);
476  Printf("cpu_eff: %f", qr_cpu_eff);
477  }
478 
479  // Fill and draw
480  fProfile_queryresult_event->Fill(nactive, qr_eventrate);
481  fCanvas->cd(npad);
483  fProfLegend->Draw();
484  gPad->Update();
485  // The normalised histo
486  Double_t nert = nx ? qr_eventrate/nactive/nnodes : qr_eventrate/nactive;
487  fNorm_queryresult_event->Fill(nactive, nert);
488  // Use the first bin to set the Y range for the histo
491  Double_t dy = 5 * e1;
492  if (dy / y1 < 0.2) dy = y1 * 0.2;
493  if (dy > y1) dy = y1*.999999;
494  if (ymi < 0.) ymi = y1 - dy;
495  if (fNorm_queryresult_event->GetBinContent(nactive) < ymi)
496  ymi = fNorm_queryresult_event->GetBinContent(nactive) / 2.;
497  if (ymx < 0.) ymx = y1 + dy;
498  if (fNorm_queryresult_event->GetBinContent(nactive) > ymx)
499  ymx = fNorm_queryresult_event->GetBinContent(nactive) * 1.5;
501 // fNorm_queryresult_event->SetMinimum(ymi);
503  fCanvas->cd(npad+1);
504  fNorm_queryresult_event->Draw(drawopt);
505  fNormLegend->Draw();
506  } else {
507  Warning("Run", "TQueryResult not found!");
508  }
509  gPad->Update();
510 
511  } // for iterations
512  } // for number of workers
513 
514  // Make the result persistent
515  fCanvas->cd(npad);
519  fProfLegend->Draw();
520  fCanvas->cd(npad + 1);
523  fNormLegend->Draw();
524  gPad->Update();
525 
526  //save performance profiles to file
528  TDirectory *curdir = gDirectory;
529  TString dirn = nx ? "RunCPUx" : "RunCPU";
530  if (!fDirProofBench->GetDirectory(dirn))
531  fDirProofBench->mkdir(dirn, "RunCPU results");
532  if (fDirProofBench->cd(dirn)) {
536  } else {
537  Warning("Run", "cannot cd to subdirectory '%s' to store the results!", dirn.Data());
538  }
539  curdir->cd();
540  }
541 }
542 
543 ////////////////////////////////////////////////////////////////////////////////
544 
546 {
547  // Fill performance profiles using tree 't'(PROOF_PerfStats).
548  // Input parameters
549  // t: Proof output tree (PROOF_PerfStat) containing performance statistics.
550  // profile: Profile to be filled up with information from tree 't'.
551  // nactive: Number of active workers processed the query.
552  // Return
553  // Nothing
554 
555  // find perfstat profile
557  Error("FillPerfStatPerfPlots", "no perfstat profile found");
558  return;
559  }
560 
561  // find perfstat histogram
562  if (!fHist_perfstat_event){
563  Error("FillPerfStatPerfPlots", "no perfstat histogram found");
564  return;
565  }
566 
567  // extract timing information
568  TPerfEvent pe;
569  TPerfEvent* pep = &pe;
570  t->SetBranchAddress("PerfEvents",&pep);
571  Long64_t entries = t->GetEntries();
572 
573  Double_t event_rate_packet = 0;
574 
575  for (Long64_t k=0; k<entries; k++) {
576 
577  t->GetEntry(k);
578 
579  // Skip information from workers
580  if (pe.fEvtNode.Contains(".")) continue;
581 
583  if (pe.fProcTime != 0.0) {
584  event_rate_packet = pe.fEventsProcessed / pe.fProcTime;
585  fHist_perfstat_event->Fill(Double_t(nactive), event_rate_packet);
586  }
587  }
588  }
589 
590  return;
591 }
592 
593 ////////////////////////////////////////////////////////////////////////////////
594 /// Show settings
595 
597 {
598  Printf("+++ TProofBenchRunCPU +++++++++++++++++++++++++++++++++++++++++");
599  Printf("Name = %s", fName.Data());
600  if (fProof) fProof->Print(option);
601  Printf("fHistType = k%s", GetNameStem().Data());
602  Printf("fNHists = %d", fNHists);
603  Printf("fNEvents = %lld", fNEvents);
604  Printf("fNTries = %d", fNTries);
605  Printf("fStart = %d", fStart);
606  Printf("fStop = %d", fStop);
607  Printf("fStep = %d", fStep);
608  Printf("fDraw = %d", fDraw);
609  Printf("fDebug = %d", fDebug);
610  if (fDirProofBench)
611  Printf("fDirProofBench = %s", fDirProofBench->GetPath());
612  if (fNodes) fNodes->Print(option);
613  if (fListPerfPlots) fListPerfPlots->Print(option);
614  if (fCanvas)
615  Printf("Performance Canvas: Name = %s Title = %s",
617  Printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
618 }
619 
620 ////////////////////////////////////////////////////////////////////////////////
621 /// Draw Performance plots
622 
624 {
625  // Get canvas
626  if (!fCanvas) fCanvas = new TCanvas("Canvas");
627 
628  fCanvas->Clear();
629 
630  // Divide the canvas as many as the number of profiles in the list
631  Int_t nprofiles = fListPerfPlots->GetSize();
632  if (nprofiles <= 2){
633  fCanvas->Divide(1,nprofiles);
634  } else {
635  Int_t nside = (Int_t)TMath::Sqrt((Float_t)nprofiles);
636  nside = (nside*nside<nprofiles)?nside+1:nside;
637  fCanvas->Divide(nside,nside);
638  }
639 
640  Int_t npad=1;
641  TIter nxt(fListPerfPlots);
642  TProfile* profile=0;
643  while ((profile=(TProfile*)(nxt()))){
644  fCanvas->cd(npad++);
645  profile->Draw();
646  gPad->Update();
647  }
648  return;
649 }
650 
651 ////////////////////////////////////////////////////////////////////////////////
652 /// Set histogram type
653 
655 {
656  fHistType = histtype;
657  fName.Form("%sCPU", GetNameStem().Data());
658 }
659 
660 ////////////////////////////////////////////////////////////////////////////////
661 /// Get name for this run
662 
664 {
665  TString namestem("+++undef+++");
666  if (fHistType) {
667  switch (fHistType->GetType()) {
669  namestem = "Hist1D";
670  break;
672  namestem = "Hist2D";
673  break;
675  namestem = "Hist3D";
676  break;
678  namestem = "HistAll";
679  break;
680  default:
681  break;
682  }
683  }
684  return namestem;
685 }
686 
687 ////////////////////////////////////////////////////////////////////////////////
688 /// Set parameters
689 
691 {
692  if (!fProof) {
693  Error("SetParameters", "proof not set; Doing nothing");
694  return 1;
695  }
696 
699  fProof->SetParameter("PROOF_BenchmarkNHists", fNHists);
700  fProof->SetParameter("PROOF_BenchmarkDraw", Int_t(fDraw));
701  return 0;
702 }
703 
704 ////////////////////////////////////////////////////////////////////////////////
705 /// Delete parameters set for this run
706 
708 {
709  if (!fProof){
710  Error("DeleteParameters", "proof not set; Doing nothing");
711  return 1;
712  }
713  if (fProof->GetInputList()) {
714  TObject *type = fProof->GetInputList()->FindObject("PROOF_Benchmark_HistType");
715  if (type) fProof->GetInputList()->Remove(type);
716  }
717  fProof->DeleteParameters("PROOF_BenchmarkNHists");
718  fProof->DeleteParameters("PROOF_BenchmarkDraw");
719  return 0;
720 }
721 
const int nx
Definition: kalman.C:16
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:51
Long64_t GetEntries() const
Definition: TQueryResult.h:130
double par[1]
Definition: unuranDistr.cxx:38
TVirtualPerfStats::EEventType fType
Definition: TPerfStats.h:54
const char *const kPROOF_BenchCPUSelPar
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:892
THist< 2, double > TH2D
Definition: THist.h:320
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
Int_t EnablePackage(const char *package, Bool_t notOnClient=kFALSE, TList *workers=0)
Enable specified package.
Definition: TProof.cxx:8632
void Print(Option_t *opt="") const
Print query content. Use opt = "F" for a full listing.
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:8272
const char Option_t
Definition: RtypesCore.h:62
R__EXTERN TStyle * gStyle
Definition: TStyle.h:423
#define gDirectory
Definition: TDirectory.h:218
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:10389
TDatime GetStartTime() const
Definition: TQueryResult.h:125
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:10375
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:5163
Basic string class.
Definition: TString.h:137
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 TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
Definition: TH1.cxx:2931
Profile Historam.
Definition: TProfile.h:34
Int_t SetParameters()
Set parameters.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Definition: TList.cxx:496
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:725
TProfile * fProfile_queryresult_event
void Print(Option_t *option="") const
Description: Print node information.
#define SafeDelete(p)
Definition: RConfig.h:449
virtual void Print(Option_t *option="") const
Print status of PROOF cluster.
Definition: TProof.cxx:4793
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:2334
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:7529
Int_t GetNCores() const
Definition: TProofNodes.h:52
virtual Bool_t IsWritable() const
Definition: TDirectory.h:168
Float_t GetProcTime() const
Definition: TQueryResult.h:143
virtual const char * GetSelName()
const char * GetTitle() const
Returns title of object.
Definition: TPad.h:256
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
virtual Double_t GetBinContent(Int_t bin) const
Return bin content of a Profile histogram.
Definition: TProfile.cxx:795
Double_t GetEvtRateAvgMax() const
TQueryResult * GetQueryResult(const char *ref=0)
Return pointer to the full TQueryResult instance owned by the player and referenced by &#39;ref&#39;...
Definition: TProof.cxx:2143
A container class for query results.
Definition: TQueryResult.h:44
virtual Double_t GetBinError(Int_t bin) const
Return bin error of a Profile histogram.
Definition: TProfile.cxx:860
void Error(const char *location, const char *msgfmt,...)
A doubly linked list.
Definition: TList.h:47
TDirectory * fDirProofBench
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file).
Definition: TProof.cxx:8898
EHistType GetType() const
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:8811
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2884
TProofNodes * fNodes
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:674
TString fSelOption
void DrawPerfPlots()
Draw Performance plots.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition: TString.cxx:2321
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:918
Int_t Fill(const Double_t *v)
Definition: TProfile.h:56
TLine * l
Definition: textangle.C:4
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:5293
virtual const char * GetPath() const
Returns the full path of the directory.
Definition: TDirectory.cxx:909
Float_t GetUsedCPU() const
Definition: TQueryResult.h:133
void AddInput(TObject *obj)
Add objects that might be needed during the processing of the selector (see Process()).
Definition: TProof.cxx:10301
#define Printf
Definition: TGeoToOCC.h:18
virtual ~TProofBenchRunCPU()
Destructor.
void Print(Option_t *option="") const
Show settings.
TPBHistType * fHistType
The Canvas class.
Definition: TCanvas.h:48
TList * GetInputList()
Get input list.
Definition: TProof.cxx:10320
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition: TString.cxx:2240
virtual void SetDirectory(TDirectory *dir)
Change the tree&#39;s directory.
Definition: TTree.cxx:8095
#define ClassImp(name)
Definition: Rtypes.h:279
void DeleteParameters(const char *wildcard)
Delete the input list parameters specified by a wildcard (e.g.
Definition: TProof.cxx:10500
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 &#39;nwrks&#39; workers; calls TProof::SetParallel and rebuild the internal lists Input...
TProfile * fNorm_perfstat_evtmax
Describe directory structure in memory.
Definition: TDirectory.h:41
int type
Definition: TGX11.cxx:120
R__EXTERN TEnv * gEnv
Definition: TEnv.h:174
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
Definition: TROOT.cxx:2601
Definition: TProof.h:339
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:567
TString GetNameStem() const
Get name for this run.
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:2871
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition: TList.cxx:348
virtual Long64_t GetEntries() const
Definition: TTree.h:382
Int_t DeleteParameters()
Delete parameters set for this run.
Bool_t IsNull() const
Definition: TString.h:387
#define name(a, b)
Definition: linkTestLib0.cpp:5
Int_t GetMinWrksPerNode() const
Definition: TProofNodes.h:53
Mother of all ROOT objects.
Definition: TObject.h:58
TDatime GetEndTime() const
Definition: TQueryResult.h:126
const char * GetName() const
Returns name of object.
Definition: TPad.h:255
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:1077
virtual void Add(TObject *obj)
Definition: TList.h:81
Int_t GetNNodes() const
Definition: TProofNodes.h:51
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
A TTree object has a header with a name and a title.
Definition: TTree.h:94
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.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
virtual Int_t GetSize() const
Definition: TCollection.h:95
const Bool_t kTRUE
Definition: Rtypes.h:91
Int_t Fill(Double_t)
Invalid Fill method.
Definition: TH2.cxx:290
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
Definition: TNamed.cxx:152
const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write all objects in this collection.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:904
TAxis * GetXaxis()
Definition: TH1.h:319
virtual void SetName(const char *name)
Change the name of this tree.
Definition: TTree.cxx:8300
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 * Data() const
Definition: TString.h:349