Here's a streamlined version of compiling and setting up nwchem with mpich2 support on a virgin debian testing (wheezy) 64 bit computer. I'm working on a build guide for nwchem 6.1 -- currently it builds fine but all jobs end with a Segmentation Violation error and exits with status 11.
Start by running
sudo apt-get install build-essential gfortran
Edit these two files (the preferences one will most likely not exist)
/etc/apt/sources.list
deb ftp://ftp.au.debian.org/debian/ testing main contrib non-free
deb ftp://ftp.au.debian.org/debian/ stable main contrib non-free
deb ftp://ftp.au.debian.org/debian/ unstable main contrib non-free
/etc/apt/preferences
Package: *
Pin: release a=testing
Pin-Priority: 990
Package: *
Pin: release a=unstable
Pin-Priority: -10
Package: *
Pin: release a=stable
Pin-Priority: 10
IMPORTANT: the pin-priority for stable must be positive (here +10), or it won't work.
Run
sudo apt-get install mpich2=1.2.1.1-5 libmpich2-dev=1.2.1.1-5
Set the Pin-priority to -10 for stable again.
sudo su
echo "mpich2 hold"|dpkg --set-selections
echo "libmpich2-dev hold"|dpkg --set-selections
mkdir ~/nwchem
cd ~/nwchem
touch buildconf.sh
chmod +x buildconf.sh
(EDIT 21/02/2012: I accidentally put a bad csh-formatted buildconf.sh file at the beginning. Then I put an incomplete bash version. It should work now.)
In buildconf.sh put
export LARGE_FILES=TRUE
export TCGRSH=/usr/local/bin/ssh
export NWCHEM_TOP=/home/myhome/nwchem/nwchem-6.0
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES=all
export USE_MPI=y
export USE_MPIF=y
export MPI_LOC=/usr
export MPI_INCLUDE=$MPI_LOC/include/mpich2
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran
Then download the source code for nwchem
wget http://www.nwchem-sw.org/images/Nwchem-6.0.tar.gz
tar -xvf Nwchem-6.0.tar.gz
To start building:
./buildconf.sh
Once it's built:
echo "PATH=$PATH:/home/myname/nwchem/nwchem-6.0/bin/LINUX64" >> ~/.bashrc
source ~/.bashrc
Prepare mpd
echo "MPD_SECRETWORD=jibberjabber" >> ~/.mpd.conf
chmod 600 ~/.mpd.conf
mpd --ncpus=3 &
Edit: 12/02/2012 It looks like version of nwchem currently in SID is built with mpi support: http://packages.debian.org/sid/nwchem . I haven't checked it out.
Start by running
sudo apt-get install build-essential gfortran
Edit these two files (the preferences one will most likely not exist)
/etc/apt/sources.list
deb ftp://ftp.au.debian.org/debian/ testing main contrib non-free
deb ftp://ftp.au.debian.org/debian/ stable main contrib non-free
deb ftp://ftp.au.debian.org/debian/ unstable main contrib non-free
Package: *
Pin: release a=testing
Pin-Priority: 990
Package: *
Pin: release a=unstable
Pin-Priority: -10
Package: *
Pin: release a=stable
Pin-Priority: 10
IMPORTANT: the pin-priority for stable must be positive (here +10), or it won't work.
Run
sudo apt-get install mpich2=1.2.1.1-5 libmpich2-dev=1.2.1.1-5
Set the Pin-priority to -10 for stable again.
sudo su
echo "mpich2 hold"|dpkg --set-selections
echo "libmpich2-dev hold"|dpkg --set-selections
mkdir ~/nwchem
cd ~/nwchem
touch buildconf.sh
chmod +x buildconf.sh
(EDIT 21/02/2012: I accidentally put a bad csh-formatted buildconf.sh file at the beginning. Then I put an incomplete bash version. It should work now.)
In buildconf.sh put
export LARGE_FILES=TRUE
export TCGRSH=/usr/local/bin/ssh
export NWCHEM_TOP=/home/myhome/nwchem/nwchem-6.0
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES=all
export USE_MPI=y
export USE_MPIF=y
export MPI_LOC=/usr
export MPI_INCLUDE=$MPI_LOC/include/mpich2
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran
Then download the source code for nwchem
wget http://www.nwchem-sw.org/images/Nwchem-6.0.tar.gz
tar -xvf Nwchem-6.0.tar.gz
To start building:
./buildconf.sh
Once it's built:
echo "PATH=$PATH:/home/myname/nwchem/nwchem-6.0/bin/LINUX64" >> ~/.bashrc
source ~/.bashrc
Prepare mpd
echo "MPD_SECRETWORD=jibberjabber" >> ~/.mpd.conf
chmod 600 ~/.mpd.conf
mpd --ncpus=3 &
Prepare for a test-run
touch nwchem.nw
Put the following in the nwchem.nw file:
start benzene
geometry units angstroms
C 0.100 1.396 0.000
C 1.209 0.698 0.000
C 1.209 -0.698 0.000
C 0.000 -1.396 0.000
C -1.209 -0.698 0.000
C -1.209 0.698 0.000
H 0.000 2.479 0.000
H 2.147 1.240 0.000
H 2.147 -1.240 0.000
H 0.000 -2.479 0.000
H -2.147 -1.240 0.000
H -2.147 1.240 0.000
end
basis
H library sto-3g
c library sto-3g
end
dft
xc b3lyp
end
task dft optimize
Launch the job:
mpdrun -n 2 nwchem nwchem.nw
And you should be ready to gotouch nwchem.nw
Put the following in the nwchem.nw file:
start benzene
geometry units angstroms
C 0.100 1.396 0.000
C 1.209 0.698 0.000
C 1.209 -0.698 0.000
C 0.000 -1.396 0.000
C -1.209 -0.698 0.000
C -1.209 0.698 0.000
H 0.000 2.479 0.000
H 2.147 1.240 0.000
H 2.147 -1.240 0.000
H 0.000 -2.479 0.000
H -2.147 -1.240 0.000
H -2.147 1.240 0.000
end
basis
H library sto-3g
c library sto-3g
end
dft
xc b3lyp
end
task dft optimize
Launch the job:
mpdrun -n 2 nwchem nwchem.nw
Edit: 12/02/2012 It looks like version of nwchem currently in SID is built with mpi support: http://packages.debian.org/sid/nwchem . I haven't checked it out.
ConversionConversion EmoticonEmoticon