7 Şubat 2013 Perşembe

334. Compiling nwchem with openmpi and python on Arch linux

To contact us Click HERE
Here's the reason why I gave my virtual machine 30 Gb in post 333 -- to be able to evaluate whether I can figure out how to build all the software that I need on Arch.

Behold my surprise when I realised that there's no need for separate -dev packages, as is the case on Debian i.e. the headers are generally installed together with the package (so e.g. python is enough -- you don't need python-dev as well).

While debian is probably the best choice for my nodes (I want stability -- not the latest flashiest stuff), nwchem is a good test case since I've been playing with it for years, and it's not available in the pacman or AUR repos.

Your mileage with openblas will vary depending on your hardware. ACML is an alternative on e.g. FX-8150. ATLAS doesn't seem to work with NWChem when I try it, but I'm not sure what I'm doing wrong. See the original post for examples on how to link to other math libs.

I'm mainly looking at this post: http://verahill.blogspot.com.au/2012/09/briefly-compiling-nwchem-611-with.html


Dependencies:
pacman -S wget base-devel gcc-fortran tcsh openmpi

Openblas:
Download from http://github.com/xianyi/OpenBLAS/tarball/v0.1.1

sudo mkdir /opt/openblassudo chown $USER /opt/openblastar xvf xianyi-OpenBLAS-v0.1.1-0-g5b7f443.tar.gzcd xianyi-OpenBLAS-e6e87a2/make all BINARY=64 CC=/usr/bin/gcc FC=/usr/bin/gfortran USE_THREAD=0 INTERFACE64=1 1> make.log 2>make.errmake PREFIX=/opt/openblas installcp lib*.*  /opt/openblas/lib

Nwchem:
sudo mkdir /opt/nwchemsudo chown $USER /opt/nwchemcd /opt/nwchemwget http://www.nwchem-sw.org/images/Nwchem-6.1.1-src.2012-06-27.tar.gztar xvf Nwchem-6.1.1-src.2012-06-27.tar.gzcd nwchem-6.1.1-src/

Edit nwchem-6.1.1-src/src/config/makefile.h and edit line 1957 as shown in this post.

Then continue:
export LARGE_FILES=TRUEexport TCGRSH=/usr/bin/sshexport NWCHEM_TOP=`pwd`export NWCHEM_TARGET=LINUX64export NWCHEM_MODULES="all python"export PYTHONVERSION=2.7export PYTHONHOME=/usrexport BLASOPT="-L/opt/openblas/lib -lopenblas"export USE_MPI=yexport USE_MPIF=yexport USE_MPIF4=yexport MPI_LOC=/usr/lib/openmpiexport MPI_INCLUDE=/usr/includeexport LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi:/opt/openblas/libexport LIBMPI="-L/usr/lib/openmpi -lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"cd $NWCHEM_TOP/srcmake cleanmake nwchem_configmake FC=gfortran 1> make.log 2>make.errexport FC=gfortrancd ../contrib./getmem.nwchem

Note that some of the locations are a little bit different from debian.

Edit your ~/.bashrc and add:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openblas/libexport PATH=$PATH:/opt/nwchem/bin/LINUX64
You can now test your new binary by running a job, e.g. co.nw:
title "co nmr"geometryc 0 0 0o 0 0 1.13endbasis * library "6-311+g*"enddft direct grid fine mult 1 xc HFexch 0.05 slater 0.95 becke88 nonlocal 0.72 vwn_5 1 perdew91 0.81endtask dft optimize
Run:

nwchem co.nw

or
mpirun -n 2 nwchem co.nw

Hiç yorum yok:

Yorum Gönder