votca / votca

The source of the votca-csg and xtp packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Statefile locking mechanism

baumeier opened this issue · comments

For creation and modification of the *.hdf5 file during/after the mapping of a MD trajectory with xtp_map, we employ a file locking with boost::intersystem::file_lock.

On MacOS, this leads to undesired behavior: even the process that creates a process lock with

  boost::interprocess::file_lock flock(hdf5file_.c_str());
  flock.lock();

cannot access the file.

Replacing flock.lock() with flock.lock_shareable() solves this problem. However, I am not sure if this causes unindented behavior as I am not aware of the rationale behind this specific choice of file lock. Any suggestions?

Hmm, I think creating a shareable lock should be fine.