<table style="width: 99.8%; "><tbody><tr><td id="QQMAILSTATIONERY" style="background:url(https://rescdn.qqmail.com/zh_CN/htmledition/images/xinzhi/bg/a_12.jpg) repeat-x left bottom #e3ebf4; min-height:550px; padding: 100px 55px 200px; ">Hello everyone,<br><br>I am trying to correct the velocity of atoms at every md step but I meet some problems so I would love to debug the mdrun of gromacs. but when I install the gromacs changed with DEBUG mode on and use xterm, it does no work.<br><br>I follow the instructions on the website.My debug script is <br><pre>#!/bin/csh -f
xterm -e gdb -x gdb_cmds ~/gromacs2018_debuginstall/usr/local/gromacs/bin/mdrun_mpi<br><br>and my gdb_cmds is <br><br>break reco_cal_vel<br>run -v<br><br>in which recp_cal_vel is a function I write and put in mdlib.<br><br>but when I use <br><br>mpirun -np 2 ./DEBUG<br><br>to debug it, it just comes out<br><br>[mpiexec@huan-Inspiron-5548] HYD_pmcd_pmi_alloc_pg_scratch (pm/pmiserv/pmiserv_utils.c:527): failed to allocate -24 bytes<br>[mpiexec@huan-Inspiron-5548] HYD_pmci_launch_procs (pm/pmiserv/pmiserv_pmci.c:108): error allocating pg scratch space<br>Segmentation fault (core dumped)<br><br>I do not know what happens.Then I gave up the DEBUG script and tried <br><br>mpirun -np 2 xterm -e gdb /home/huan/gromacs2018_debuginstall/usr/local/gromacs/bin/mdrun_mpi<br><br>it came out 2 windows in xterm. I set two break points at the same function in both windows and then type "run" in both windows, then both of them disappeared.<br><br>So how can I fix this problem? also, I wonder where I can put the .tpr files in the  debug process of mdrun_mpi?<br><br>Thank you for your help!<br><br>Regards,<br><br>Helena<br><br>Shanghai Jiao Tong University<br></pre></td></tr></tbody></table>