This problem with using CALL OMP_SET_NUM_THREADS(nthreads) was introduced after Gfortran ver 11.1.0 on the Windows version supplied by equation.com
implementation. I have not been able to get a response to reporting this issue.
I have not tested other sources of Windows versions of Gfortran, since 11.1.0.
As noted, using the NUM_THREADS clause fixed the issue, but this requires a rework of all previous codes.
I have previously noted this issue, including at the end of:
Non Windows versions do not have this problem.