# Gmx\_openmp\_max\_thread

**URL:** <https://gromacs.bioexcel.eu/t/gmx-openmp-max-thread/2896>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [October 1, 2021, 2:30pm UTC](https://gromacs.bioexcel.eu/t/gmx-openmp-max-thread/2896 "2021-10-01T14:30:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![slovas](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@slovas](https://gromacs.bioexcel.eu/u/slovas)\
**Post date:** [October 1, 2021, 2:30pm UTC](https://gromacs.bioexcel.eu/t/gmx-openmp-max-thread/2896/1 "2021-10-01T14:30:59Z")

</div>

GROMACS version: 2021.3  
GROMACS modification: Yes/No  
By default, gmx is built with 64 openMP threads, but I want to increase it so I get better performance with mdrun. I used the following cmake option:  
… -DGMX\_SIMD=AVX\_256 -DGMX\_OPENMP\_MAX\_THREAD=256 …  
But I have gotten the following message:  
“Manually-specified variables were not used by the project:  
GMX\_OPENMP\_MAX\_THREAD”  
I should add that I used this same option for gmx 2019 anf that time it worked all right.  
Any suggestions?  
thanks  
Sandor

---

<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:** [October 4, 2021, 8:02am UTC](https://gromacs.bioexcel.eu/t/gmx-openmp-max-thread/2896/2 "2021-10-04T08:02:08Z")

</div>

The correct name of the variable is GMX\_OPENMP\_MAX\_THREADS with an S as the end. Did you read somewhere that it should be without an S?

But usually using more than 64 threads, and often even much less, gives much worse performance than using more MPI ranks and fewer OpenMP threads on the same hardware.

---

<div class="post-metadata">

**Author:** ![slovas](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@slovas](https://gromacs.bioexcel.eu/u/slovas)\
**Post date:** [October 4, 2021, 2:18pm UTC](https://gromacs.bioexcel.eu/t/gmx-openmp-max-thread/2896/3 "2021-10-04T14:18:36Z")

</div>

Oh, those typo mistakes…  
thanks for the reply.  
Once I had a system for which -ntmpi 1 -ntomp 64 gave 110 ns/day ( the combination was picked by gmx) and than when I increased the threads, -ntmpi 1 -ntomp 72 gave 147 ns/day.  
Thanks  
Sandor
