git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@16053 f3b2605a-c512-4ea7-a41b...
[lammps.git] / doc / src / partition.txt
blobccef3590505dd0a6fc52dab603f45200bb8a6da0
1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
4 :link(ld,Manual.html)
5 :link(lc,Section_commands.html#comm)
7 :line
9 partition command :h3
11 [Syntax:]
13 partition style N command ... :pre
15 style = {yes} or {no}
16 N = partition number (see asterisk form below)
17 command = any LAMMPS command :ul
19 [Examples:]
21 partition yes 1 processors 4 10 6
22 partition no 5 print "Active partition"
23 partition yes *5 fix all nve
24 partition yes 6* fix all nvt temp 1.0 1.0 0.1 :pre
26 [Description:]
28 This command invokes the specified command on a subset of the
29 partitions of processors you have defined via the -partition
30 command-line switch.  See "Section 2.6"_Section_start.html#start_7
31 for an explanation of the switch.
33 Normally, every input script command in your script is invoked by
34 every partition.  This behavior can be modified by defining world- or
35 universe-style "variables"_variable.html that have different values
36 for each partition.  This mechanism can be used to cause your script
37 to jump to different input script files on different partitions, if
38 such a variable is used in a "jump"_jump.html command.
40 The "partition" command is another mechanism for having as input
41 script operate differently on different partitions.  It is basically a
42 prefix on any LAMMPS command.  The commmand will only be invoked on
43 the partition(s) specified by the {style} and {N} arguments.
45 If the {style} is {yes}, the command will be invoked on any partition
46 which matches the {N} argument.  If the {style} is {no} the command
47 will be invoked on all the partitions which do not match the Np
48 argument.
50 Partitions are numbered from 1 to Np, where Np is the number of
51 partitions specified by the "-partition command-line
52 switch"_Section_start.html#start_7.
54 {N} can be specified in one of two ways.  An explicit numeric value
55 can be used, as in the 1st example above.  Or a wild-card asterisk can
56 be used to span a range of partition numbers.  This takes the form "*"
57 or "*n" or "n*" or "m*n".  An asterisk with no numeric values means
58 all partitions from 1 to Np.  A leading asterisk means all partitions
59 from 1 to n (inclusive).  A trailing asterisk means all partitions
60 from n to Np (inclusive).  A middle asterisk means all partitions from
61 m to n (inclusive).
63 This command can be useful for the "run_style verlet/split" command
64 which imposed requirements on how the "processors"_processors.html
65 command lays out a 3d grid of processors in each of 2 partitions.
67 [Restrictions:] none
69 [Related commands:]
71 "run_style verlet/split"_run_style.html
73 [Default:] none