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.11k stars 256 forks source link

ParU: Explicitly include <cinttypes> in header that uses `PRId64` #772

Closed mmuetzel closed 4 months ago

mmuetzel commented 4 months ago

Potentially fixes #769.

mmuetzel commented 4 months ago

The build error for one of the demos of the SPEX library seems to be unrelated to this change.

DrTimothyAldenDavis commented 4 months ago

I see the problem in SPEX. An openmp for loop had for (int id = ...) where the value id is declared in the for loop itself. I just fixed it.

SPEX (to become v3.1) needs a threadprivate variable (via OpenMP or at __threads keyword) for thread safety (see https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/e32105e32f486bc7a2ab8e57e0979b3dee9b162c/SPEX/SPEX_Utilities/Source/SPEX_gmp.c#L77), and spex_demo_threaded is a new demo program that tests this.