Beginner with Proof

Dear all,
I have a macro that runs locally on a MC dataset (in particular I am using Aliroot and Root classes).
Since it requires a lot of time to run on the complete dataset I was wondering if it is possible to use all the 8 processor of my desktop pc. I’ve tryed to start Proof in this way:

root [0] TProof::Open("")
+++ Starting PROOF-Lite with 8 workers +++
Opening connections to workers: OK (8 workers)
Setting up worker servers: OK (8 workers)
PROOF set to parallel mode (8 workers)
(class TProof*)0x1656140

and then I compiled my macro.

However, when the analysis is running I can see (from the system monitor, for example) that only one processor “is working”.
Can anyone help me?
Thank you a lot
Marco

Dear Marco,

PROOF does not automatically run in parallel your code, unless it is written following the TSelector paradigm.
This is because it needs to have control on the loop over the events to be bale to handle them over to worker
processes.

So, the first thing to do look at your macro and identify the three main components: 1) the initialization phase, where your job is configured and the output objects created; 2) the process phase, where you do what you need to do on the event; 3) the termination phase where you do the final things after all events are processed (if any).

Once this is done, you should create your TSelector-derived class (see for example, tutorials/proof/ProofEventProc.h, .C) and map 1->SlaveBegin, 2->Process, 3->Terminate.
You can open one of your input files, load the main TTree and use the method TTree::MakeSelector to generate a TSelector template for your TTree.

If the above sounds completely out of scope, please provide your macro and/or describe in detail what it does, so that we can try to understand how PROOF could help.

G. Ganis