You could try to compile it using “-O2 -Wall -Wextra” and closely inspect reported problems (note: usually newer compiler will spot more, and “-O2” or “-O3” is needed here).
BTW. Another thing to check … can it be that you somewhere use “float” instead of “double”? You could also attach your source code for “inspection”.
(working with ThierryA)
Thanks, -Wextra allowed me to remove unused stuff, I already had -Wall
-O0, -g, -O2, -O3 gives the exact same result, if on the same computer.
No I did not use float instead of double.
I will try remove everything and clone our git again on both, it is getting crazy.
I need to make some cleaning before attaching the source.
Minuit is taking parameters from another peace of code, which is not stable either.
Hello,
Arg, this is not the case, I downloaded isolated minuit2, Minuit2-5.34.14.tar.gz, and compiled it locally on both computers, could not find standalone minuit 2 more recent, for both debian and fedora.
Any advice ?
That’s a question to @Axel and @moneta … I do not know if any fixes are applied to the standalone Minuit2 (but I guess you should be able to get the latest ROOT on both systems).
Hi,
That tar file is a quite old version. You can take a new version of Minuit2 directly from the ROOT github repository and build it standalone with cmake. See
If you have any issue building it please let me know
Thans Lorenzo and Wild_E_Coyote. We are still investigating.
We also encountered a strange behaviour with edm.
We had the convergence stopping while the criterion was not met, how come? (See below)
Are you still using the old version 5.34 or the new one ?
This is strange, but the logic for the end is rather complex, it is also corrected using some information computed from the covariance matrix. I would need the full print-out, possibly with a more verbose option, to understand exactly what is happening.
Can you please attach the full log you have now, and to get more verbose increase the print level to level 2 or to 3. Are you using the MInuit2Minimizer interface ? If yes, you need to just call Minuit2Minimizer::SetPrintLevel(3)
Hi all,
So using the fedora build is ok, and giving identical result than the compiled old one.
On the server, the build looks ok, but then executing seg fault on MnPrint print;
print.SetLevel(3);
Program received signal SIGSEGV, Segmentation fault.
0x00005555555758c3 in std::enable_if<std::_and<std::_not<std::__is_tuple_like >, std::is_move_constructible, std::is_move_assignable >::value, void>::type std::swap(int&, int&) ()
(gdb) where #0 0x00005555555758c3 in std::enable_if<std::_and<std::_not<std::__is_tuple_like >, std::is_move_constructible, std::is_move_assignable >::value, void>::type std::swap(int&, int&) () #1 0x00005555555731c4 in ROOT::Minuit2::MnPrint::SetLevel(int) () #2 0x00005555555646b0 in minimize_minimize () at /home/cmercier/progfit_sol1/progfit/src/minimize.cpp:112
…
Am i not using this properly ?
(EDIT: probably becuse any calls segfault, if I comment the print the next call seg fault) #0 0x0000000000000000 in ?? () #1 0x00005555555710e8 in ROOT::Minuit2::MnApplication::operator()(unsigned int, double) () #2 0x00005555555646d4 in minimize_minimize () at /home/cmercier/progfit_sol1/progfit/src/minimize.cpp:114
Hi,
There is probably something wrong in using the right library. Which version are you using it ?
The log seems to indicate you are using an older version.
In the latest version, for setting a debug level in all Minuit2 you should do:
Here is the full output of the code with the latest Minuit2 version. We still have edm>0.1 but I guess it also use the fractional change of the covariance for stopping.
Hi,
Thank you for the log file. It is true the elm is corrected using the fractional change in the covariance matrix, but this correction seems to be small.
Unfortunatly, I realise now there is a small issue in the printing logic, that makes the message that I was looking (from the VariableMetricBuilder class for not printed.
Can you please just shows me the code on how are you calling the minimization ? Are you using the MnApplication class ?
Hi,
Thanks for sharing the code. It is clear now to me, the actual tolerance used in the VariableMetricMinimizer (Migrad) is scaled by 0.002. The value you pass in MnMigrad is 100 so the actual tolerance used is 0.2, and what you get then makes sense.
You can decrease then this value if you prefer a smaller tolerance.
You can get a better printout by enable debug only for the VariableMatricBuilder