[gmx-developers] On integrating 'progrep' - a command-line utility to show live status, ETA etc. - with GROMACS

sdphys_rs Calcutta University sdphys_rs at caluniv.ac.in
Mon Nov 30 16:01:26 CET 2020

Hello all,

I have recently released a command-line utility, called 'progrep'
(DOI: 10.5281/zenodo.4294762), which is intended to show % completed,
wall-time remaining (ETA), wall-time elapsed, number of threads, CPU
usage and speed (Frames Per Second) for any molecular dynamics (MD)
simulation. 'progrep' works in client+server model. The server can be
installed in the simulation source code (such as md.cpp in
src/gromacs/mdrun/) with only 4 extra lines, viz.

# include <cprogrep.h>   // The progrep header for C++ code

progrep_installer();   //Installs SIGWINCH handler

progrep_tot=<total number of MD steps>;   //Before entering the main loop

progrep_curr=<current MD step>;   //Inside the main loop

When the 'progrep' command is invoked through terminal, it queries this
server by sending a SIGWINCH signal at 1s intervals. The server
handles this signal by writing the current simulation state (just 16
bytes) atomically to a binary pipe, which the user-invoked client then
reads, processes and displays. 'progrep' does not interfere with or
slow down the simulation when not invoked. Even when invoked, the
overhead is insignificant (only 16 bytes stream output every second).

The purpose of this mail is to inquire if integration of the
progrep-server or driver in the official version of GROMACS would be
useful in your opinion. If GROMACS ships with 'progrep', the end-user
would be able to track the above-mentioned aspects of live GROMACS
simulations easily in real-time, any time, without waiting for /
depending on the md.log updates that only happen once in a while. In
addition, with the command: progrep list, the user would be able to
list all active GROMACS simulations with their respective process id,
start time and login/user name - an empty list indicating all GROMACS
jobs are complete/terminated.

'progrep' can be availed under GPL-v3-or-later from DOI:
10.5281/zenodo.4294762 or https://sourceforge.net/projects/progrep/ .
Sample codes are provided therein to demonstrate how it all works.

Somajit Dey
Department of Physics, University of Calcutta

More information about the gromacs.org_gmx-developers mailing list