Minuit2 not found

Hello,

I have been using Minuit2 for parallel fitting in the past. However, when I try to run the program now, I get:

Error in TPluginHandler::SetupCallEnv: class ROOT::Minuit2::Minuit2Minimizer not found in plugin Minuit2
Warning in ROOT::Math::FitConfig::CreateMinimizer: Could not create the Minuit2 minimizer. Try using the minimizer Minuit

I did compile ROOT with: -Dminuit2=ON

And I do see the following files:
./etc/plugins/ROOT@@Math@@Minimize/P010_Minuit2Minimizer.C
./lib/libMinuit2.rootmap
./lib/libMinuit2.so.5.34.32
./lib/libMinuit2.so.5
./lib/libMinuit2.so

Any suggestions?

Thanks,
Andreas

When building your ROOT (5.34/32), do you use the “prefix” (i.e. “fixed location”) based method or the “location independent” method?
If it was the “prefix” (i.e. “fixed location”) based method … check the output of “root-config --etcdir” and see if it points to the “./etc/…” subdirectory which you mention in your post (e.g. it is possible that it points to “/etc/root”).

I always use my own install path when cmake’ing ROOT.
root-config --etcdir reports:
/home/andreas/Home/Science/Software/External/root_v5.34.32/etc

That is the correct directory.

My .rootrc has:
Unix.*.Root.PluginPath: :$(ROOTSYS)/etc/plugins:

ROOTSYS points to
/home/andreas/Home/Science/Software/External/root_v5.34.32

So everything looks correct. That’s why this is a mystery to me. I am using Ubuntu 14.04

Can you prepare a small “test” script which demonstrates this problem (I also use Ubuntu 14.04 and ROOT 5.34).
BTW. Check what’s different between your “.rootrc” and the default “${ROOTSYS}/etc/system.rootrc”.

Hello,

I attached an example, MinuitError.
MinuitError.C works, when launched in ROOT via
.L MinuitError.C++
MinuitError()

Compiling MinuitError.cxx gives me:
Error in TPluginHandler::SetupCallEnv: class ROOT::Minuit2::Minuit2Minimizer not found in plugin Minuit2
Warning in ROOT::Math::FitConfig::CreateMinimizer: Could not create the Minuit2 minimizer. Try using the minimizer Minuit

I compiled it via: g++ -O2 -m64 MinuitError.o -L/home/andreas/Home/Science/Software/External/root_v5.34.32/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lMinuit2 -lThread -pthread -Wl,-rpath,/home/andreas/Home/Science/Software/External/root_v5.34.32/lib -lm -ldl -rdynamic -o MinuitError

The .rootrc are identical, expect font sizes.

Thanks for any tips!
MinuitError.cxx (5.14 KB)
MinuitError.C (5.21 KB)

Hi,

This is very strange. I could not reproduce your problem. Did you set the environment correctly before by sourcing the script bin/thisroot.sh ?
Then, which architecture are you using it ?

Best Regards

Lorenzo

Hi Lorenzo,

OK. Figured it out! It was a completely different issue:
Root cannot find Minuit2 if one sets up the HEAsoft environment (i.e. NASA’s fits tools) after setting up ROOT’s environment, but if one calls bin/thisroot.sh last, then everything works.

Thanks a lot for your help!

Cheers,
Andreas

Hi
See attached file
as can be seen with root6, I have the same type of error message “Error in TPluginHandler::SetupCallEnv:”
I have check the presence of file libminuit2.so and libminuit2.rootmap
the root-config --etcdir” indicate the location etc under my Root 6 instalaltion directory
but when I go below I find a P010 file but associated with minuit and not minuit2


Thanks in advance for your help

Regards
Thibaut

That’s o.k. -> Minuit2 lives in “plugins/ROOT@@Math@@Minimizer/”.

Try to execute root-config --features and see if you have “minuit2” inside.