Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LAGraph: Adapt for stricter implementations of the OpenMP standard. #467

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

mmuetzel
Copy link
Contributor

@mmuetzel mmuetzel commented Oct 24, 2023

IIUC, the OpenMP standard requires that the iterator of parallel for loops is a signed integer that is declared outside the scope of the parallel loop body. Some implementations seem to have relaxed that requirement (allowing unsigned integers or initialization in the for loop). But others (MSVC) seem to follow a stricter interpretation of the standard.

Adapt the source to allow for that stricter interpretation.

Fixes the second issue raised in #462.

IIUC, the OpenMP standard requires that the iterator of parallel for loops
is a signed integer that is declared outside the scope of the parallel
loop body. Some implementations seem to have relaxed that requirement. But
others (MSVC) seem to use that strict interpretation.
@mmuetzel
Copy link
Contributor Author

Looks like the CI is going to be green again with this change. 🎉

@DrTimothyAldenDavis
Copy link
Owner

Thanks! Yes, those "for (int k = .." loops don't work on Windows. I'm not sure how those slipped through our CI on the LAGraph repo itself. I knew about that but this LAGraph code was written by lots of people (I wrote the sort though so that's my bad). I wasn't aware that OpenMP required the for loop variable to be a signed integer. I'll have to double check my many parallel for loops in GraphBLAS (340 of them!); I tend to use signed integers but an unsigned might have slipped through.

@DrTimothyAldenDavis DrTimothyAldenDavis merged commit cab3920 into DrTimothyAldenDavis:dev2 Oct 24, 2023
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.

2 participants