Remove short-circuit logic for OpenMP setup
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 26 Oct 2021 15:00:26 +0000 (15:00 +0000)
committerAndrey Alekseenko <al42and@gmail.com>
Tue, 26 Oct 2021 15:00:26 +0000 (15:00 +0000)
commit18b1eddae0e62ba4f12f28032e0d666b486d05b2
treea246c040277a689174b5848eb28aea0e4182878c
parent73b72755e65c648916684d5be68edca6356397e5
Remove short-circuit logic for OpenMP setup

This is only called once during mdrun setup, and it is not a problem
to call it multiple times. (Thread safety is assured separately.)
It's necessary to call it multiple times, e.g. from test binaries or
API-driven simulations.

Having removed the short-circuit logic, there was no use for the
member variable that recorded whether initialization had taken place,
so it is removed.

Closes #4152
src/gromacs/mdlib/gmx_omp_nthreads.cpp
src/gromacs/mdlib/gmx_omp_nthreads.h