Browse Source

Merge branch 'master' into cli_refactoring

tempestpy_adaptions
dehnert 8 years ago
parent
commit
e3eb667914
  1. 4
      resources/3rdparty/CMakeLists.txt
  2. 11
      resources/cmake/find_modules/FindGurobi.cmake
  3. 2
      src/storm/solver/GurobiLpSolver.cpp

4
resources/3rdparty/CMakeLists.txt

@ -178,8 +178,8 @@ if (STORM_USE_GUROBI)
set(STORM_HAVE_GUROBI ${GUROBI_FOUND})
if (GUROBI_FOUND)
message (STATUS "Storm - Linking with Gurobi.")
add_imported_library(Gurobi "" ${GUROBI_LIBRARY} ${GUROBI_INCLUDE_DIRS})
list(APPEND STORM_DEP_TARGETS Gurobi)
add_imported_library(Gurobi SHARED ${GUROBI_LIBRARY} ${GUROBI_INCLUDE_DIRS})
list(APPEND STORM_DEP_TARGETS Gurobi_SHARED)
endif()
else()
set(STORM_HAVE_GUROBI OFF)

11
resources/cmake/find_modules/FindGurobi.cmake

@ -22,6 +22,9 @@ find_path(GUROBI_INCLUDE_DIR
"/Library/gurobi604/mac64/include"
"/Library/gurobi605/mac64/include"
"/Library/gurobi650/mac64/include"
"/Library/gurobi651/mac64/include"
"/Library/gurobi652/mac64/include"
"/Library/gurobi702/mac64/include"
"C:\\libs\\gurobi502\\include"
"C:\\gurobi600\\win64\\include"
"${GUROBI_ROOT}/include"
@ -38,11 +41,16 @@ find_library( GUROBI_LIBRARY
gurobi56
gurobi60
gurobi65
gurobi70
PATHS "$ENV{GUROBI_HOME}/lib"
"/Library/gurobi502/mac64/lib"
"/Library/gurobi602/mac64/lib"
"/Library/gurobi604/mac64/lib"
"/Library/gurobi605/mac64/lib"
"/Library/gurobi650/mac64/lib"
"/Library/gurobi651/mac64/lib"
"/Library/gurobi652/mac64/lib"
"/Library/gurobi702/mac64/lib"
"C:\\libs\\gurobi502\\lib"
"C:\\gurobi600\\win64\\lib"
"${GUROBI_ROOT}/lib"
@ -56,6 +64,9 @@ find_library( GUROBI_CXX_LIBRARY
"/Library/gurobi604/mac64/lib"
"/Library/gurobi605/mac64/lib"
"/Library/gurobi650/mac64/lib"
"/Library/gurobi651/mac64/lib"
"/Library/gurobi652/mac64/lib"
"/Library/gurobi702/mac64/lib"
"C:\\libs\\gurobi502\\lib"
"C:\\gurobi600\\win64\\lib"
"${GUROBI_ROOT}/lib"

2
src/storm/solver/GurobiLpSolver.cpp

@ -65,7 +65,7 @@ namespace storm {
// Enable the following line to only print the output of Gurobi if the debug flag is set.
toggleOutput(storm::settings::getModule<storm::settings::modules::DebugSettings>().isDebugSet() || storm::settings::getModule<storm::settings::modules::GurobiSettings>().isOutputSet());
// Enable the following line to restrict Gurobi to one thread only.
error = GRBsetintparam(env, "Threads", storm::settings::getModule<storm::settings::modules::GurobisSettings>().getNumberOfThreads());
error = GRBsetintparam(env, "Threads", storm::settings::getModule<storm::settings::modules::GurobiSettings>().getNumberOfThreads());
STORM_LOG_THROW(error == 0, storm::exceptions::InvalidStateException, "Unable to set Gurobi Parameter Threads (" << GRBgeterrormsg(env) << ", error code " << error << ").");
// Enable the following line to force Gurobi to be as precise about the binary variables as required by the given precision option.

Loading…
Cancel
Save