From: DimitryASuplatov (genesup_at_gmail.com)
Date: Mon Nov 09 2009 - 11:36:22 CST
Dear NAMD users,
To help people new to NAMD or just experiencing problems with 2.7b1
installation I wrote a small script to make the installation
automatically.
The script will download and install FFTW2.1.5, TCL8.3.3, CHARM_CVS
and NAMD_CVS to a specified directory. You will need NAMD CVS personal
login and password.
The script was meant for the following architecture:
Intel Xeon CPU E5450 Infiniband Cluster, mvapich 1.1 (mpich 1.2.7),
icc/ifort 11.0.069.
NO GUARANTEES, USE AT YOUR OWN RISK.
Hope this could help someone.
SDA
==============НАЧАЛО=====================
#!/bin/bash
#genesup_at_gmail.com
#===============================================
if [ -n "$1" ]; then
INSDIR="$1"
else
echo
echo "Usage $0 <INSDIR>"
echo
exit
fi
echo "Starting Installation"
read -p "Enter NAMD CVS username: " USERNAME
echo Username \"$USERNAME\" accepted
read -s -p "Enter NAMD CVS password: " PASSWORD
echo
TEMPPARAM=`echo $INSDIR | sed s/[\/]$//g`
INSDIR=$TEMPPARAM
TEMPDIR=`pwd`
echo "Installing to $INSDIR"
mkdir "$INSDIR"
echo
echo Performing NAMD installation to "$INSDIR"
echo
# You will need FFTW and TCL libraries. You may download precompiled
libraries from
# http://www.ks.uiuc.edu/Research/namd/libraries/ to avoid compiling
though use should
# ensure that they _match_ your CPU and OS architechture.
# We shall compile them from sources in stages 1 and 2
#1/ INSTALLING FFTW DO NOT USE INTEL COMPILERS ON THIS STAGE
if [ -f "fftw-2.1.5.tar.gz" ]; then
echo -n
else
wget http://www.ks.uiuc.edu/Research/namd/libraries/fftw-2.1.5.tar.gz
fi
tar xzf fftw-2.1.5.tar.gz
cd fftw-2.1.5/
./configure --enable-type-prefix --enable-float --prefix="$INSDIR"/fftw
make
make install
cd "$TEMPDIR"
echo Done
sleep 5
#2/ INSTALLING TCL DO NOT USE INTEL COMPILERS ON THIS STAGE
if [ -f "tcl8.3.3.tar.gz" ]; then
echo -n
else
wget http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.3.3.tar.gz
fi
tar xzf tcl8.3.3.tar.gz
cd tcl8.3.3/unix
./configure --prefix="$INSDIR"/tcl --disable-shared
make
make install
cd "$TEMPDIR"
echo Done
sleep 5
#5/ Installing CHARM++
echo Downloadinf CVS build of CHARM
wget http://charm.cs.uiuc.edu/autobuild/bin/charm_src.tar.gz
tar xzf charm_src.tar.gz
cd charm
export CONV_RSH="ssh"
export MPICXX=mpicxx
export MPICC=mpicc
./build charm++ mpi-linux-amd64 --no-shared -O -DCMK_OPTIMIZE=1
cd ..
mv charm $INSDIR
#6/ Installing NAMD
#tar xzf NAMD_2.7b1_Source.tar.gz
#cd NAMD_2.7b1_Source
#tar xf charm-6.1.tar
#cd charm-6.1
echo Downloading CVS build of NAMD
cvs -d :pserver:$USERNAME:$PASSWORD_at_cvs.ks.uiuc.edu:/namd/cvsroot login
cvs -d :pserver:$USERNAME_at_cvs.ks.uiuc.edu:/namd/cvsroot checkout namd2
cvs -d :pserver:$USERNAME_at_cvs.ks.uiuc.edu:/namd/cvsroot logout
cd namd2
echo "
FFTDIR=$INSDIR/fftw
FFTINCL=-I\$(FFTDIR)/include
FFTLIB=-L\$(FFTDIR)/lib -lsrfftw -lsfftw
FFTFLAGS=-DNAMD_FFTW
FFT=\$(FFTINCL) \$(FFTFLAGS)
" > arch/Linux-x86_64.fftw
echo "
TCLDIR=$INSDIR/tcl
TCLINCL=-I\$(TCLDIR)/include
TCLLIB=-L\$(TCLDIR)/lib -ltcl8.3 -ldl
TCLFLAGS=-DNAMD_TCL
TCL=\$(TCLINCL) \$(TCLFLAGS)
" > arch/Linux-x86_64.tcl
echo "
NAMD_ARCH = Linux-x86_64
CHARMARCH = mpi-linux-amd64
CHARMOPTS = -thread pthreads -memory os
FLOATOPTS = -ip -fno-rtti
CXX = mpicxx
CXXOPTS = -i-static -O2 \$(FLOATOPTS)
CXXNOALIASOPTS = -O3 -fno-alias \$(FLOATOPTS)
CC = mpicc
COPTS = -i-static -O2 \$(FLOATOPTS)
" > arch/Linux-x86_64-MPI-pathcc.arch
echo "
CHARMBASE = $INSDIR/charm
" > Make.charm
./config tcl fftw Linux-x86_64-MPI-pathcc --charm-arch mpi-linux-amd64
cd Linux-x86_64-MPI-pathcc
make
cd ../
mv Linux-x86_64-MPI-pathcc $INSDIR/
cd ../
echo Installation complete
echo You can run namd on single CPU or in parallel
echo "$INSDIR"/Linux-x86_64-MPI-pathcc/namd2 \<config.file\>
echo "$INSDIR"/Linux-x86_64-MPI-pathcc/charmrun -np 64 -maxtime 1000
"$INSDIR"/Linux-x86_64-MPI-pathcc/namd2 \<config.file\>
echo
===============КОНЕЦ=====================
This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:53:28 CST