[gmx-developers] gmx I/O redirection troubles

Boris Timofeev boristim at mail.ru
Mon Jan 2 19:30:26 CET 2017


Now I finish development of Win64 GUI for a call of the Gromacs commands. 
It uses well structured help of Gromacs utilities for dynamic creation of modeless dialog boxes 
for a choice of parameters of a commands and then commands execution. 
It is implemented by non-blocked I/O redirection of gmx I/O through named pipes.
The main problem which I taked - The commands in interactive mode of user interaction hungs up, 
so without showing anything in the pipes. After some time of dances with tambourines (debugging),
I understood that faults caused by buffering of stdout/stderr, 
the problem was solved by adding of fflush (stdout/stderr) before an interactive call of fgets (., stdin).
In this regard I have any questions to developpers: 
- whether it makes a sense to add correction to a repository or it is better to make it to authors of a code?
- why such disorder with use of stdout and stderr in sources?
List of files witsh adding fflush:
gmx_eneconv.cpp
gmx_energy.cpp
gmx_make_ndx.cpp
gmx_trjcat.cpp
pdb2gmx.cpp
pdb2top.cpp
specbond.cpp
ter_db.cpp
index.cpp
And may be anything else?


-- 
Boris Timofeev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20170102/509b1dc7/attachment.html>


More information about the gromacs.org_gmx-developers mailing list