NAMD Wiki: NamdOnMyrinet

  You are encouraged to improve NamdWiki by adding content, correcting errors, or removing spam.


Myricom released new MX library and MPICH-MX. Latest development branch of Charm++ is now added with the support for both MX native communication library and MPICH/MX. It has been recently tested on Mac Tiger.

To build network version of charm++ for Tiger 64 bit on native mx library (bypassing MPICH/MX):

./build charm++ net-ppc-darwin mx cc64

to build 32 bit binary on native MX:

./build charm++ net-ppc-darwin mx

to build on MPICH/MX 32 bit:

./build charm++ mpi-ppc-darwin mx

to build on MPICH/MX 64 bit:

./build charm++ mpi-ppc-darwin mx64

I have not tested on Linux clusters. But I think similar thing can be done (with some tweaks).

Please download the latest version of Charm++ from cvs: Or you can find nightly build source at: Since many changes are just checked into cvs today, so find nightly tarball since tomorrow (2/4/2006) at that site.

Some minor change need to be done in NAMD config files to point to the charm build directory.



When you build NAMD for MPICH-GM (GM version 2) with CHARM 5.8 (with the gm2 flag enabled), you may also need to load libpthread.{a,so}; otherwise, the final compile may crash due to a missing definition for pthread_create. This is easily done by adding '-lpthread' to the Makefile.


NAMD with MPI-GM (GM version 2) may hang or crash after start up finishes at user threads, even with the change in Charm++ mentioned previously. This may be due to the latest change in MPI-GM (verison 2) which uses thread-safe ptmalloc and has some confliction in pthread package with Charm++.

I am not sure if the workaround mentioned in the Myricom FAQ (see the 1/2/04 note below) works or not. But if you don't want to recompile MPI-GM, please try the following.

Download the latest charm-5.8 or latest charm++ development snapshot directly from CVS. (instruction in Build Charm++ for mpi-linux with "gm2" option, as in,

build charm++ mpi-linux gm2

and then compile NAMD as normal, you need to change the config file in namd2/arch/Linux-i686-MPI.arch or similar to change CHARMARCH to the correct Charm++ build (i.e. mpi-linux-gm2).


The current MPICH-GM uses memory registration (if anyone know what this means, feel free to add an explanation) requires a special version of malloc. If NAMD is build using the Charm++ implementation of malloc you will get a runtime error on startup complaining about the wrong malloc being used. To eliminate this error with MPICH-GM you must use the new "gm" option when building Charm++ for mpi-linux, as in "build charm++ mpi-linux gm icc", or equivalently you can edit charm/arch/mpi-linux/conv-mach.h to set "#define CMK_MALLOC_USE_OS_BUILTIN 1" and the other malloc defines to 0.

Alternately you can use this woraround found on the Myrinet FAQ at

Can I run the NAMD application with MPICH-GM?

Yes. You can run the NAMD application with MPICH-GM. However, you must disable memory registration by specifying --with-device=ch_gm:-disable-registration when configuring MPICH-GM. You need to also remove the -lpthreads from your -lib= in your configure line. Pthreads was only needed for the threadsafe malloc.