Could not create the Minuit2 minimizer


Hello,

I installed root-6.36.04 on FreeBSD-RELEASE-13.5 as a package, i.e. I did not compile it myself from source. On invoking one of the fitting tutorial scripts like this:

root [0] .x hist032_TRatioPlot_fit_lines.C

I receive the error in the topic title, the full error being:

Warning in <ROOT::Math::FitConfig::CreateMinimizer>: Could not create the Minuit2 minimizer. Try using the minimizer Minuit                                                                    Error in <ROOT::Math::FitConfig::CreateMinimizer>: Could not create the Minuit2 minimizer                                                                                                      Error in <ROOT::Math::Fitter::DoInitMinimizer>: Minimizer cannot be created                                                                                                                    Warning in <Fit>: Abnormal termination of minimization.                                                                                                                                        <Empty FitResult>                                                                                                                                                                              Error in <TBackCompFitter::GetConfidenceIntervals>: Cannot compute confidence intervals with an invalide fit result                                                                            Error in <TBackCompFitter::GetConfidenceIntervals>: Cannot compute confidence intervals with an invalide fit result

I have checked that the relevant files exist:

/usr/local/lib/root/libMinuit.rootmap      /usr/local/lib/root/libMinuit.so.6.36.04*  /usr/local/lib/root/libMinuit2.so.6.36@    /usr/local/lib/root/libMinuit_rdict.pcm
/usr/local/lib/root/libMinuit.so@          /usr/local/lib/root/libMinuit2.rootmap     /usr/local/lib/root/libMinuit2.so.6.36.04*
/usr/local/lib/root/libMinuit.so.6.36@     /usr/local/lib/root/libMinuit2.so@         /usr/local/lib/root/libMinuit2_rdict.pcm

I have sourced thisroot.sh and checked LD_LIBRARY_PATH:

/usr/local/lib/root::/home/rmason/.local/lib

root-config –etcdir:

/usr/local/etc/root

That directory is populated:

HistFactorySchema.dtd      class.rules                gitinfo.txt                notebook/                  proof/                     system.rootauthrc          valgrind-root.supp
Makefile.arch              cling/                     helgrind-root.supp         pdg_table.txt              root.desktop               system.rootdaemonrc
RadioNuclides.txt          dictpch/                   html/                      pdg_table_update.py*       root.mimes                 system.rootrc
allDict.cxx.pch            gdb-backtrace.sh*          lsan-root.supp             plugins/                   runfirefox.sh*             valgrind-root-python.supp

I think this is a configuration issue, but I don’t know what to try next. I appreciate any help offered.

Thank you.

sprock

ROOT Version: root-6.36.04
Platform: FreeBSD-RELEASE-13.5
Compiler: Not Provided


Welcome to the ROOT Forum!
As the warning is telling, it doesn’t find the Minuit2 minimizer. So you should look for /usr/local/lib/root/libMinuit2.*. if it’s not here, then it might be an issue with the package manager.
One possible solution could be to change the minimizer in a custom ${HOME}/.rootrc, as:

# Default Fitter (current choices are Minuit, Minuit2, and Fumili).
Root.Fitter:             Minuit

Thank you for your response.

Unfortunately, selecting minuit in ~/.rootrc does not work: root can’t find that library either and suggests trying minuit2.

As shown in my original post, the shared libraries for minuit and minuit2 are present in the location placed on LD_LIBRARY_PATH when thisroot.sh is sourced.

Thanks again.

sprock

Oh, yes, sorry I overlooked at your original post. Then this looks weird. Maybe @moneta has an idea about what could be the issue

The checks you did are already very helpful, thanks! But there is one thing that could still go wrong that you didn’t check.

Does ROOT find the right etcdir at runtime? What is the output when you run gROOT->GetEtcDir() in the ROOT interpreter?

Hello,

Jonas Rembser via ROOT Forum root.discourse@cern.ch writes:

  • jonas
    November 17

The checks you did are already very helpful, thanks! But there is one thing that could still go wrong that you didn’t check.

Does ROOT find the right etcdir at runtime? What is the output when you run gROOT->GetEtcDir() in the ROOT interpreter?


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

gROOT->GetEtcDir()
(const TString &) “/usr/local/etc/root”[19]

Thank you for your help.

sprock

Thanks. That looks also correct, so we have to dig deeper.

Can you run this debug macro with root -b -q debug_macro.C and paste the output here? Something seems to be going wrong with the ROOT plugin system.

void debug_macro() {

    gDebug = 3;
    auto h = gROOT->GetPluginManager()->FindHandler("ROOT::Math::Minimizer", "Minuit2");
    h->LoadPlugin();
    auto * min = (ROOT::Math::Minimizer *)( h->ExecPlugin(1,"migrad" ) );
    std::cout << min << std::endl;
}

Hi Jonas,

Jonas Rembser via ROOT Forum root.discourse@cern.ch writes:

  • jonas
    November 18

Thanks. That looks also correct, so we have to dig deeper.

Can you run this debug macro with root -b -q debug_macro.C and paste the output here? Something seems to be going wrong with
the ROOT plugin system.

Processing debug_macro.C…
Info in TPluginManager::FindHandler: did not find plugin for class ROOT::Math::Minimizer and uri Minuit2
Error in : Trying to dereference null pointer or trying to call routine taking non-null arguments
Execution of your code was aborted.
In file included from input_line_8:1:
/usr/home/rmason/Help/FreeBSD/debug_macro.C:5:5: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
h->LoadPlugin();

Thanks again,
sprock