Re: mpirun compilation for NAMD

From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Fri Dec 05 2008 - 02:56:30 CST

On 12/4/08, Warner Yuen <wyuen_at_apple.com> wrote:
> My confusion... I'm still somewhat fuzzy on the details from what I
> did in the past with NAMD and charm++. But I recall that straight charm
> ++ for the parallelization was supposed to faster than MPI? But maybe
> this was only for Myrinet-MX?

warner,
as giacomo wrote, NAMD _always_ uses charm++ to communicate
between the nodes. the charm++ middleware layer now can run on
top of several lowlevel communications, plain socket based TCP is
one of them, there as several others but MPI is also supported.
MPI over myrinet had some technical issues, so some additional
flags were needed to work around those issues.

in general, the integrated TCP/IP (i.e. communication via either
TCP or UDP) is supposed to be fastest when using TCP/IP, but i
also came across cases, where using charm++ over MPI was (marginally)
faster than the provided binaries.

in cases where you have a low latency network like myrinet, infiniband,
quadrics, SCI, and so on, using the (native) MPI is a big advantage,
since the TCP/IP encoding adds a high latency to any message and thus
limits the scaling.

have a look at the charm++ homepage and the documentation provided
there and do some tests with an MPI library that supports both TCP/IP
and myrinet/infiniband (e.g. OpenMPI) and run some MPI benchmarks
to see the differences. it is all pretty straightforward.

cheers,
    axel.

> Warner Yuen
> Scientific Computing
> Consulting Engineer
> Apple Computer
> email: wyuen_at_apple.com
> Tel: 408.718.2859
> Fax: 408.715.0133
>
>
>
> On Dec 4, 2008, at 10:13 AM, Giacomo Fiorin wrote:
>
>> NAMD always uses charm++. You wouldn't be able to compile it
>> otherwise.
>>
>> Using NAMD with MPI means that the charm++ communication runs over the
>> MPI protocol, instead of the "regular" TCP/IP Internet protocol. In
>> that case, charmrun becomes interchangeable with mpirun, but the
>> charm++ functions (with load balancing and all the other goodies) are
>> always inside the executable.
>>
>> Giacomo
>>
>>
>> ---- -----
>> Giacomo Fiorin
>> Center for Molecular Modeling at
>> University of Pennsylvania
>> 231 S 34th Street, Philadelphia, PA 19104-6323
>> phone: (+1)-215-573-4773
>> fax: (+1)-215-573-6233
>> mobile: (+1)-267-324-7676
>> mail: giacomo.fiorin_<at>_gmail.com
>> web: http://www.cmm.upenn.edu/
>> ---- ----
>>
>>
>>
>> On Thu, Dec 4, 2008 at 1:08 PM, Warner Yuen <wyuen_at_apple.com> wrote:
>>> Is MPI the best way to use NAMD? I thought that the use of charm++
>>> was the
>>> more efficient way to go. I haven't run NAMD in quite a while, but
>>> I recall
>>> building it with Myrinet support with charm++
>>>
>>>
>>> Warner Yuen
>>>
>>> Scientific Computing
>>>
>>> Consulting Engineer
>>>
>>> Apple Computer
>>>
>>> email: wyuen_at_apple.com
>>>
>>> Tel: 408.718.2859
>>>
>>> Fax: 408.715.0133
>>>
>>>
>>> On Dec 3, 2008, at 8:42 AM, Giacomo Fiorin wrote:
>>>
>>> Hi Neelanjana, the instructions on the NAMD release notes are
>>> generic,
>>> but on the charm++ documentation it is written quite clearly that
>>> "mpi-linux" is one of the modes of compilation for charm++, in which
>>> the library (charm++) uses MPI instead of the "basic" Internet
>>> protocol to transfer data across processors.
>>>
>>> But beware: if you want to compile charm++ (and later, namd2) to use
>>> MPI it means that you already have mpirun, and the rest of one of the
>>> many MPI libraries, already installed. Needless to say, you must
>>> make
>>> sure that you compile charm++ to use that one, and none other. You
>>> may have special network hardware, so you could need to add extra
>>> flags for that.
>>>
>>> In summary, once you've gathered info on how the machine you intend
>>> to
>>> run is organized, try to find instructions about similar machines on
>>> the pertinent webpage (charm.cs.uiuc.edu), in the Charm++ Wiki, and
>>> in
>>> the NAMD Wiki.
>>>
>>> There's just a tiny bit more information than in notes.txt.
>>>
>>> Giacomo
>>>
>>>
>>> ---- -----
>>> Giacomo Fiorin
>>> Center for Molecular Modeling at
>>> University of Pennsylvania
>>> 231 S 34th Street, Philadelphia, PA 19104-6323
>>> phone: (+1)-215-573-4773
>>> fax: (+1)-215-573-6233
>>> mobile: (+1)-267-324-7676
>>> mail: giacomo.fiorin_<at>_gmail.com
>>> web: http://www.cmm.upenn.edu/
>>> ---- ----
>>>
>>>
>>>
>>> On Wed, Dec 3, 2008 at 8:46 AM, Neelanjana Sengupta <senguptan_at_gmail.com
>>> >
>>> wrote:
>>>
>>> Hello all,
>>>
>>> I am trying to compile NAMD (from the source) for mpirun usage.
>>> Now, the
>>>
>>> instructions given in "notes.txt" is the foll:
>>>
>>> ---------
>>>
>>> If you're building an MPI version you will probably need to edit
>>>
>>> compiler flags or commands in the Charm++ src/arch directory. The
>>>
>>> file charm/src/arch/mpi-linux/conv-mach.sh contains the definitions
>>>
>>> that select the mpiCC compiler for mpi-linux, while other compiler
>>>
>>> choices are defined by files in charm/src/arch/common/.
>>>
>>> ----------
>>>
>>> I edited the conv-mach.sh file. Since there is no specific
>>> instruction for
>>>
>>> mpirun compilation, I did the foll:
>>>
>>> ./build charm++ net-linux --no-shared -O -DCMK_OPTIMIZE=1
>>>
>>> This built charm++, and not mpirun.
>>>
>>> This did not get me the mpirun compilation either:
>>>
>>> ./build mpirun net-linux --no-shared -O -DCMK_OPTIMIZE=1
>>>
>>> Can someone point out what I should be doing here?
>>>
>>> Thanks,
>>>
>>> Neela
>>>
>>> --
>>>
>>> ~~~~~~~~~~~~~~~~~~~~
>>>
>>> Neelanjana Sengupta, PhD
>>>
>>> Physical and Materials Chemistry Division
>>>
>>> National Chemical Laboratory
>>>
>>> Dr. Homi Bhaba Road
>>>
>>> Pune 411008, India
>>>
>>> Phone: +91-20-2590 2087
>>>
>>> ~~~~~~~~~~~~~~~~~~~~
>>>
>>>
>>>
>>>
>>
>
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
  Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:48:45 CST