Is there a easy way to run RooMCStudy on Grid?

Hello, is there a easy way to run RooMCStudy on Grid? Just take the simple case as example, the PDF and parameters are not changed, but to generate independent sample on different Computing Elements (CE).

The problems for me are:
1)How to set the random seed correctly so that the sample are really independent? I have no ideas.

2)How to combine the results?
From root.cern.ch/phpBB2/viewtopic.ph … roomcstudy, I know that we could store the output in dataset and write it into the ASCII file, then the task left is to combine those ASCII files. But one need to know the role of each column in the ASCII file.

3)Is it possible to use multiple CPU on the same CE to speed the fitting, just as RooAbs::fitTo()? I cannot find it in RooMCStudy?

Thank you very much for any suggestions. A simple example would be greatly appreciated.

[quote=“hejb”]Hello, is there a easy way to run RooMCStudy on Grid? Just take the simple case as example, the PDF and parameters are not changed, but to generate independent sample on different Computing Elements (CE).
[/quote]
I believe it is restricted to execute any user’s procedure on Computing Elements. This responsibility belongs to Worker Nodes (WN). At least for gLite, Globus, AliEn Grids.

[quote=“anar”][quote=“hejb”]Hello, is there a easy way to run RooMCStudy on Grid? Just take the simple case as example, the PDF and parameters are not changed, but to generate independent sample on different Computing Elements (CE).
[/quote]
I believe it is restricted to execute any user’s procedure on Computing Elements. This responsibility belongs to Worker Nodes (WN). At least for gLite, Globus, AliEn Grids.[/quote]

Thank you for your reply. What I meant was that we could do the toy Monte Carlo studies with many computers in the same time, i.e., in parallel. Sorry for my poor English, maybe I should say “to generate independent sample with many ROOT jobs”?

[quote=“hejb”][quote=“anar”][quote=“hejb”]Hello, is there a easy way to run RooMCStudy on Grid? Just take the simple case as example, the PDF and parameters are not changed, but to generate independent sample on different Computing Elements (CE).
[/quote]
I believe it is restricted to execute any user’s procedure on Computing Elements. This responsibility belongs to Worker Nodes (WN). At least for gLite, Globus, AliEn Grids.[/quote]

Thank you for your reply. What I meant was that we could do the toy Monte Carlo studies with many computers in the same time, i.e., in parallel. Sorry for my poor English, maybe I should say “to generate independent sample with many ROOT jobs”?[/quote]
If this RooMCStudy thing is possible to do on PROOF, I would propose to use gLitePROOF, which will help you to use PROOF on the gLite Grid.

[quote=“anar”]
If this RooMCStudy thing is possible to do on PROOF, I would propose to use gLitePROOF, which will help you to use PROOF on the gLite Grid.[/quote]

Thank you very much. I will try to learn how to use PROOF.

For my question of 3, I could answer it myself now.
“FitOptions( NumCPU(4) )” will do the job, as it says on:
root.cern.ch/root/html/RooMCStud … RooMCStudy
root.cern.ch/root/html/RooAbsPdf … sPdf:fitTo

Sorry, while I was asking this question, I still used the Classic fit options like “mqh”…

So, up to now, the problem left is only how to set the random seed correctly for each job.

Hi,

Improved support for RooMCStudy grid use will be available later this year. With the new RooWorkspace class introduced in 5.18 it is now possible to stream RooFit p.d.fs and datasets into bytestreams using ROOT streamer technology which allows them to be passed from one node to the other easily.

What you can do for now is to submit independent batch jobs that perform MC studies for a limited number of toys (100 or 1000 or whatever the CPU budget for the batch jobs allows). Just make sure to set a different random seed for each job (RooRandom::generator().setSeed(xxxx)) and to set the “r” fit option causing the RooFitResult of each fit to be saved. If you write all the RooFitResults to a ROOT file
and collect the ROOT files from all your batch jobs you can create a RooMCStudy object in your interactive session that analyzes the aggregate result by feeding it the RooFitResults from the file(s) using the addFitResult() method.

Wouter

@Wouter_Verkerke here what do you mean by “r” fit option, could you please elaborate ?

Thank you!

Hi @hym,
note that you are replying to a 13 year old post – it’s likely you will not get a reply from the original user, or that the thread does not apply as-is to recent ROOT versions.

Please create a new topic in case you need further help.
Cheers,
Enrico