Difference between revisions of "NAMD"

From Tau Wiki
Jump to: navigation, search
Line 34: Line 34:
 
</pre>
 
</pre>
 
Verify that profile files have been generated in this directory.
 
Verify that profile files have been generated in this directory.
 
+
uilding NAMD 2.6==
 
 
 
 
==Preparing NAMD 2.6==
 
 
 
1. First edit Make.charm in NAMD's home so that CHARMBASE is set to the directory where charm-5.9 resides.
 
2. Next create a selective instrumentation file with these commands:
 
<pre>
 
%> cat select.tau
 
BEGIN_EXCLUDE_LIST
 
void Sequencer::thread#
 
void Controller::thread#
 
int NAMD_read_int#
 
void PDBDATA::scan#
 
Real PDBAtom::zcoor#
 
Real PDBAtom::ycoor#
 
Real PDBAtom::xcoor#
 
Bool Molocule::is_hydrogen#
 
END_EXCLUDE_LIST
 
 
 
BEGIN_FILE_EXCLUDE_LIST
 
*mainfunc.C
 
*memusage.C
 
*BackEnd.C
 
END_FILE_EXCLUDE_LIST
 
</pre>
 
And save this file in the NAMD home directory.
 
 
 
3. lastly edit arch/Linux-amd64-g++.arch so that it resembles:
 
<pre>
 
include /share/home/00968/tg802155/tau2/include/Makefile
 
NAMD_ARCH = Linux-amd64
 
CHARMARCH = net-linux-amd64
 
 
 
TAU_SELECT_FILE=/share/home/00968/tg802155/NAMD_2.6_Source/select.tau
 
 
 
CXX = $(TAU_COMPILER) -optTauSelectFile=$(TAU_SELECT_FILE) g++
 
CXXOPTS = -O3 -m64 -fexpensive-optimizations -ffast-math
 
CC = $(TAU_COMPILER) -optTauSelectFile=$(TAU_SELECT_FILE) gcc
 
COPTS = -O3 -m64 -fexpensive-optimizations -ffast-math
 
</pre>
 
 
 
==Building NAMD 2.6==
 
  
 
Begin in NAMD's home directory:
 
Begin in NAMD's home directory:
Line 83: Line 41:
 
%> ./config Linux-amd64-g++
 
%> ./config Linux-amd64-g++
 
%> cd Linux-amd64-g++
 
%> cd Linux-amd64-g++
</pre>
 
 
 
Make one final modification to the Makefile in Linux-amd64-g++ directory, find this line:
 
<pre>
 
namd2:  $(INCDIR) $(DSTDIR) $(OBJS) $(LIBS)
 
  $(MAKEBUILDINFO)
 
  $(CHARMC) -verbose -ld++-option \
 
  "$(COPTI)$(CHARMINC) $(COPTI)$(INCDIR) $(COPTI)$(SRCDIR) $(CXXOPTS)" \
 
  -module NeighborLB -module commlib -language charm++ \
 
</pre>
 
change the file to be:
 
<pre>
 
namd2:  $(INCDIR) $(DSTDIR) $(OBJS) $(LIBS)
 
  $(MAKEBUILDINFO)
 
  $(CHARMC) -L$(TAU_LIB_DIR) -ltau$(TAU_CONFIG) -verbose -ld++-option \
 
  "$(COPTI)$(CHARMINC) $(COPTI)$(INCDIR) $(COPTI)$(SRCDIR) $(CXXOPTS)" \
 
  -module NeighborLB -module commlib -language charm++ \
 
</pre>
 
 
Now run:
 
<pre>
 
%> make
 
 
</pre>
 
</pre>
  
Line 112: Line 47:
 
%> ./charmrun ++local ./namd2 src/alanin
 
%> ./charmrun ++local ./namd2 src/alanin
 
</pre>
 
</pre>
You should have generated a performance data file, profile.0.0.0.
+
You should have generated TAU performance data.

Revision as of 23:45, 15 January 2009

Guide to building and running NAMD 2.6 with TAU

Currently this guide is for building NAMD and charm++ from source on x86 64-bit architecture. One would follow similar step on other machines but some of the file names would be changed.

Building Charm++

Automatic instrumentation of charm applications using TAU is available in the unreleased version of Charm++ which you can download here: http://charm.cs.uiuc.edu/download/ (click on the nightly CVS source archive). To compile Charm++:

%> cd charm
%> ./build charm++ net-linux-amd64 -O3
...
%> ./build charm++ mpi-linux-amd64 --tau-makefile=$HOME/tau2/x86_64/lib/Makefile-tau-mpi -O3

As always the TAU Makefile you specify determines what profiling/tracing options to use. Wait for charm to finish building then test the configuration by:

%> cd mpi-linux-amd64/tests/charm++/simplearrayhello
%> make OPTS='-tracemode Tau'
%> ./charmrun ./hello +p4

Verify that this program runs without any errors and that you generate profiles files for each processor.

Building TAU

Make sure to have the latest version of TAU installed on your system. To configure TAU to work with charm++ do the following:

%> cd tau2
%> ./configure -pdt=<path to pdt> -charm=<path to the NAMD_2.6_Source/charm-5.9>
...
%> make clean install

To confirm TAU is working properly with charm++ try running this example program:

%> cd examples/charm
%> export PATH=<path to NAMD/charm-5.9/bin>
%> make
%> ./charmrun ++local ./pgm

Verify that profile files have been generated in this directory. uilding NAMD 2.6==

Begin in NAMD's home directory:

%> cd NAMD_2.6_Source
%> ./config Linux-amd64-g++
%> cd Linux-amd64-g++

If everything works properly you should now have a namd2 executable. Test by running:

%> ./charmrun ++local ./namd2 src/alanin

You should have generated TAU performance data.