You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fact, while Optimiser.py states that this value defaults to True, it is often 0.
I've also seen consider_empty_communities evaluate to 32732 and 1081192448 (among many other "True" values), depending on whatever happened to reside in memory at the time.
A fix is to simply set this->consider_empty_community = true; in the Optimiser constructor (if defaulting to True is indeed intended).
For what it's worth, the valgrind error that initially alerted us to this problem (while writing #34) is as follows:
The text was updated successfully, but these errors were encountered:
ragibson
changed the title
Optimiser.consider_empty_communities should be initialized.
Optimiser.consider_empty_communities should be initialized
Jun 15, 2018
Optimiser::consider_empty_communities is never initialized (unless Optimiser.consider_empty_community is explicitly set from Python).
Hence, the if statement on line 402 of Optimiser.cpp is undefined behavior.
In fact, while Optimiser.py states that this value defaults to True, it is often 0.
I've also seen consider_empty_communities evaluate to 32732 and 1081192448 (among many other "True" values), depending on whatever happened to reside in memory at the time.
A fix is to simply set
this->consider_empty_community = true;
in the Optimiser constructor (if defaulting to True is indeed intended).For what it's worth, the valgrind error that initially alerted us to this problem (while writing #34) is as follows:
The text was updated successfully, but these errors were encountered: