GROMACS version: 2021.4
GROMACS modification:
Here post your question : Can anyone please help me with how to run a parallel run on my Desktop. I went through the documentation for this but I could not understand it. Please explain how to do parallelization of the simulation.
Hi, by a parallel run do you mean a single simulation using multiple CPUs, or many simulations running at the same time (e.g. for replica exchange)?
In the former case, gmx mdrun
will run in parallel on all available CPUs by default, and several options allow you to limit resources’ use if needed (read about general differences between threads and processes). For example, on my 8-CPU laptop gmx mdrun
by default uses 1 MPI thread and 8 OpenMP threads per MPI thread (this is printed at the beginning of the run), and I can adjust these with the -ntomp
and -ntmpi
options.
You will also get a notification in the .log
file about how many CPUs Gromacs can see, e.g. Running on 1 node with total 4 cores, 8 logical cores
.
In the latter case, it’s just adding the -multidir dir_1 dir_2 ...
option, where each directory should contain the .tpr
tile that will start the respective simulation.
Thank you for replying.
So for a single simulation using multiple CPUs, I don’t need to do anything as it’s been done by default with GROMACS software ?
That’s right, you can also check your CPU usage e.g. with htop
while the simulation is running.
If you have a GPU, you can run the MD simulation parallelly on the GPU also. GPUs are highly efficient for parallel MD runs.