Closed mjacobse closed 1 year ago
If configured with --disable-openmp, running ssids_test with valgrind reveals dependency on uninitialised values. The issue is that the early returns in NumericSubtree, e.g. https://github.com/ralna/spral/blob/c50996a366c5e8d113633ddbf7a37a4bfc301a66/src/ssids/cpu/NumericSubtree.hxx#L115-L122 return stats before they have been initialized here: https://github.com/ralna/spral/blob/c50996a366c5e8d113633ddbf7a37a4bfc301a66/src/ssids/cpu/NumericSubtree.hxx#L237-L241 These were introduced in 2288ac81 as alternative to the omp cancel for when compiling without OpenMP.
--disable-openmp
ssids_test
NumericSubtree
stats
omp cancel
This moves up the initialisation of stats such that they can be returned safely from within the loops.
If configured with
--disable-openmp
, runningssids_test
with valgrind reveals dependency on uninitialised values. The issue is that the early returns inNumericSubtree
, e.g. https://github.com/ralna/spral/blob/c50996a366c5e8d113633ddbf7a37a4bfc301a66/src/ssids/cpu/NumericSubtree.hxx#L115-L122 returnstats
before they have been initialized here: https://github.com/ralna/spral/blob/c50996a366c5e8d113633ddbf7a37a4bfc301a66/src/ssids/cpu/NumericSubtree.hxx#L237-L241 These were introduced in 2288ac81 as alternative to theomp cancel
for when compiling without OpenMP.This moves up the initialisation of
stats
such that they can be returned safely from within the loops.