<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 25/03/2011 8:36 AM, Adam Herbst wrote:
<blockquote
cite="mid:AANLkTikRPXubG9oa=r0vm1Bi_Gv0HFDavDB0G1Fb=Yca@mail.gmail.com"
type="cite">Thank you all for your help! I ran
<div><br>
</div>
<div> make distclean</div>
<div><br>
</div>
<div>and re-configured in the GROMACS source folder via</div>
<div><br>
</div>
<div> sudo ./configure --prefix=$SOFT --with-gsl --enable-threads
CFLAGS="$CFLAGS -I$SOFT/include" LDFLAGS="$LDFLAGS -L$SOFT/lib"</div>
<div> sudo make -j $NCPU</div>
<div> sudo make install</div>
</blockquote>
<br>
As a general rule, one should minimize the use of super-user
accounts. You never know when some idiot has messed up the configure
script, and running it as super-user can trash your machine. It is
safer to maintain the source code in a directory writable by whoever
will be building it. Now "configure" and "make" can be run as a
normal user. Only the step that needs write access to system areas
needs sudo, i.e. "make install".<br>
<br>
Another good idea is to keep separate an unmodified version of
GROMACS and your modified one. Now you you just source the GMXRC
from the version you want to use. Then if you run into some problem,
you can sometimes immediately establish that it wasn't the fault of
your changed code. Alternatively or additionally, using "./configure
--suffix=_m" (or whatever) gives you confirmation of which version
you are using every time you use it.<br>
<br>
Mark<br>
<br>
<blockquote
cite="mid:AANLkTikRPXubG9oa=r0vm1Bi_Gv0HFDavDB0G1Fb=Yca@mail.gmail.com"
type="cite">
<div>where SOFT is the installation directory for FFTW3 and GSL,
and NCPU is the number of processors (24) in my machine. I
found if I didn't specify the CFLAGS and LDFLAGS when running
configure (even if they were already environment variables with
the proper paths), I got an error that the FFTW3 header file or
library couldn't be found.</div>
<div><br>
</div>
<div>Now when I run mdrun, it automatically uses multiple threads
and goes just as fast as before my changes. Thanks again,</div>
<div><br>
</div>
<div>Adam</div>
<div><br>
<br>
<div class="gmail_quote">On Thu, Mar 24, 2011 at 9:00 AM, Mark
Abraham <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:Mark.Abraham@anu.edu.au">Mark.Abraham@anu.edu.au</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div class="im">On <a moz-do-not-send="true"
href="tel:24%2F03%2F2011%2011" target="_blank">24/03/2011
11</a>:51 PM, Adam Herbst wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Dear GROMACS users,<br>
I successfully installed GROMACS 4.5.1 several months
ago on a Mac Pro with 12 CPUs, and the "mdrun" command
(not "mpirun mdrun_mpi") allows parallel simulations--it
automatically uses multiple processors, while the number
of processors can be manually specified as N with the
flag "mdrun -nt N". I understand that this is a feature
of GROMACS 4 and later.<br>
</blockquote>
<br>
</div>
Yes, threading, enabled by default, and mutually
incompatible with MPI.
<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Now I am making minor changes to the mdrun source code,
and I want to recompile such that the parallel version
of mdrun is updated with my changes. But when I run:<br>
<br>
make mdrun (or just make)<br>
make install-mdrun (or just make install)<br>
<br>
from the top-level source directory, the only
executables that are updated are the ones with the _mpi
suffix, such as mdrun_mpi. The version of mdrun in
src/kernel/ is updated, but this one has no -nt flag and
cannot seem to run on multiple processors. And when I
run<br>
</blockquote>
<br>
</div>
Subsequently you have configured with --enable-mpi, so
threading is disabled. Now everything is probably a mess.
<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<br>
mpirun -np N mdrun_mpi [options],<br>
<br>
the same simulation is started separately on each
processor, leading to a crash. If I use<br>
<br>
mpirun -np 1 -cpus-per-proc N mdrun_mpi [options],<br>
<br>
I get an error message that this is not supported on my
computer ("An attempt to set processor affinity has
failed").<br>
<br>
I can't configure the input .tpr file for parallel
because grompp doesn't have the -np flag in GROMACS 4.<br>
<br>
How can I update the parallel-capable "mdrun" executable
with my changes?<br>
</blockquote>
<br>
</div>
Run "make distclean" and then re-configure.<br>
<font color="#888888">
<br>
Mark</font>
<div>
<div class="h5"><br>
-- <br>
gmx-users mailing list <a moz-do-not-send="true"
href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br>
<a moz-do-not-send="true"
href="http://lists.gromacs.org/mailman/listinfo/gmx-users"
target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a moz-do-not-send="true"
href="http://www.gromacs.org/Support/Mailing_Lists/Search"
target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a>
before posting!<br>
Please don't post (un)subscribe requests to the list.
Use the www interface or send it to <a
moz-do-not-send="true"
href="mailto:gmx-users-request@gromacs.org"
target="_blank">gmx-users-request@gromacs.org</a>.<br>
Can't post? Read <a moz-do-not-send="true"
href="http://www.gromacs.org/Support/Mailing_Lists"
target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>