Re: TH1F::Fit(..) in multiple threads ?

From: Andre Holzner <Andre.Georg.Holzner_at_cern.ch>
Date: Mon, 18 Oct 2010 16:34:32 +0200


Dear Philippe,

thanks for the quick reply.

On 10/14/2010 04:24 PM, Philippe Canal wrote:
>> Is there a recommended way to do things like this
>> (running root applications with multiple threads) ?
>
> At the very least you ought to use the TThread object
> so that ROOT is aware that it is run in a multi-thread
> environment.

This seems to help to some extent: the program does not crash any more.

However, we see that some threads actually produce a fit result while others say:

   Warning in <ROOT::Math::FitConfig::CreateMinimizer>: Could not create the Linear minimizer. Try using the minimizer Minuit2

   Error in <ROOT::Math::FitConfig::CreateMinimizer>: Could not create the Minuit2 minimizer

   Warning in <Fit>: Abnormal termination of minimization.


               Invalid FitResult


Could it be that TH1F is trying to access a global variable (gMinuit ?) ?

If that's case, do you know if creating a per-thread instance of TMinuit and defining a user function which calculates the log likelihood of the histogram given the function 'by hand' is likely to work ?

thanks a lot,

Andre Received on Mon Oct 18 2010 - 16:35:08 CEST

This archive was generated by hypermail 2.2.0 : Mon Oct 18 2010 - 17:50:02 CEST