NAMD Wiki: NamdOnMacOSX

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

Since NAMD is a console application, we used to call this Darwin, but we're over that now.


If you get this error when running NAMD:

dyld: ./namd2 can't open library: /opt/ibmcmp/lib/libibmc++.A.dylib  (No such file or directory, errno = 2)
Trace/BPT trap

Then your binary was built with IBM's xlC compiler (this is a good thing!) and you need to install the runtime libraries, most recently found at http://ftp.software.ibm.com/aix/products/ccpp/vacpp-rte-macos/ (follow the directions in http://ftp.software.ibm.com/aix/products/ccpp/vacpp-rte-macos/README ).

Note that Mac OS X 10.4.9 (and later?) will give a "Disk image you are opening may be damaged..." alert when you try to open the .dmg file. See http://docs.info.apple.com/article.html?artnum=305111 for further explanation. The file probably won't hurt anything.

If you have a cluster and don't want to run the installer on every node, you can copy the libibmc++.A.dylib file to a central NFS-mounted directory and setenv DYLD_LIBRARY_PATH /that/directory in your .cshrc file.

-Jim


We have dual-processor G5 and G4 machines, and an older G3. NAMD should run on all of these since there is no AltiVec acceleration. (There isn't SSE or SSE2 acceleration either.)

Here are some quick NAMD 2.5 apoa1 benchmarks:

Processor 1 CPU (g++) 1 CPU (xlC) 2 CPU (g++) 2 CPU (xlC)
2 GHz G5 5.01 s/step 4.19 s/step 2.66 s/step 2.30 s/step
1.25 GHz G4 10.2 s/step 8.42 s/step 5.4 s/step 4.54 s/step
1.333 GHz Athlon 7.5 s/step      
Athlon 2600+ MP 4.45 s/step   2.3 s/step  

to compile NAMD with IBM xlC compiler, you need to compile Charm++ with "xlc" build option:

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

If "xlc" option does not present, try downloading the latest Charm++ from http://charm.cs.uiuc.edu. The compatibility of Charm++ with NAMD is always maintained.

to config NAMD for xlC compiler:

./config ... MacOSX-PPC-xlC


With the help of some of the NAMD folks, I build NAMD with some of XLCs optimization flags. Here's what I did to compile NAMD and get the test libraries built. I used NAMD 2.5

Step 1) In the Charm directory I compiled with the following, mainly because I wanted to run all of the tests of charm (Note: When you build with ./build LIBS net-ppc-darwin xlc -O -DCMK_OPTIMIZE not all of the tests libraries get built):

./build LIBS net-ppc-darwin xlc -O -DCMK_OPTIMIZE

Then to compile the rest of the charm libraries (YOU SHOULD DO THIS PART), go to:

~/charm/net-ppc-darwin/tmp

and type

make LIBS OPTS='-O -DCMK_OPTIMIZE'

The previously documented instruction regarding de.C is no longer required with the latest xlc compiler installed on turing head nodes as of 03/15/2006.

Step 2) Move to the namd2 source directory. Following the notes for building NAMD. This mainly means adding in the fftw directory and libraries, setting the Make.charm path. For Tcl support I modified the MacOSX-PPC.tcl file in the arch directory to use Mac OS X's native Tcl (not sure if this was necessary though). The mods are shown below:

portal:~/namd2/arch notredame05$ cat MacOSX-PPC.tcl

TCLDIR=/System/Library/Frameworks/Tcl.framework TCLINCL=-I$(TCLDIR)/Headers TCLLIB=-framework Tcl TCLFLAGS=-DNAMD_TCL -DUSE_NON_CONST TCL=$(TCLINCL) $(TCLFLAGS)

Step 3) Configure and build with the following:

./config tcl fftw MacOSX-PPC-xlC

cd MacOSX-PPC-xlC

make

Step 4) Set rsh=ssh by doing:

export CONV_RSH=ssh

(I actually added this to my .bashrc)