Closed nh2 closed 5 years ago
Likely fix for the issue in PR #37.
Since I did not write the code I will have to check which value makes sense and in which context the variable is used.
@pmoulon Thanks! I am reasonably sure that 0
is the correct initial value (see also #37), but having you confirm it would be a great assurance.
PMVS2 is nondeterministic because its results depend on uninitialised memory.
This can be easily detected by
valgrind
, which saysMore than 10000000 total errors detected. I'm not reporting any more.
whenpmvs2
is run on some inputs.Reason
The
Patch
class does not initialise its fieldin the constructor https://github.com/pmoulon/CMVS-PMVS/blob/a0672745a0ba1d33990e623aee60122522eb215d/program/base/pmvs/patch.h#L13-L20
However, this field is read in
setScales()
in https://github.com/pmoulon/CMVS-PMVS/blob/a0672745a0ba1d33990e623aee60122522eb215d/program/base/pmvs/patchOrganizerS.cc#L678-L689Initialising
m_dscale
to0
or1
fixes all valgrind errors.Question
I am not quite sure what the initial value of
m_dscale
should be. Should it be0
or1
?Thanks @pmoulon!