Skip to content

Commit

Permalink
update to correct version of Limbo
Browse files Browse the repository at this point in the history
  • Loading branch information
limbo018 committed Oct 26, 2019
1 parent ad74b08 commit 981fda2
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 19 deletions.
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion bin/color.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/run.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions bin/stitch.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 \
Expand All @@ -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
12 changes: 7 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
3 changes: 0 additions & 3 deletions src/SimpleMPL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ in conflict_num() : uncomment color mplAssertmessage
// only valid when gurobi is available
#if GUROBI == 1
#include <limbo/algorithms/coloring/ILPColoring.h>
#include <limbo/algorithms/coloring/ILPColoringUpdated.h>
#include <limbo/algorithms/coloring/LPColoring.h>
#include <limbo/algorithms/coloring/MISColoring.h>
#endif
Expand Down Expand Up @@ -1803,8 +1802,6 @@ lac::Coloring<SimpleMPL::graph_type>* SimpleMPL::create_coloring_solver(SimpleMP
#if GUROBI == 1
case AlgorithmTypeEnum::ILP_GURBOI:
pcs = new lac::ILPColoring<graph_type> (sg); break;
case AlgorithmTypeEnum::ILP_UPDATED_GURBOI:
pcs = new lac::ILPColoringUpdated<graph_type> (sg); break;
case AlgorithmTypeEnum::LP_GUROBI:
pcs = new lac::LPColoring<graph_type> (sg); break;
case AlgorithmTypeEnum::MIS_GUROBI:
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/Limbo

0 comments on commit 981fda2

Please sign in to comment.