STAR Software Library:
Switching from 32-bit to 64-bit Builds
Dmitri Smirnov
Updated
Introduction and Motivation
- Main concerns for switching from 32- to 64-bit library build - Reproducibility of results - Verification of performance - Speedup - Memory footprint - Our prior knowledge includes the fact that calculations in 32 and 64 builds are carried out with different precision in FPU and XMM registers respectively - Our expectation is to see small difference in final results with the 32 and 64 libraries unless our algorithms are unstable - Although not expected, we would like to make sure there is no new "systematics" introduced
Test Setup Definition
- Environment for test builds is a x86_64 platform with Linux, ROOT v5-34-30, and gcc 4.8.5 - Investigate predefined build types in CMake - `CMAKE_BUILD_TYPE=Release` (i.e. `-O2 -DNDEBUG`) - `CMAKE_BUILD_TYPE=RelWithDebInfo` (i.e. `-O2 -g -DNDEBUG`) - `CMAKE_BUILD_TYPE=MinSizeRel` (i.e. `-Os -DNDEBUG`) - We perform both 32- and 64-bit builds
Assembly code for a test program
compiled in 32-bit and 64-bit modes
- Comparing 32-bit and 64-bit assembly code https://gcc.godbolt.org/z/Diy0T8 - Compiling our large code base in 64-bit environment without SSE instructions (i.e. 387) is not feasible due to differences in ABI of common standard libraries (e.g. `cmath`)
Memory Footprint Dignostics
- We monitor changes in memory used by reconstruction chains. This is done by means of 1. Calls to `stlib`'s `mallinfo()` to obtain allocated memory in the heap 2. Queries to `/proc/status` to obtain the total virtual memory used by the process -
Specific to STAR soft: Set environment variable `StarEndMakerShell`
- See slides
Memory Usage by Reconstruction Chain