18 May 2012

156. Compiling nwchem 6.1 with internal libs, openmpi, python on debian testing/wheezy

I followed this thread: http://www.nwchem-sw.org/index.php/Special:AWCforum/st/id435/segmentation_fault--running_smal....html

See here for build with external blas: http://verahill.blogspot.com.au/2012/05/building-nwchem-61-on-debian.html

--Start here --
sudo apt-get install libopenmpi-dev python-dev

sudo mkdir /opt/nwchem
sudo chown ${USER} /opt/nwchem
cd /opt/nwchem
wget http://www.nwchem-sw.org/images/Nwchem-6.1-2012-Feb-10.tar.gz
tar xvf Nwchem-6.1-2012-Feb-10.tar.gz
mv nwchem-6.1 nwchem-6.1_internal
cd nwchem-6.1_internal/

Edit src/config/makefile.h and add -lz -lssl to the end of line 1914 (needed by python)

Edit src/tools/GNUmakefile and add two lines as shown below in red (line numbers added by me for illustration only) -- editing needed for compile with internal libs.
355 ifneq ($(BLAS_LIB),)
356     ifeq ($(BLAS_SIZE),4)
357         MAYBE_BLAS = --with-blas4="$(strip $(BLAS_LIB))"
358     else
359         MAYBE_BLAS = --with-blas8="$(strip $(BLAS_LIB))"
360     endif
361 endif
to
355 ifneq ($(BLAS_LIB),)
356     ifeq ($(BLAS_SIZE),4)
357         MAYBE_BLAS = --with-blas4="$(strip $(BLAS_LIB))"
358     else
359         MAYBE_BLAS = --with-blas8="$(strip $(BLAS_LIB))"
360     endif
361 else
362     MAYBE_BLAS = --without-blas
363 endif
Then continue as normal:


export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONVERSION=2.7
export PYTHONHOME=/usr
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

**If you get errors relating to openssl etc. at the end of compile, try building without python support by removing anything in blue. You won't need to do make clean so the rebuild will be quick. 

Building takes ages

Edit your ~/.bashrc and add
export NWCHEM_EXECUTABLE=/opt/nwchem/nwchem-6.1_internal/bin/LINUX64/nwchem
export NWCHEM_BASIS_LIBRARY=/opt/nwchem/nwchem-6.1_internal/src/basis/libraries/
export PATH=$PATH:/opt/nwchem/nwchem-6.1_internal/bin/LINUX64


Links to this post:
http://chemport.ru/forum/viewtopic.php?f=71&t=98589

No comments:

Post a Comment