And enable OpenMP afterwards, to process the 1 million strings in parallel using all the available cores.
Don't blindly throw work at multiple cores low down in algorithms. Amdahl's law tells you that the pay off is likely low, and if the program already makes proper use of the cores you're just going to slow things down.
That program is just a benchmark to map millions of string to integers, it's valid to optimize processing.
What about the inability to exit a parallel region--I was under the impression that once you start a parallel for, you can't exit it until it's run through the entire iteration.