Set limit to the number of threads if it is unset when we ask for the number.

This commit is contained in:
Michal Tóth committed 2025-01-14 09:56:10 +01:00
1 parent 25cd79c04b
commit b865e80c2f
1 file changed
+3
+3
View File
@@ -731,6 +731,9 @@ private:
std::cout << ("Warning: Invalid value for OMP_NUM_THREADS environment variable.") << std::endl;
}
}
} else {
// Set a limit to OMP threads. Defaults can saturate the whole machine.
omp_set_num_threads(threads);
}
first_time = false;