usage of omp_set_num_threads-function, bugfix for maxresiduum