mir-group / flare_pp

A many-body extension of the FLARE code.
MIT License
35 stars 7 forks source link

add deepcopy to mean_efs to prevent memory accumulation #24

Closed YuuuXie closed 3 years ago

YuuuXie commented 3 years ago

Bug: When calling sparse_gp_calculator, in the calculate function when the mean_efs is stored into self.results, the pointer to structure_descriptors seems to be kept, and is not destroyed when the gp_calc is altered. Then the memory of the descriptors (and derivatives) is not released, and is accumulated until blowing up.

Fix: the solution is to save the deepcopy of mean_efs to self.results.