Skip to content

[Math] Make building old C++ Minuit implementation optional#20032

Open
guitargeek wants to merge 3 commits intoroot-project:masterfrom
guitargeek:minuit_1
Open

[Math] Make building old C++ Minuit implementation optional#20032
guitargeek wants to merge 3 commits intoroot-project:masterfrom
guitargeek:minuit_1

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

Minuit 2 has been the default for 2 years, and one day we should consider not building ROOT with the old C++ TMinuit implementation anymore.

To make it possible to try this out, introduce a new minuit1 flag that is on by default.

Building with minuit1=OFF will also help to ensure that we are actually using Minuit 2 in all out tests. With this, it was uncovered
that the stressRooFit actually didn't use Minuit 2, even thought it's the default minimizer in RooFit as well. Therefore, the default minimizer setting in stressRooFit/stressRooStats are changed to Minuit2, reference files are updated, and new tests with the old Minuit 1 are added to keep previous test coverage.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 5, 2025

Test Results

    22 files      22 suites   3d 10h 26m 20s ⏱️
 3 846 tests  3 811 ✅  1 💤 34 ❌
75 941 runs  75 870 ✅ 18 💤 53 ❌

For more details on these failures, see this check.

Results for commit c8e8abc.

♻️ This comment has been updated with latest results.

@guitargeek guitargeek force-pushed the minuit_1 branch 5 times, most recently from 7c5b819 to bfd811a Compare October 7, 2025 07:13
@guitargeek guitargeek requested a review from couet as a code owner October 7, 2025 07:13
@guitargeek guitargeek force-pushed the minuit_1 branch 2 times, most recently from 286e166 to bd3826f Compare October 7, 2025 11:35
@pcanal
Copy link
Copy Markdown
Member

pcanal commented Oct 7, 2025

There seems to be unrelated commits in the PR (roofit value servers)

@guitargeek
Copy link
Copy Markdown
Contributor Author

They are related. Using Minuit 2 consistently unearthed some problems in RooFit, because Minuit 2 is more verbose with errors.

So I use this PR to also see how I can fix these problems. The goal is to create spin-of PRs for the RooFit fixes (many are already in), and then finally come back to this PR and only include the Minuit changes.

@dpiparo
Copy link
Copy Markdown
Member

dpiparo commented Dec 19, 2025

The modules_off build seems to suffer from errors which do not seem due to glitches. However, they could be due to some artifacts, interfering with the creation of the PCH. I am restarting the builds as clean builds to then be able to assess whether the changes are fine to be integrated.

@dpiparo dpiparo added the clean build Ask CI to do non-incremental build on PR label Dec 19, 2025
@dpiparo dpiparo closed this Dec 19, 2025
@dpiparo dpiparo reopened this Dec 19, 2025
@dpiparo
Copy link
Copy Markdown
Member

dpiparo commented Jan 8, 2026

nope. The problem persists @guitargeek

@couet couet removed their request for review March 27, 2026 16:38
Minuit 2 has been the default for 2 years, and one day we should
consider not building ROOT with the old C++ TMinuit implementation
anymore.

To make it possible to try this out, introduce a new `minuit1` flag that
is on by default.

Building with `minuit1=OFF` will also help to ensure that we are
actually using Minuit 2 in all out tests. With this, it was uncovered
that the `stressRooFit` actually didn't use Minuit 2, even thought it's
the default minimizer in RooFit as well. Therefore, the default
minimizer setting in `stressRooFit`/`stressRooStats` are changed to
`Minuit2`, reference files are updated, and new tests with the old
Minuit 1 are added to keep previous test coverage.
There is no particular reason anymore to run this test with both
Minuit 1 and Minuit 2, and it's a bit awkward that this is the only
RooFit test that hardcodes the iteration over different minimizers.
@guitargeek
Copy link
Copy Markdown
Contributor Author

The problem should be gone now. I have fixed some edge cases with the new CPU evaluation backend in the recent months, so all tests should work now (before, a problematic fit in stressRooFit was silently passing, because the old Minuit 1 was less verbose, not printing an "Error" message that caused the test to fail, which was grepping for "Error" in its passing condition)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:Math Libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants