Dec 10, 2014

LAMMPS - Parallel computing on a multi-core Windows flatform

LAMMPS, a molecular dynamics simulator supports parallel computing.
To use such parallel function, we need to install MPI. (MPICH2, openMPI, or MS-MPI)


For Windows 7,
MPICH2 can be downloaded at  http://www.mpich.org/downloads/
openMPI can be downloaded at  https://www.open-mpi.org/software/
MS-MPI can be downloaded at  http://www.microsoft.com/en-au/download/details.aspx?id=36045


After installing,
1. two excutable files (mpiexec.exe and smpd.exe) need to be copied to LAMMPS bin folder (with lmp_serial.exe and lmp_mpi.exe).
2. open a command prompt (cmd.exe) as an administrator and then type the following commands in sequence.
     smpd -install
     mpiexec -remove
     mpiexec -register     (set up "username" and "password")
     mpiexec -validate     (it should return "SUCCESS")
     smpd -status     (it should return "smpd running on 'hostname')


Now, we are ready to run parallel computing.
When running, "-localonly '# of processors' " option should be used.
mpiexec -localonly 4 lmp_mpi < example.in

To make sure, just compare results of both serial and parallel simulations using same input script.
e.g.,
lmp_serial < example.in
mpiexec -localonly 4 lmp_mpi < example.in



1 comment: