catch the omp_set_dynamic errors in a try catch block