On 5/16/2018 2:33 PM, Charles Cardoso wrote: > When changing the number of threads dynamically in OpenMP, I've seen that > if the next region has fewer threads than the previous, the exceed is left > to die. So, in the future, if another region needs more threads is > necessary calling pthread_create() again. Why doesn't libgomp maintains the > exceed threads in the pool to reuse case necessary? > libgomp and other OpenMP implementations default to keeping the entire pool alive for an interval up to 200 ms. Did you read up on OMP_WAIT_POLICY ? On libgomp Windows, I don't think these environment variables work, but you might well wish to increase the wait. -- Tim Prince