I have a for loop, which I don't want to parallelise, which calls a function which I want to parallelise (which has a for loop in it that I want to parallelise). I want to put the parallel region outside of the whole lot, so that my threads only get created once (to reduce the overhead of thread creation).

However, at the moment I have a `omp single` covering the for loop, which calls the function and an `omp for` inside the function to deal with the internal for loop. It hands, and according to [OMP single hangs inside for](https://stackoverflow.com/questions/5778727/omp-single-hangs-inside-for) this is because doing that is illegal!

If I can't do it that way, how can I approach it? I want to make sure that only one thread runs the outer for loop and calls the function, but that inside the function I can get full parallelism.

Is this possible? Any ideas?