From 981fda20be8e82825db22e7209d3725ca531482a Mon Sep 17 00:00:00 2001 From: Yibo Lin Date: Sat, 26 Oct 2019 19:37:30 +0800 Subject: [PATCH] update to correct version of Limbo --- CMakeLists.txt | 10 ++++------ bin/color.sh | 2 +- bin/run.sh | 2 +- bin/stitch.sh | 5 +++-- src/CMakeLists.txt | 12 +++++++----- src/SimpleMPL.cpp | 3 --- thirdparty/Limbo | 2 +- 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42b6cbc5..34447e88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,12 +23,10 @@ endif(NOT CMAKE_CXX_ABI) message("-- CMAKE_CXX_ABI: _GLIBCXX_USE_CXX11_ABI=${CMAKE_CXX_ABI}") add_definitions(-D_GLIBCXX_USE_CXX11_ABI=${CMAKE_CXX_ABI}) -#option(ENABLE_GUROBI "whether enable Gurobi" OFF) -#message("-- GUROBI: ${ENABLE_GUROBI}") -#option(ENABLE_LEMONCBC "whether enable Lemon-CBC" OFF) -#message("-- LEMONCBC: ${ENABLE_LEMONCBC}") -#option(ENABLE_CSDP "whether enable CSDP" OFF) -#message("-- CSDP: ${ENABLE_CSDP}") +option(ENABLE_GUROBI "whether enable Gurobi" OFF) +message("-- GUROBI: ${ENABLE_GUROBI}") +option(ENABLE_LEMONCBC "whether enable Lemon-CBC" OFF) +message("-- LEMONCBC: ${ENABLE_LEMONCBC}") set(CMAKE_CXX_STANDARD 11) diff --git a/bin/color.sh b/bin/color.sh index 95cf2ab9..124d3978 100755 --- a/bin/color.sh +++ b/bin/color.sh @@ -1,7 +1,7 @@ #! # ======================================================================== -# SimpleMPL 1.X Usage +# SimpleMPL Usage # -help (false) toggle printing help message # -in input gds file name # -out () output gds file name diff --git a/bin/run.sh b/bin/run.sh index b20e6231..0bf19026 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -1,7 +1,7 @@ #! # ======================================================================== -# SimpleMPL 1.X Usage +# SimpleMPL Usage # -help (false) toggle printing help message # -in input gds file name # -out () output gds file name diff --git a/bin/stitch.sh b/bin/stitch.sh index f2b730d5..7481c4eb 100755 --- a/bin/stitch.sh +++ b/bin/stitch.sh @@ -1,7 +1,7 @@ #! # ======================================================================== -# SimpleMPL 1.X Usage +# SimpleMPL Usage # -help (false) toggle printing help message # -in input gds file name # -out () output gds file name @@ -27,6 +27,7 @@ #-uncolor_layer 203 \ # if the benchmark contains polygon shapes, -shape must be set to POLYGON; # otherwise, set -shape to RECTANGLE is more memory efficient +mkdir -p benchout ./OpenMPL \ -shape POLYGON \ -in bench/sim_s1.gds \ @@ -35,7 +36,7 @@ -uncolor_layer 1 \ -uncolor_layer 101 \ -color_num 3 \ - -algo DL\ + -algo BACKTRACK\ -thread_num 8\ -use_stitch gen_stitch\ # -dbg_comp_id 10096 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fb42afff..0be3a324 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,11 +20,11 @@ if(GUROBI_FOUND) else(GUROBI_FOUND) set(COMPILE_DEFINITIONS GUROBI=0 ${COMPILE_DEFINITIONS}) endif(GUROBI_FOUND) -#if(ENABLE_LEMONCBC) -# set(COMPILE_DEFINITIONS LEMONCBC=1 ${COMPILE_DEFINITIONS}) -#else(ENABLE_LEMONCBC) -# set(COMPILE_DEFINITIONS LEMONCBC=0 ${COMPILE_DEFINITIONS}) -#endif(ENABLE_LEMONCBC) +if(ENABLE_LEMONCBC) + set(COMPILE_DEFINITIONS LEMONCBC=1 ${COMPILE_DEFINITIONS}) +else(ENABLE_LEMONCBC) + set(COMPILE_DEFINITIONS LEMONCBC=0 ${COMPILE_DEFINITIONS}) +endif(ENABLE_LEMONCBC) set(COMPILE_DEFINITIONS CSDP=1 ${COMPILE_DEFINITIONS}) set(LIBS ${LIBS} sdp openblas m ${CMAKE_THREAD_LIBS_INIT} gfortran) @@ -47,7 +47,9 @@ include_directories(${LIMBO_SOURCE_DIR} ${Boost_INCLUDE_DIRS}) add_library(${PROJECT_NAME}_lib STATIC ${SOURCES}) add_executable(${PROJECT_NAME} main.cpp) target_link_libraries(${PROJECT_NAME} LINK_PUBLIC ${PROJECT_NAME}_lib ${LIBS}) +message("-- COMPILE_DEFINITIONS = ${COMPILE_DEFINITIONS}") if(COMPILE_DEFINITIONS) + target_compile_definitions(${PROJECT_NAME}_lib PRIVATE ${COMPILE_DEFINITIONS}) target_compile_definitions(${PROJECT_NAME} PRIVATE ${COMPILE_DEFINITIONS}) endif(COMPILE_DEFINITIONS) install(TARGETS ${PROJECT_NAME} DESTINATION bin) diff --git a/src/SimpleMPL.cpp b/src/SimpleMPL.cpp index 10e7d275..7aeaaceb 100644 --- a/src/SimpleMPL.cpp +++ b/src/SimpleMPL.cpp @@ -26,7 +26,6 @@ in conflict_num() : uncomment color mplAssertmessage // only valid when gurobi is available #if GUROBI == 1 #include -#include #include #include #endif @@ -1803,8 +1802,6 @@ lac::Coloring* SimpleMPL::create_coloring_solver(SimpleMP #if GUROBI == 1 case AlgorithmTypeEnum::ILP_GURBOI: pcs = new lac::ILPColoring (sg); break; - case AlgorithmTypeEnum::ILP_UPDATED_GURBOI: - pcs = new lac::ILPColoringUpdated (sg); break; case AlgorithmTypeEnum::LP_GUROBI: pcs = new lac::LPColoring (sg); break; case AlgorithmTypeEnum::MIS_GUROBI: diff --git a/thirdparty/Limbo b/thirdparty/Limbo index 4e937f7d..ea143428 160000 --- a/thirdparty/Limbo +++ b/thirdparty/Limbo @@ -1 +1 @@ -Subproject commit 4e937f7d3ad9c56c722d5cf490816e21292555b4 +Subproject commit ea143428edee030eda41b697c9b592c27940f14c