When I run the command mpirun -np 48 mdrun_mpi -deffnm md -v, the software works with no error, but it only runs as fast as when I'm using 1 CPU (the computer I'm using has 48). Can anyone provide pointers as to why there is no boost in speed?

  • 3
    $\begingroup$ Is your system large enough? GROMACS is so fast on a single core that IIRC you need at least hundreds of atoms per core to see any speedups. $\endgroup$ Mar 22, 2023 at 14:09
  • $\begingroup$ @SusiLehtola How would I know if it's large enough? My system has ~5000 atoms and gromacs thinks that the simulation will finish in 1 week for just 100 ns of simulation. $\endgroup$
    – hbc8
    Mar 22, 2023 at 16:51
  • $\begingroup$ to determine parallel speedup you have to run a sequence of system sizes. Start small and go bigger. 5000 atoms sounds like you should see parallellism... Are you sure the other calculation used only 1 CPU? It might have used shared-memory parallellism (e.g. OpenMP) instead! $\endgroup$ Mar 22, 2023 at 18:46
  • $\begingroup$ Try gmx_mpi instead of mpirun - the former works fine for me (Ubuntu 22.04, local compile with CUDA and MPI flags on). $\endgroup$ Mar 23, 2023 at 14:06
  • 1
    $\begingroup$ You're missing gmx_mpi, which you should have if compiled with the right flags, and you should also have a line in your .bashrc that adds the right paths to executables and such (see GROMACS installation instructions). If you are doing this via apt or similar, you'll need the gromacs-mpi package. $\endgroup$ Mar 24, 2023 at 17:30


Browse other questions tagged .