Showing posts with label building nwchem 6.1. Show all posts
Showing posts with label building nwchem 6.1. Show all posts

24 February 2012

74. Building nwchem 6.1 on debian testing 32 bit only


EDIT 18 May 2012: 
It's now been solved on 64 bit as well
Compiling nwchem 6.1 with internal libs on debian: http://verahill.blogspot.com.au/2012/05/compiling-nwchem-61-with-internal-libs.html
Compiling nwchem 6.1 with openblas on debian: http://verahill.blogspot.com.au/2012/05/building-nwchem-61-on-debian.html


This doesn't work with the 64 bit version of nwchem 6.1. There's a separate post on that. Nwchem 6.1 64 bit will build just fine, but will crash when run. Again, see the other post.

Building on 32 bit debian testing:



Put a hold on your mpich2 and mpich2-dev packages (see e.g. here for more details)
1. edit your /etc/apt/sources.list to allow packages from stable e.g.

deb ftp://ftp.au.debian.org/debian/ testing main contrib non-fre
deb ftp://ftp.au.debian.org/debian/ stable main contrib non-free

2. create an /etc/apt/preferences file e.g.

Package: *
Pin: release a=testing
Pin-Priority: 990
Package: *
Pin: release a=stable
Pin-Priority: -10
2. install v 1.2 explicitly
sudo apt-get update && sudo apt-get install mpich2=1.2.1.1-5 libmpich2-dev=1.2.1.1-5

3. put a hold on the packages

sudo su
echo "mpich2 hold"|dpkg --set-selections
echo "libmpich2-dev hold"|dpkg --set-selections

exit

Make sure you have the necessary packages:
sudo apt-get install build-essential gfortran fort77

I had some error messages before installing fort77. Not sure they are related.

Download the nwchem source
cd ~
wget http://www.nwchem-sw.org/images/Nwchem-6.1-2012-Feb-10.tar.gz
tar -xvf Nwchem-6.1-2012-Feb.tar.gz
cd nwchem-6.1

create buildconf.sh in ~/nwchem-6.1


export LARGE_FILES=TRUE
export TCGRSH=/usr/local/bin/ssh
export NWCHEM_TOP=/home/me/nwchem-6.1
export NWCHEM_TARGET=LINUX
export NWCHEM_MODULES=all
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE=$MPI_LOC/include/mpich2
export LIBMPI="-lmpich -lfmpich -lpthread"
export NWCHEM_MODULES="all"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

run
sh buildconf.sh


Building takes ages. But it works. Why it works for 32 bit and not 64 bit has me a bit confused, but it's probably a good hint to the solution.