Skip to content

Bad interference for TH1.Fit and EnableImplicitMT #21080

@VanyaBelyaev

Description

@VanyaBelyaev

Check duplicate issues.

  • Checked for duplicates

Description

Dear Experst

I've observed a and interference between TH1.Fit and EnableImplicitMT in PyROOT

ROOT from LCG dev3 cvmfs nightly build

Reproducer is trivial:

import ROOT, random

xmin = 0
xmax = 1 

h1 = ROOT.TH1F ( 'h1' , '' , 20 , xmin , xmax ) 

for i in range ( 1000 ) : h1.Fill ( random.gauss ( 0 , 1 ) )

def func ( x , pars ) :
    x0  = x [ 0 ]    
    return pars [ 0 ] + pars [ 1 ] * x0 

my_func = ROOT.TF1( 'f1' , func, xmin , xmax , npar = 2 , ndim = 1 )

my_func.SetParNames  ( 'A'  , 'B'  , )
my_func.SetParameter ( 0 ,  1 )
my_func.SetParameter ( 1 , -1 )


## If commented OUT: ok 
ROOT.ROOT.EnableImplicitMT()   ## THIS LINE

r = h1.Fit ( my_func , 'SE0Q' , '' , xmin , xmax ) 

print ( r ) 

In case EnableImplicitMT is commented out it works nicely:

( source /cvmfs/sft.cern.ch/lcg/views/dev3/latest/x86_64-el9-clang19-opt/setup.sh ; python ./hfit.py ) 

But if this line is uncommented, it hangs....

Reproducer

see above

ROOT version

ROOT from LCG dev3 nighly slot i cvmfs

Installation method

LCG nightly builds at cvmfs, dev3 slot

Operating system

linux, lxplus

Additional context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions