Re: namd2 or charmrun ++local ?

From: Giacomo Fiorin (
Date: Fri Jun 17 2016 - 13:18:48 CDT

Hi Laura, it is only with certain versions of NAMD (particularly "smp" and
"multicore" builds) that you can launch multiple threads using namd2
+p[n]. These threads will work together on the simulation data, stored in
shared memory locations.

But in addition to launching multiple *threads*, as many other non-parallel
programs also do (including VMD), NAMD also has the capability to run as
separate *processes*. Processes are work units that run independently of
each other, i.e. the simulation data should be copied n times in memory.

To run multiple processes you must use charmrun and give to it the argument
+p[n]. Because charmrun would normally look for a list of nodes to
distribute the processes on, the ++local flag tells it to use only the
node/workstation it is running on.

Using multiple threads and multiple processes on a single node are
different ways of achieving the same goal, i.e. splitting up work in n
units. Regardless of that, it is generally the operating system that will
distribute work units (threads or processes) among the available processor
cores: your role will be to only specify how many they are.

You can also check the notes.txt file that comes with the NAMD distribution
you are using for more details.


On Fri, Jun 17, 2016 at 12:35 PM, Laura Joana <>

> Dear users,
> Maybe this question is more for the developers.
> I have a doubt for some time now and I discussed with some people and no
> one knew the answer, so I decide to come to you.
> To run NAMD in mode than one processor the best idea is to use the command
> charmrun and use +p[n], where n is the number of processors. But, the
> charmrun command has the option ++local to run in just one processor.
> What is the difference between using the command namd2 and using charmrun
> ++local namd2?
> Hope someone here know the answer!
> Thanks,
> Laura

Giacomo Fiorin
Associate Professor of Research
Institute for Computational Molecular Science (ICMS)
College of Science and Technology, Temple University
1925 North 12th Street (035-07), Room 704D
Philadelphia, PA 19122-1801
Phone: +1-215-204-4213
Lab page:
*"As computer programmers we have a responsibility to make sure that we run
the computers instead of the computers running us."*  - Steve Oualline

This archive was generated by hypermail 2.1.6 : Tue Dec 27 2016 - 23:22:16 CST