Higher level section - LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

Running LAMMPS on Windows

To run a serial (non-MPI) executable, follow these steps:

Note that the serial executable includes support for multi-threading parallelization from the styles in the USER-OMP packages. To run with 4 threads, you can type this:

lmp_serial -in in.lj -pk omp 4 -sf omp 

For the MPI executable, which allows you to run LAMMPS under Windows in parallel, follow these steps.

Download and install a compatible MPI library binary package:

The LAMMPS Windows installer packages will automatically adjust your path for the default location of this MPI package. After the installation of the MPICH2 software, it needs to be integrated into the system. For this you need to start a Command Prompt in Administrator Mode (right click on the icon and select it). Change into the MPICH2 installation directory, then into the sub-directory bin and execute smpd.exe -install. Exit the command window.

Then type something like this:

mpiexec -localonly 4 lmp_mpi -in in.file
mpiexec -np 4 lmp_mpi -in in.file 

where in.file is the name of your LAMMPS input script. For the latter case, you may be prompted to enter your password.

In this mode, output may not immediately show up on the screen, so if your input script takes a long time to execute, you may need to be patient before the output shows up.

The parallel executable can also run on a single processor by typing something like this:

lmp_mpi -in in.lj 

Note that the parallel executable also includes OpenMP multi-threading, which can be combined with MPI using something like:

mpiexec -localonly 2 lmp_mpi -in in.lj -pk omp 2 -sf omp