Poor openmp scaling with ifort but not gfortran

Thank you for taking the time to confirm my findings. I very much appreciate it.
I have reported this issue to Intel and they are looking into it.
One interesting thing I noticed is that this issue doesn’t seem to occur if I give the parser a more complicated expression to evaluate.
So for example changing:

  ! All threads initialize the parser
  !$omp parallel num_threads(numThreads)
  call parser%parse(parserVars,parserVars)
  if (parser%error()) then
    call parser%print_errors(output_unit)
    stop 99
  endif
  !$omp end parallel

to the following:

  ! All threads initialize the parser
  !$omp parallel num_threads(numThreads)
  call parser%parse('sin(x) +cos(y)+cos(z)*exp(x*y)',parserVars)
  if (parser%error()) then
    call parser%print_errors(output_unit)
    stop 99
  endif
  !$omp end parallel

gives good scaling in ifort as well.