Closed matr1x-1 closed 3 months ago
Hi, maybe one solution could be instead of copying the entire pickle object, you can copy the DFT settings/parameters, and rebuild a new DFT calculator. But this needs a bit hack of the flare source code
That's right. This is the approach that worked in the end. However, it's of course not very elegant.
Sounds great it works in the end. And sorry for the late reply. If you think the code change is going to be helpful, feel free to make a pull request and we can consider merging it into the main code base. I will close this issue for now.
Hi,
I am using flare on-the-fly training with CP2K. As a test, we have tried to run the full.yaml simulation from the examples folder. With vasp it seems to work fine. With CP2K however, the training crashes almost immediately with the error: "TypeError: cannot pickle '_thread.lock' object" coming from line 582 in flare/learners/otf.py:
self.atoms.calc = deepcopy(self.dft_calc)
Do you know what the issue is here and is there maybe a fix?
Flare version: 1.4.0
Thanks a lot!