Less strict check for multithreading. Removes the CHECK-fail for num_threads > 1 when OpenMP is not detected Change-Id: I5c1d48aad66c8b7a1f73c93dae572b73953859a0
diff --git a/internal/ceres/program_evaluator.h b/internal/ceres/program_evaluator.h index 00724fe..82bb67a 100644 --- a/internal/ceres/program_evaluator.h +++ b/internal/ceres/program_evaluator.h
@@ -116,9 +116,13 @@ evaluate_preparers_( jacobian_writer_.CreateEvaluatePreparers(options.num_threads)) { #ifndef CERES_USE_OPENMP - CHECK_EQ(1, options_.num_threads) - << "OpenMP support is not compiled into this binary; " - << "only options.num_threads=1 is supported."; + if (options_.num_threads > 1) { + LOG(WARNING) + << "OpenMP support is not compiled into this binary; " + << "only options.num_threads = 1 is supported. Switching " + << "to single threaded mode."; + options_.num_threads = 1; + } #endif BuildResidualLayout(*program, &residual_layout_);