Skip to content

[Minuit2] Use signed integer as index variable in OpenMP 'for' statement#20587

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:issue-20586
Dec 2, 2025
Merged

[Minuit2] Use signed integer as index variable in OpenMP 'for' statement#20587
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:issue-20586

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

Compiling Minuit2 with minuit2_omp=ON when using MVSC raises error C3016: 'i': index variable in OpenMP 'for' statement must have signed integral type

Source of the error is line 102 in
math/minuit2/src/Numerical2PGradientCalculator.cxx where (in commit 95035e2) the for-loop variable type was changed from integer to unsigned integer. While this is no problem for GCC, MVSC apparently strictly forbids this.

Closes #20586.

Compiling Minuit2 with `minuit2_omp=ON` when using MVSC raises `error
C3016: 'i': index variable in OpenMP 'for' statement must have signed
integral type`

Source of the error is line 102 in
`math/minuit2/src/Numerical2PGradientCalculator.cxx` where (in commit
95035e2) the for-loop variable type was changed from integer to unsigned
integer. While this is no problem for GCC, MVSC apparently strictly
forbids this.

Closes root-project#20586.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 1, 2025

Test Results

    22 files      22 suites   3d 19h 59m 28s ⏱️
 3 777 tests  3 776 ✅ 0 💤 1 ❌
81 179 runs  81 178 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 6a1e86e.

Copy link
Copy Markdown
Collaborator

@ferdymercury ferdymercury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@guitargeek guitargeek requested a review from hageboeck December 2, 2025 11:01
@guitargeek guitargeek merged commit 1e37655 into root-project:master Dec 2, 2025
28 of 30 checks passed
@guitargeek guitargeek deleted the issue-20586 branch December 2, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MVSC fails compiling Minuit2 with OpenMP enabled

3 participants