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
openMPI can be downloaded at
MS-MPI can be downloaded at

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 <

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

1 comment:

  1. mpiexec -validate is returning fail. What should I do?