<div dir="ltr">Hi,<div><br></div><div>Debugging MPI programs is tricky - I strongly suggest that you start out with the default non-MPI build of GROMACS (and even run that in single-process mode with -ntmpi 1), so that you have fewer pieces of infrastructure that you need to learn to manage correctly. Also, check whether your local compute centers give access to TotalView or DDT graphical MPI debuggers that will manage all these things for you.</div><div><br>Mark</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 8, 2018 at 1:58 AM 1004753465 &lt;<a href="mailto:1004753465@qq.com">1004753465@qq.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><table style="width:99.8%"><tbody><tr><td id="m_-4632422197365189909QQMAILSTATIONERY" 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 &quot;run&quot; 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>--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.</blockquote></div>