configutaion fixes

This commit is contained in:
Vitor Santos Costa 2015-11-12 14:59:07 +00:00
parent 504268d5b3
commit 3437f9e04b
2 changed files with 25 additions and 16 deletions

View File

@ -38,33 +38,42 @@ if (WITH_TABLING)
include_directories (OPTYap) include_directories (OPTYap)
endif(WITH_TABLING) endif(WITH_TABLING)
option (WITH_YAPOR "Experimental Support for Or-parallelism" OFF) option (WITH_YAPOR "Experimental Support for Or-parallelism" OFF)
CMAKE_DEPENDENT_OPTION (WITH_YAPOR_COPY "Copy-based Or-parallelism" ON OPTION (WITH_YAPOR_COPY "Copy-based Or-parallelism" OFF)
"WITH_YAPOR" OFF)
if (WITH_YAPOR_COPY) if (WITH_YAPOR_COPY)
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_COPY=1) set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_COPY=1;USE_DL_MALLOC=1)
set(WITH_YAPOR ON)
endif (WITH_YAPOR_COPY) endif (WITH_YAPOR_COPY)
CMAKE_DEPENDENT_OPTION (WITH_YAPOR_THOR "Thread-based Or-parallelism" OFF OPTION (WITH_YAPOR_THOR "Thread-based Or-parallelism" OFF)
"WITH_OR_PARALLELISM;WITH_THREADS;NOT WITH_YAPOR" OFF)
if (WITH_YAPOR_THOR) if (WITH_YAPOR_THOR)
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_THREADS=1) set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_THREADS=1;USE_SYSTEM_MALLOC=1)
set(WITH_YAPOR ON)
endif (WITH_YAPOR_THOR) endif (WITH_YAPOR_THOR)
CMAKE_DEPENDENT_OPTION (WITH_YAPOR_ACOW "Process-based Copy-On-Write Or-parallelism" OFF OPTION (WITH_YAPOR_ACOW "Process-based Copy-On-Write Or-parallelism" OFF)
"WITH_OR_PARALLELISM;NOT WITH_YAPOR;NOT WITH_THOR" OFF)
if (WITH_YAPOR_ACOW) if (WITH_YAPOR_ACOW)
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_COW=1) set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_COW=1;USE_SYSTEM_MALLOC=1)
set(WITH_YAPOR ON)
endif (WITH_YAPOR_ACOW) endif (WITH_YAPOR_ACOW)
CMAKE_DEPENDENT_OPTION (WITH_YAPOR_SBA "Sparse Bind Array-based Or-parallelism" OFF OPTION (WITH_YAPOR_SBA "Sparse Bind Array-based Or-parallelism" OFF)
"WITH_OR_PARALLELISM;NOT WITH_YAPOR;NOT WITH_THOR;NOT WITH_ACOW" OFF)
if (WITH_YAPOR_SBA) if (WITH_YAPOR_SBA)
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_SBA=1) set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_SBA=1;USE_SYSTEM_MALLOC=1)
set(WITH_YAPOR ON)
endif (WITH_YAPOR_SBA) endif (WITH_YAPOR_SBA)
if (WITH_YAPOR)
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR=1)
else()
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS USE_SYSTEM_MALLOC=1)
endif ()
set (POSITION_INDEPENDENT_CODE TRUE) set (POSITION_INDEPENDENT_CODE TRUE)
add_library (libOPTYap OBJECT add_library (libOPTYap OBJECT

View File

@ -22,7 +22,7 @@
#define store_low_level_trace_info(CP, TAB_ENT) #define store_low_level_trace_info(CP, TAB_ENT)
#endif /* LOW_LEVEL_TRACER */ #endif /* LOW_LEVEL_TRACER */
#define TABLING_ERROR_CHECKING_STACK \ #define TABLING_ERROR_CHECKING_STACK \
TABLING_ERROR_CHECKING(store_node, Unsigned(H) + 1024 > Unsigned(B)); \ TABLING_ERROR_CHECKING(store_node, Unsigned(H) + 1024 > Unsigned(B)); \
TABLING_ERROR_CHECKING(store_node, Unsigned(H_FZ) + 1024 > Unsigned(B)) TABLING_ERROR_CHECKING(store_node, Unsigned(H_FZ) + 1024 > Unsigned(B))
@ -377,7 +377,7 @@
-> we need a shared data structure to avoid redundant computations! -> we need a shared data structure to avoid redundant computations!
UNLOCK_OR_FRAME(LOCAL_top_or_fr); UNLOCK_OR_FRAME(LOCAL_top_or_fr);
#else #else
Sfprintf(Serror, "PROBLEM: cp_last_answer field is local to the cp!\n"); fprintf(stderr, "PROBLEM: cp_last_answer field is local to the cp!\n");
exit(1); exit(1);
#endif #endif
} }