BallisticLA / RandBLAS

A header-only C++ library for sketching in randomized linear algebra
https://randblas.readthedocs.io/en/latest/
Other
64 stars 4 forks source link

Ignore me (opened for debugging purposes) #78

Closed rileyjmurray closed 7 months ago

rileyjmurray commented 7 months ago

Making this PR now only so that CI runs.

First commit: switch to C++20, define a template concept for signed integers and use it in sparse matrices. For reasons that are entirely unclear, the TestStateUpdate.Gaussian_identity and TestStateUpdate.Final_State tests are failing. Maybe this stems from the switch to C++20? Need to investigate.

Investigation notes

The tests only fail on OpenMP builds. There's an old StackOverflow post about OpenMP not allowing unsigned types in for loops. Maybe that's at play? Unclear to me why this would happen only after bumping the C++ standard from 17 to 20. I googled C++20 OpenMP and found someone asking a question here three years ago; one commenter there said "The support for OpenMP and newer C++ features is still quite patchy and buggy across compilers."

The verdict

I had defined a config.h file explicitly so that VSCode's Intellisense didn't complain about not being able to find it. Even though CMake creates a config.h file at build time, it looks like it was being shadowed by the empty config.h file I had created. So in order to fix failing tests I needed to remove the empty config.h file and make VSCode happy some other way.

(The underlying technical problem is that a compiler preprocessor directive was causing us to think OpenMP was using one thread when it fact it was using several threads.)