Thursday, May 13, 2010

Quick install guide for LAMMPS on Linux cluster

This is a quick installation guide for LAMMS 10 May 2010 version for Linux cluster and it can be done within 1 hours if you follow this carefully.

SYSTEM SPECIFICATION

Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
Red Hat Enterprise Linux Server release 5.4 (Tikanga) 2.6.18-164.11.1.el5
Intel compiler and MPI stack
mpiicc for the Intel(R) MPI Library 4.0 for Linux*
Copyright(C) 2003-2010, Intel Corporation. All rights reserved.
Version 11.1

Prerequisites

Download these 2 files and untar them, respectively.

- fftw-2.1.5.tar.gz
http://www.fftw.org/fftw-2.1.5.tar.gz
- lammps.tar.gz (lib for LAMMPS, LAMMPS itself)
http://lammps.sandia.gov/download.html

Instruction

In a nutshell, installation procedure consists of 3 steps; (1)FFTW, (2)libs for LAMMPS, (3)LAMMPS itself. And if you use mpiicc and mpiifort, then you don't have to worry about the PATH of MPI package and it will be taken care of automatically.

(1)FFTW

Even though the latest version of FFTW is 3.2.2, but, unfortunately, LAMMS can not work with it. You better stick to 2.1.5 for now. And I assume you're installing it at /usr/local/fftw-2.1.5 directory.

After uncompressing it,

cd fftw-2.1.5
./configure CC=mpiicc F77=mpiifort --prefix=/usr/local/fftw-2.1.5
make
make check
make install

(2)libs for LAMMPS

After uncompressing lammps.tar.gz,(actually, libs for LAMMPS is part of lammps.tar.gz)

cd lib/reax
Change ifort to mpiifort in Makefile.ifort
make -f Makefile.ifort

cd lib/meam
Change ifort to mpiifort in Makefile.ifort
make -f Makefile.ifort

cd lib/poems
Change icc to mpiicc in Makefile.icc
make -f Makefile.icc

(3)LAMMPS
cd src

Check which packages are included
make package-status

Choose all standard packages to be included
make yes-standard

If you don't have GPU, then exclude gpu package. Otherwise, you will see tons of error message when you compile it.
make no-gpu

Edit MAKE/Makefile.linux

Remove MPI_PATH,MPI_LIB, it will be taken care of by mpiicc, mpiifort
#MPI_PATH =
#MPI_LIB = -lmpich -lpthread

CC=mpiicc
LINK=mpiicc
FFT_INC = -I/usr/local/fftw-2.1.5/include -DFFT_FFTW
FFT_PATH = -L/usr/local/fftw-2.1.5/lib
FFT_LIB = -lfftw

Build LAMMPS as an executable and library as well

make linux
make makelib
make -f Makefile.lib linux

INSTALLATION

I assume you're installing lammps at /usr/local/lammps directory.

copy bench/ doc/ examples/ potentials/ README tools/ to /usr/local/lammps
copy all *.a to /usr/local/lammps/lib
copy lmp_linux to /usr/local/lammps/bin

Done!!!

Once you have gotten this far, just let user know lammps is available at /usr/local/lammps, then they know how to play around it.

9 comments:

  1. i have installed the cluster on RHEL 5.3 as mentioned by you. but it is not speeding up the calculations as i have three machines on cluster and secondly i have one machine with specifications as one of the machines of the cluster but the time taken by cluster to run same problem as compared to single machine, is not smaller. What needs to done to use the full capability of cluster

    ReplyDelete
  2. i have installed the cluster on RHEL 5.3 as mentioned by you. but it is not speeding up the calculations as i have three machines on cluster and secondly i have one machine with specifications as one of the machines of the cluster but the time taken by cluster to run same problem as compared to single machine, is not smaller. What needs to done to use the full capability of cluster

    ReplyDelete
  3. why did you not include user-atc module ?

    ReplyDelete
  4. @Karan,

    Generally speaking, if performance does not increaes as you increase number of CPUs, then, check the size of data/problem is big enough to take advantage of multiple CPUs. Then, check the utiliztion of network connection between nodes. If it saturates available network bandwith, upgrading network to faster one is one option. But, to be able to understand performance issue and how to fix it take a deeper monitoring and investigation with observed data. Please, leave more information if you need help. Thanks.

    ReplyDelete
  5. @jum

    Actually, there is no reason for that. Our use just need not that module. :)

    ReplyDelete
  6. Earlier seemed to be network issue as cluster need to have infiniband network connectivity. Now, I want to use above procedure to install LAMMPS on Beowulf cluster (with UBUNTU 10.04, GNU compilers, OpenMPI with ethernet connectivity) using http://www.linux.com/community/blogs/Building-a-Beowulf-Cluster-in-just-13-steps-.html (with openmpi instead of mpich1). Please elaborate the alterations which we have to make in the above mentioned procedure

    ReplyDelete
  7. I am pretty new to the Cluster thing, If i want to build LAMMPS on my cluster do i need to build it on all the nodes or just the Master node? provided all of them have the same architecture.

    ReplyDelete
    Replies
    1. If you use shared file system, which means all compute nodes share file system(or disk) , then, you just need to install on master node. Otherwise, each node is just like separate machine, so you have install it on all nodes.

      What file system are you using?

      Delete
  8. Nirmalya MukherjeeAugust 27, 2012 at 7:36 AM

    Hi..
    I want to install LAMMPS on ROCKS 5.5 with Centos 5.8 .
    Should I follow same procedure ?
    Also NAMD & GROWMACS to be installed in ROCKS 5.5.
    Thanks

    ReplyDelete