msg-byu / enumlib

Derivative structure enumeration library
MIT License
59 stars 34 forks source link

Incorrect conditions for enum3 usage. #31

Closed wsmorgan closed 7 years ago

wsmorgan commented 7 years ago

When enumerating systems with site restrictions it is faster to use the subroutine generate_permutation_labelings, in labeling_related.f90, unless there isn't enough memory available to store the lists used by the algorithm. In that case the code should use the subroutine recursively_stabilized_enum instead. To make this happen currently we check to see if the number of possible arrangements exceeds some maximum cutoff, however depending on the system this cutoff could be a poor choice. We need to find a better way to determine which subroutine to use. The condition check happens between lines 1486 and 1500 in derivative_structure_generator.f90.

wsmorgan commented 7 years ago

Fixed in revision 1.0.6.

wsmorgan commented 7 years ago

The fix is really just a shortcut. When we try to fix this issue the right way by checking if the memory is available the compiler always reports that it is and continues into the enum3 code then segfalt due to memory issues. In light of this difficulty we have, for now, changed the multinomial cutoff to be a smaller number, 1E10 instead of 2E14. If this issue comes back up we may need to revisit the subject.