# GMX\_MPI running

**URL:** <https://gromacs.bioexcel.eu/t/gmx-mpi-running/7442>\
**Category:** User discussions\
**Created:** [October 20, 2023, 3:34pm UTC](https://gromacs.bioexcel.eu/t/gmx-mpi-running/7442 "2023-10-20T15:34:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vadiambos](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@vadiambos](https://gromacs.bioexcel.eu/u/vadiambos)\
**Post date:** [October 20, 2023, 3:34pm UTC](https://gromacs.bioexcel.eu/t/gmx-mpi-running/7442/1 "2023-10-20T15:34:57Z")

</div>

Hi everyone!  
I have some problems with running gmx\_mpi on more then one nodes. I have 4 nodes to run with 64 threads, but when i use slurm script with “mpirun gmx\_mpi …”, gromacs starts the process on 4 nodes with… 32 cores in total, when 4 nodes will be with 32x4 cores and 64x4 threads.

Thanks everyone for replying!

OpenMPI version 4.0.2

In .log file i see this. Gromacs using 4 nodes, but only with 16 threads, whats looks weird… And using 64 mpi threads by default. Can i use all cores and threads of 4 or at least 2 nodes? It will be 128 threads.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/f/f135d023dd50de9b65093d69440c65c76c7148a4.png)

Slurm script that i used to run job:

#!/bin/bash -l

# 

#SBATCH --job-name=GROMACS  
#SBATCH --time=2400:00:00  
#SBATCH --partition=general  
##SBATCH --partition=fatMemNode2Tb  
##SBATCH --partition=gpunode  
#SBATCH -e output\_err\_%j  
#SBATCH -o output\_%j  
##SBATCH --ntasks=8  
#SBATCH --nodes=4  
#SBATCH -n 64

export PATH=/home/vddayneko/soft/gromacs2023.3\_mpi/bin:$PATH

##export GMX\_OPENMP\_MAX\_THREADS=256

##export OMP\_NUM\_THREADS=32

gmx\_mpi grompp -f em.mdp -c complex\_solv\_ions.gro -p topol.top -o em.tpr

sleep 5

mpirun gmx\_mpi mdrun -deffnm em -v

sleep 5

---

<div class="post-metadata">

**Author:** ![vadiambos](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@vadiambos](https://gromacs.bioexcel.eu/u/vadiambos)\
**Post date:** [October 20, 2023, 3:37pm UTC](https://gromacs.bioexcel.eu/t/gmx-mpi-running/7442/2 "2023-10-20T15:37:43Z")

</div>

By the way i have another gromacs build with OpenMP support: enabled (GMX\_OPENMP\_MAX\_THREADS = 256).
