omp_set_num_threads(threads_wanted); if (omp_get_num_threads() != threads_wanted) abort(); // Do work. return 0; } This is very similar to the omp_set_dynamic example in the OpenMP 3.0 draft spec . See page 270. -- Summary: omp_set_num_threads not working? Product: gcc Versi...