Avoiding the default gsl error handler

On one of my machines, the default gsl error handler is used in ROOT, so that when my Python program encounters a gsl error, it crashes like so:

gsl: /home/aharel/downloads/build_root_5.34.36/GSL-prefix/src/GSL/integration/qags.c:563: ERROR: integral is divergent, or slowly convergent
Default GSL error handler invoked.
Aborted (core dumped)

The same code runs fine on another machine, where GSLError.h does what it’s supposed to and avoids the default gsl error handler, so it goes something like:

Error in <GSLError>: Error 22 in qags.c at 563 : integral is divergent, or slowly convergent

with no crash. My code can easily detector the error and handle it. All’s well.

Both are linux machines.
The problematic one is a Fedora 23 desktop, which displays this behavior both with the system-wide ROOT 5.34.36. I also re-installed this version from source locally with cmake, to try and avoid this problem, and run into the same problem. The cmake configuration was done as:

cmake -Dbuiltin_gsl=ON -Dminuit2=ON -Droofit=ON -Dunuran=ON -Dmathmore=ON ../root_5.34.36

The working machine is a gentoo Linux machine, with ROOT version 5.34.32.

I don’t see how I can override the GSL error handler. Just turning it off would be great, but how do I access it through PyROOT? (or for that matter, through the CINT command line)

Any ideas what configuration / installation issues led to this?

Any ideas how to figure any of this out?



This seems to me more a Python problem, that makes the program crashes when an Error message from ROOT is issued. The GSL Error handler, when using ROOR from MathMore calls just the ROOT Error function.
Maybe in Python you abort when the ROOT Error function is called ?
In that case you can try to set gErrorIgnoreLevel = kError+1.

Otherwise, could be that somehow from this machine the GSL Erro handler substitution did not work. In this case I would try to re-define outside the GSL Error handler as it is done in root/math/mathmore/src/GSLError.h
root.cern.ch/gitweb/?p=root.git … .h;hb=HEAD

Best Regards


Dear all,
Could it be that some default configuration has been changed in root?
Since few week I am also having the same problem, and it did not happen before.

I am using a Mac, Yosemite 10.10.5

Did the suggestion with redefining the error work?
I could try to include it as well in my macro, but i will prefer to know what changed.

Thanks in advance,


I don’t think anything has changed in this. Which version of ROOT and also GSL are you using it ?
Since I cannot reproduce this problem, can you please also post a macro showing it,

Best Regards


Thanks for the answer.


gsl-config --version

I am not sure of the 100% details of how root is compiled using the new aliBuild system from dare’s script.
And if this version of gsl is 100% used.

TF1* fitSecFracPLWithConstFromK0 = new TF1(“fitSecFracPLWithConstFromK0”,"[0]/pow(x,[1])+[2]");
fitSecFracPLWithConstFromK0->SetRange(minPtMesonSec, maxPtMeson);
TFitResultPtr resultPbPbLHC11hSecFracFromK0 = histoYieldTrueSecFracFromK0SMeson->Fit(fitSecFracPLWithConstFromK0,“SINRME+”,"",minPtMesonSec, maxPtMeson);

Sometimes it helps to change the parameter limits…


The error message before the break is
gsl: qags.c:548: ERROR: cannot reach tolerance because of roundoff error
Default GSL error handler invoked.

Just some more info, before the configuration for installing root were:
–with-xrootd=GSHELL_ROOT \ --enable-minuit2 \ --enable-roofit \ --enable-soversion \ --disable-bonjour \ --disable-rfio \ --disable-castor \ --enable-builtin-ftgl \ --enable-builtin-freetype \ --with-clang \ --with-f77=( which gfortran )
–with-cc=( which clang ) \ --with-cxx=( which clang++ )
–with-ld=$( which clang++ )

Now we use the following (attached , it is a .sh file but I put .txt to be able to attache it):

$ROOTSYS/bin/root-config --features
alien asimage astiff bonjour builtin_afterimage builtin_ftgl builtin_freetype builtin_glew builtin_pcre builtin_lzma cxx11 libcxx cintex cocoa exceptions explicitlink fortran genvector http krb5 ldap mathmore memstat minuit2 monalisa opengl pythia6 pythia6_nolink python reflex roofit shared soversion sqlite ssl thread tmva vdt xml xrootd
root.txt (3.94 KB)