[gmx-users] mdrun -nc
Joshua L. Phillips
jphillips7 at ucmerced.edu
Tue Jun 14 20:46:30 CEST 2011
On most of my multi-core machines, an attempt is made to detect the
number of threads to start at run-time (there may be a check for the
MAXIMUM number of threads at compile-time, but a developer would need to
chime in to determine if this is the case). For instance, I have a dual
quadcore machine (eight cores total). When I just run a command like so
on 4.5.4:
mdrun -v -deffnm trp-cage
I get:
Starting 8 threads
Loaded with Money
Making 2D domain decomposition 4 x 2 x 1
starting mdrun 'Good ROcking Metal Altar for Chronical Sinners in water'
100000 steps, 200.0 ps.
step 200, will finish Tue Jun 14 12:01:01 2011imb F 8%
...
So, by default the threaded version will start the maximum number of
threads that it can (if it can find a good decomposition for all cores,
otherwise fewer threads are used). So, -nt is used to explicitly control
the number of threads used (not -nc).
As Justin said, for running across multiple machines, MPI is necessary
and precludes using threads.
-- Josh
On Tue, 2011-06-14 at 11:15 -0400, Justin A. Lemkul wrote:
>
> Hsin-Lin Chiang wrote:
> > Hi,
> >
> > I tried gromacs 4.5.4 in these days and last version I used is 4.0.5.
> > I found when I add --enable-threads in installation.
> > I can use mdrun -nc 12 to run 12 CPUs together within one machine.
>
> I assume you mean -nt?
>
> > It also amazing me when I type "top" to check the job, only one process
> > in computer and the CPU utility is 1200%!!
>
> Sounds about right. I see the same on my dual-core workstation. One process, 2
> threads, and just less than 200% CPU usage.
>
> > But I tried to execute it on two machines, then the second machines
> > didn't work.
> >
>
> You can't execute threads over multiple machines. For that you need MPI, not
> threading (they are mutually exclusive). You haven't provided much detail on
> what you actually did in this case and "didn't work" doesn't exactly provide any
> relevant diagnostic information.
>
> > I don't need mdrun_mpi any more because mdrun -nc is faster the mdrun_mpi.
> > That make me confused.
> > Am I right to use mdrun -nc to run parallel job in this way?
>
> For a single, multi-core workstation, mdrun -nt is correct.
>
> > Does the result is the same as which is employed by mdrun_mpi?
>
> A variety of factors influence whether or not the results are the same.
>
> http://www.gromacs.org/Documentation/Terminology/Reproducibility
>
> > (Exactly I never use mdrun_mpi more than one machine since the ethernet
> > between machines is very slow here.)
> >
> > If mdrun -nc is available.
> > Do we have another commend support CPUs more than one in the same machine.
> >
>
> That's what threading is doing, assuming you're invoking the command correctly.
> As stated above, the option is -nt, not -nc. mdrun doesn't check for whether
> or not command line arguments are actually valid, so if you're using -nc you're
> not actually doing threading, but the 1200% usage suggests you probably are.
>
> -Justin
>
> --
> ========================================
>
> Justin A. Lemkul
> Ph.D. Candidate
> ICTAS Doctoral Scholar
> MILES-IGERT Trainee
> Department of Biochemistry
> Virginia Tech
> Blacksburg, VA
> jalemkul[at]vt.edu | (540) 231-9080
> http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin
>
> ========================================
--
Joshua L. Phillips
Ph.D. Candidate - School of Engineering
University of California, Merced
jphillips7 at ucmerced.edu
More information about the gromacs.org_gmx-users
mailing list