salilab / pmi

Python Modeling Interface
https://integrativemodeling.org/nightly/doc/ref/namespaceIMP_1_1pmi.html
11 stars 11 forks source link

Lock access to best.scores.rex.py file #258

Closed benmwebb closed 2 years ago

benmwebb commented 2 years ago

When running replica exchange and opting to keep the N best scoring models, the best.scores.rex.py file is read and written by each task in the job. No locking is done here so multiple tasks may try to write to it at the same time, potentially resulting in garbage contents and a failure to read the file (even a successful read may get out of date contents). Lock access so that this doesn't happen.

benmwebb commented 2 years ago

The file should also be placed in the output directory (not the current working directory) so as not to conflict with other jobs. Or ideally, remove the file entirely and use MPI primitives to communicate scores.