JeffersonLab / JANA2

Multi-threaded HENP Event Reconstruction
https://jeffersonlab.github.io/JANA2/
Other
6 stars 9 forks source link

Inconsistent retrieval of cache line size #245

Closed nathanwbrei closed 10 months ago

nathanwbrei commented 11 months ago

JANA uses three different mechanisms for specifying cache line size, at least one of which is hardcoded. Not only is this ugly and confusing, but it also harms build reproducibility: code compiled on two different CPUs could conceivably up with the same spack hash. We should replace them with a single CMake/preprocessor variable JANA2_CACHE_LINE_BYTES which defaults to 64.

While we are at it, we should make sure that all JANA2-specific preprocessor defines are prefixed with JANA2 to avoid conflicts.

nathanwbrei commented 11 months ago

I don't think we should prefix the CMake variable names with "JANA2", just the corresponding preprocessor defines. The first step is figuring out what preprocessor defines we use inside JANA2 to begin with.

nathanwbrei commented 11 months ago

Should be declared in JCpuInfo.h