added explicit calls to set_omp_num_threads