DrTimothyAldenDavis / SuiteSparse

The official SuiteSparse library: a suite of sparse matrix algorithms authored or co-authored by Tim Davis, Texas A&M University.
https://people.engr.tamu.edu/davis/suitesparse.html
Other
1.17k stars 262 forks source link

Fix *_USE_OPENMP, *_HAS_OPENMP, *_USE_CUDA, and *_HAS_CUDA #629

Closed DrTimothyAldenDavis closed 10 months ago

DrTimothyAldenDavis commented 10 months ago

See https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/622 .

If SUITESPARSE_USE_OPENMP is OFF, this forces all *_USE_OPENMP options to be OFF.

Likewise if SUITESPARSE_USE_CUDA is OFF, this forces all *_USE_CUDA options to be OFF.

Added SUITESPARSE_CONFIG_USE_OPENMP option, since SuiteSparse_config can optionally use OpenMP.

Also fixed a bug in ParU when OpenMP was disabled, to allow it to compile without OpenMP. ParU is fundamentally a parallel package, so OpenMP is highly recommended for ParU ... but it still can be compiled without it. If using OpenMP, ParU requires OpenMP 4.5 or later.