how to decompose domain for parallelization correctly

Submitted by franciscohgt on Tue, 04/22/2014 - 06:53

Hello everyone

I do not understand how to decompose a problem correctly in parallel.

for example .... ¿what does this decomposition "# processors 2 2 3"?

thanks.

aaigner's picture

aaigner | Tue, 04/22/2014 - 18:18

Hi franciscohgt,

as always, the documentation is a good starting point.

The file your-liggghts-path/doc/processors.html says:
... Specify how processors are mapped as a 3d logical grid to the global simulation box. This involves 2 steps. First if there are P processors it means choosing a factorization P = Px by Py by Pz so that there are Px processors in the x dimension, and similarly for the y and z dimensions. Second, the P processors are mapped to the logical 3d grid.

In your case the command (without the hash) divides the simulation box in a grid of 2x2x3 cells = 12 processes. Thus, you have to start your simulation with
mpirun -np 12 liggghts < in.example
This is only useful if you have 12 cores. ;-)

Cheers,
Andreas