Syntax:
processors Px Py Pz keyword args ...
part args = Psend Precv cstyle
Psend = partition # (1 to Np) which will send its processor layout
Precv = partition # (1 to Np) which will recv the processor layout
cstyle = multiple
multiple = Psend layout will be multiple of Precv layout in each dimension
Examples:
processors 2 4 4 processors * * 5 processors * * * part 1 2 multiple
Description:
Specify how processors are mapped as a 3d logical grid to the global simulation box, namely Px by Py by Pz.
Any of the Px, Py, Pz parameters can be specified with an asterisk "*", which means LAMMPS will choose the number of processors in that dimension. It will do this based on the size and shape of the global simulation box so as to minimize the surface-to-volume ratio of each processor's sub-domain.
Since LAMMPS does not load-balance by changing the grid of 3d processors on-the-fly, this command can be used to override the LAMMPS default if it is known to be sub-optimal for a particular problem. For example, a problem where the atom's extent will change dramatically in a particular dimension over the course of the simulation.
The product of Px, Py, Pz must equal P, the total # of processors LAMMPS is running on. For a 2d simulation, Pz must equal 1. If multiple partitions are being used then P is the number of processors in this partition; see this section for an explanation of the -partition command-line switch.
Note that if you run on a large, prime number of processors P, then a grid such as 1 x P x 1 will be required, which may incur extra communication costs.
The part keyword can be useful when running in multi-partition mode, e.g. with the -partition">>run_style verlet/split command. It specifies a dependency bewteen a sending partition Psend and a receiving partition Precv which is enforced when each is setting up their own mapping of the partitions processors to the simulation box. Each of Psend and Precv must be integers from 1 to Np, where Np is the number of partitions you have defined via the command-line switch.
A "dependency" means that the sending partition will create its 3d logical grid as Px by Py by Pz and after it has done this, it will send the Px,Py,Pz values to the receiving partition. The receiving partition will wait to receive these values before creating its own 3d logical grid and will use the sender's Px,Py,Pz values as a constraint. The nature of the constraint is determined by the cstyle argument.
For a cstyle of multiple, each dimension of the sender's processor grid is required to be an integer multiple of the corresponding dimension in the receiver's processor grid. This is a requirement of the run_style verlet/split command.
For example, assume the sending partition creates a 4x6x10 grid = 240 processor grid. If the receiving partition is running on 80 processors, it could create a 4x2x10 grid, but it will not create a 2x4x10 grid, since in the y-dimension, 6 is not an integer multiple of 4.
Note that you can use the partition command to specify different processor grids for different partitions, e.g.
partition yes 1 processors 4 4 4 partition yes 2 processors 2 3 2
IMPORTANT NOTE: If you use the partition command to invoke different "processsors" commands on different partitions, and you also use the part keyword, then you must insure that both the sending and receiving partitions invoke the "processors" command that connects the 2 partitions via the part keyword. LAMMPS cannot easily check for this, but your simulation will likely hang in its setup phase if this error has been made.
Restrictions:
This command cannot be used after the simulation box is defined by a read_data or create_box command. It can be used before a restart file is read to change the 3d processor grid from what is specified in the restart file.
Related commands: none
Default:
Px Py Pz = * * *