Hello everyone.
I’m running a parallel simulation using LAMMPS version 24 December 2020 MPI and I’ve noticed that changing the number of cores assigned to the simulation significantly impacts performance. I’ve found that using more cores doesn’t always result in faster run times. For instance, a friend reported their best results with 17 cores.
I’m curious if anyone else has experienced this issue and has any suggestions for optimizing performance. Specifically, I’m using mpiexec
to launch my simulations.
There is a whole section of the LAMMPS manual, that discusses various aspects of getting the best performance: 7. Accelerate performance — LAMMPS documentation
Welcome to the HPC club!
What you are observing is completely normal, it’s called strong scaling (here a quick explanation).
Also, consider upgrading LAMMPS to a newer version.
It is not only that, but with the number of MPI tasks, you also change the domain decomposition and for a non-homogeneous system, that can lead to significant load imbalances unless the “processors” command is used in a smart way and possibly also load balancing commands.
Sure, spatial decomposition is important and wonderfully embroidered in the LAMMPS code. I doubt that @armid is dealing with surfaces or highly inhomogeneous systems, but if that’s the case, please refer to the documentation of the balance
command.
Thank you all for the solutions.