# Query:Reagrding using the multiple nodes's GPU or CPU to run MD production step in gromacs

**URL:** <https://gromacs.bioexcel.eu/t/query-reagrding-using-the-multiple-nodess-gpu-or-cpu-to-run-md-production-step-in-gromacs/12919>\
**Category:** User discussions\
**Tags:** mdrun, cpu, gpu, simulation-setup\
**Created:** [November 14, 2025, 6:47am UTC](https://gromacs.bioexcel.eu/t/query-reagrding-using-the-multiple-nodess-gpu-or-cpu-to-run-md-production-step-in-gromacs/12919 "2025-11-14T06:47:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmrtsahu](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@nmrtsahu](https://gromacs.bioexcel.eu/u/nmrtsahu)\
**Post date:** [November 14, 2025, 6:47am UTC](https://gromacs.bioexcel.eu/t/query-reagrding-using-the-multiple-nodess-gpu-or-cpu-to-run-md-production-step-in-gromacs/12919/1 "2025-11-14T06:47:24Z")

</div>

GROMACS version:2021  
GROMACS modification: Yes/No  
Hello everyone, I am using below script to run the md production step. I want to distribute or run the single job of MD in gromacs using muliple node cpu or gpu. but I think the script is running many independent jobs., i m bit confused so please if anyone can guide for this. Thank you!

#!/bin/bash  
#SBATCH --job-name=kfdv\_md\_gpu  
#SBATCH --nodes=8  
#SBATCH --ntasks-per-node=1 # 1 MPI rank per node  
#SBATCH --ntasks=8 # total ranks = nodes × ranks per node  
#SBATCH --cpus-per-task=40 # OpenMP threads per rank  
#SBATCH --gpus-per-node=1  
#SBATCH --partition=gpu  
#SBATCH --time=1-00:00:00  
#SBATCH --output=md\_prod\_gpu\_%j.out  
#SBATCH --error=md\_prod\_gpu\_%j.err

echo “Job started on $(date)”  
echo “Nodes: $SLURM\_NNODES Tasks: $SLURM\_NTASKS”

srun -n $SLURM\_NTASKS gmx\_mpi mdrun -deffnm md\_200\_kfdv -ntomp $SLURM\_CPUS\_PER\_TASK

---

<div class="post-metadata">

**Author:** ![lmullender](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@lmullender](https://gromacs.bioexcel.eu/u/lmullender)\
**Post date:** [November 14, 2025, 10:41am UTC](https://gromacs.bioexcel.eu/t/query-reagrding-using-the-multiple-nodess-gpu-or-cpu-to-run-md-production-step-in-gromacs/12919/2 "2025-11-14T10:41:58Z")

</div>

Your script looks ok to me. What makes you think it’s running many independent jobs? If the script starts running, it should produce a number of files, including a `md_200_kfdv.log` file. This file contains quite a bit of useful information. If you scroll down past the author list and version info, you’ll find a summary of the hardware GROMACS was able to detect for this run. If you scroll further down past the mdp options, it will also report exactly what work it’s doing on how many MPI ranks and devices. If everything is going well, you should see something like

`Using 8 MPI ranks`  
`Using 40 OpenMP threads per MPI rank`

---

<div class="post-metadata">

**Author:** ![nmrtsahu](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@nmrtsahu](https://gromacs.bioexcel.eu/u/nmrtsahu)\
**Post date:** [November 18, 2025, 6:09am UTC](https://gromacs.bioexcel.eu/t/query-reagrding-using-the-multiple-nodess-gpu-or-cpu-to-run-md-production-step-in-gromacs/12919/3 "2025-11-18T06:09:26Z")

</div>

> [@lmullender](#):
>

> [@lmullender](#):
>

It appears that the simulation is running **independent jobs** rather than a single distributed run. This is evident from the multiple log, energy, and trajectory files being generated (e.g., `#md.log.1#`, `#md.log.2#`, etc.), which indicates that each job is executing separately. Moreover, the workload is **not being distributed across multiple nodes** — instead, **each node is running an independent job** , with **one MPI rank per node** rather than parallel ranks contributing to a single simulation.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [November 18, 2025, 8:12am UTC](https://gromacs.bioexcel.eu/t/query-reagrding-using-the-multiple-nodess-gpu-or-cpu-to-run-md-production-step-in-gromacs/12919/4 "2025-11-18T08:12:52Z")

</div>

Then most likely your gromacs installation was not configured to use an MPI library.

---

<div class="post-metadata">

**Author:** ![nmrtsahu](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@nmrtsahu](https://gromacs.bioexcel.eu/u/nmrtsahu)\
**Post date:** [November 20, 2025, 6:56am UTC](https://gromacs.bioexcel.eu/t/query-reagrding-using-the-multiple-nodess-gpu-or-cpu-to-run-md-production-step-in-gromacs/12919/5 "2025-11-20T06:56:25Z")

</div>

Ok. I will look into this. thank you for your response
