Closed HomesGH closed 3 weeks ago
I can give you some context: The bhfmm
is the fast multipole method for long range interactions that was developed primarily by Nikola (I did the OpenMP parallelization of it as my master's thesis). As far as I know this code has not been touched since he left so it is unknown if it is still working (correctly). It is also not tested by the CI. So regarding your questions:
It is not that straightforward to replace the raw pointer to the Logger
(global_log
) with a smart pointer. Maybe somebody has any advice? My current implementation in this PR leads to a segmentation fault at the very end of the simulation (free(): invalid pointer
). I guess that the pointer is tried to be deleted but was already cleaned up before. Maybe it has something to do with the namespace Log
?
It is not that straightforward to replace the raw pointer to the
Logger
(global_log
) with a smart pointer. Maybe somebody has any advice? My current implementation in this PR leads to a segmentation fault at the very end of the simulation (free(): invalid pointer
). I guess that the pointer is tried to be deleted but was already cleaned up before. Maybe it has something to do with the namespaceLog
?
The issue was with _log_stream
. This could either be std::cout
which is globally managed and should not be deleted as it is managed by the runtime or a dynamically allocated ofstream
. The issue was solved by introducing a custom deleter during initialization.
Description
The code scanning revealed some "Resource not released in destructor" warnings. This PR intends to fix them.
BTW: Is
bhfmm
still in use/under development? I couldn't find any documentation regarding what it does. Maybe you know more, @cniethammer