1

I'm a bit unexperienced using C++ or cmake and need some help using OR-Tools. The program runs and solves the problem. But when running the solver, there is a console output created that shows:

W0913 20:23:00.688635 23528 lp_solver.cc:151] 
******************************************************************  
* WARNING: Glop will be very slow because it will use DCHECKs    *  
* to verify the results and the precision of the solver.         *  
* You can gain at least an order of magnitude speedup by         *  
* compiling with optimizations enabled and by defining NDEBUG.   *  
******************************************************************

I included

set(GCC_COVERAGE_COMPILE_FLAGS "-Q -Ofast")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")

in my cmake file, but this seems to make no difference.

I would really like this order of magnitude speedup but I have no idea how to resolve this.

fnktb
  • 11
  • 2
  • 1
    Assuming you're using a single configuration generator: Have you used the release configuration? (`cmake -D CMAKE_BUILD_TYPE=Release -S ... -B ...`) `NDEBUG` should be defined in configurations other than debug configurations. If you;re using a multi configuration generator, build the project using `cmake --build ... --config Release` instead of leaving the configuration unspecified. – fabian Sep 13 '22 at 19:05
  • @fabian Thanks for your quick reply. The configuration was indeed set to default/debug. I now created the release configuration and ran the program again. The message disappeared and I hope this means the problem is resolved. Thanks a lot. cheers – fnktb Sep 13 '22 at 20:09

0 Answers0