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

From: Andre Holzner <Andre.Georg.Holzner_at_cern.ch>
Date: Thu, 14 Oct 2010 09:34:19 +0200


Dear experts,

we're trying to benefit from our multi-core CPUs and are trying to parallelize our program.

Amongst other things, we tried to fit a function to a histogram using TH1F::Fit(..) in parallel threads
(using ROOT 5.22.00d on slc5).

As a test, we tried to fit 'pol3' to a histogram filled with random numbers drawn from a Gaussian distribution.

This seems to work fine for one thread but when going to multiple threads, we get all kinds of error messages from things like

   Error: Too many '}' (tmpfile):2:

to

   Unknown function: pol3

to just segmentation violations. We are using plain pthread functions to create and wait for the threads for the moment.

Is there a recommended way to do things like this
(running root applications with multiple threads) ?

Should we rather use fork(..) instead of creating threads to avoid sharing variables between subprocesses ?

thanks,

Andre Received on Thu Oct 14 2010 - 09:35:52 CEST

This archive was generated by hypermail 2.2.0 : Thu Oct 14 2010 - 17:50:01 CEST