Run_windows.txt 2.5 KB
Newer Older
Richard Berger's avatar
Richard Berger committed
1
"Higher level section"_Run_head.html - "LAMMPS WWW Site"_lws - "LAMMPS
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)

:line

Running LAMMPS on Windows :h3

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

Get a command prompt by going to Start->Run... ,
then typing "cmd". :ulb,l

Move to the directory where you have your input script,
(e.g. by typing: cd "Documents"). :l

At the command prompt, type "lmp_serial -in in.file", where
in.file is the name of your LAMMPS input script. :l,ule

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 :pre

:line

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:

for 32-bit Windows: "mpich2-1.4.1p1-win-ia32.msi"_download.lammps.org/thirdparty/mpich2-1.4.1p1-win-ia32.msi
for 64-bit Windows: "mpich2-1.4.1p1-win-x86-64.msi"_download.lammps.org/thirdparty/mpich2-1.4.1p1-win-x86-64.msi :ul

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 subdirectory
[bin] and execute [smpd.exe -install]. Exit the command window.

Get a new, regular command prompt by going to Start->Run... ,
then typing "cmd". :ulb,l

Move to the directory where you have your input file
(e.g. by typing: cd "Documents"). :l,ule

Then type something like this:

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

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 :pre

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 :pre