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

CHOLMOD GPU: Fix openmp #367

Merged

Conversation

whuaegeanse
Copy link
Contributor

On windows, MSVC throws openmp related compilation errors

@mmuetzel
Copy link
Contributor

I can only guess which error you are seeing. But would it be better to make num_chunks a size_t instead of making i an int?
That might help with integer overflow for large numbers.

@whuaegeanse
Copy link
Contributor Author

whuaegeanse commented Aug 30, 2023

I can only guess which error you are seeing. But would it be better to make num_chunks a size_t instead of making i an int? That might help with integer overflow for large numbers.

@mmuetzel
MSVC Error:
2>D:\zgh\Libs\suitesparse\SuiteSparse\CHOLMOD\Supernodal\../GPU/t_cholmod_gpu.c(55,9): error C3016: 'i': index variable in OpenMP 'for' statement must have signed integral type

@mmuetzel
Copy link
Contributor

Thank you for testing.
See also this similar issue where it seems to have been solved by adding /openmp:llvm to the compiler flags:
tesseract-ocr/tesseract#3285

Does that also work for you?

@mmuetzel
Copy link
Contributor

Looking at the affected code snippet again: num_chunks is already of type int. So, i can be of the same size.

Your change looks good to me. 👍

@DrTimothyAldenDavis
Copy link
Owner

Looks good -- thanks.

@DrTimothyAldenDavis DrTimothyAldenDavis merged commit bad1ee7 into DrTimothyAldenDavis:dev2 Aug 30, 2023
13 checks passed
@whuaegeanse whuaegeanse deleted the fix_openmp branch August 31, 2023 00:11
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.

3 participants