limit number of OpenMP threads to available processors

unreasonably large numbers of threads cause crashes