[gmx-developers] mdrun with pulling - "Bad file descriptor"

Carsten Kutzner ckutzne at gwdg.de
Mon Nov 23 17:21:27 CET 2009


Hi,

when using the master branch version with pulling, I get the
following message on stderr as soon as a checkpoint file is written:

pullx.xvg: Bad file descriptor
pullf.xvg: Bad file descriptor

This is due to the fact that xvg files are opened in 'w' mode in
the xvgropen() routine, which prevents that gmx_fio_get_file_md5_lock()
can rewind them with fseek/fseeko.

The solution is to open xvg files in 'w+' mode in xvgropen(), so that
they are readable when the checkpoint is written. I think none of the
analysis tools do care whether the mode is w or w+? I assume that all
xvg files opened by mdrun would yield these problems.

Carsten



-- 
Dr. Carsten Kutzner
Max Planck Institute for Biophysical Chemistry
Theoretical and Computational Biophysics Department
Am Fassberg 11
37077 Goettingen, Germany
Tel. +49-551-2012313, Fax: +49-551-2012302
www.mpibpc.mpg.de/home/grubmueller/
www.mpibpc.mpg.de/home/grubmueller/ihp/ckutzne/



More information about the gromacs.org_gmx-developers mailing list