From: Francis Russell Date: Tue, 19 Apr 2011 02:38:52 +0000 (+0100) Subject: Disable zlib and OpenMP support in CryptoMiniSat. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=f51ec5d42b762ba77ec052664439ca57c4238949;p=francis%2Fstp.git Disable zlib and OpenMP support in CryptoMiniSat. Until the build system is updated to produce a dynamic library, it's easier to avoid dependencies on any other libraries. --- diff --git a/scripts/Makefile.common b/scripts/Makefile.common index d5b47af..f5b0930 100644 --- a/scripts/Makefile.common +++ b/scripts/Makefile.common @@ -47,7 +47,7 @@ ifdef STATIC endif -LDFLAGS = $(LDFLAGS_BASE) -lz -fopenmp +LDFLAGS = $(LDFLAGS_BASE) CFLAGS = $(CFLAGS_BASE) $(CFLAGS_M32) diff --git a/src/sat/cryptominisat2/Makefile b/src/sat/cryptominisat2/Makefile index c00c033..30a3a66 100644 --- a/src/sat/cryptominisat2/Makefile +++ b/src/sat/cryptominisat2/Makefile @@ -18,7 +18,7 @@ SOURCES = Logger.cpp Solver.cpp PackedRow.cpp \ SCCFinder.cpp OBJECTS = $(SOURCES:.cpp=.o) LIB = libminisat.a -CFLAGS += -I../.. -I$(MTL) -I$(MTRAND) -fopenmp -DEXT_HASH_MAP -ffloat-store $(CFLAGS_M32) -c +CFLAGS += -I../.. -I$(MTL) -I$(MTRAND) -DDISABLE_ZLIB -DEXT_HASH_MAP -ffloat-store $(CFLAGS_M32) -c EXEC = minisat LFLAGS = -lz diff --git a/src/sat/cryptominisat2/SolverMisc.cpp b/src/sat/cryptominisat2/SolverMisc.cpp index e457704..a42b37e 100644 --- a/src/sat/cryptominisat2/SolverMisc.cpp +++ b/src/sat/cryptominisat2/SolverMisc.cpp @@ -625,7 +625,12 @@ void Solver::printStats() double cpu_time = cpuTime(); uint64_t mem_used = memUsed(); - int numThreads = omp_get_num_threads(); +#ifdef _OPENMP + const int numThreads = omp_get_num_threads(); +#else + const int numThreads = 1; +#endif + if (numThreads > 1) { std::cout << "c Following stats are for *FIRST FINISHED THREAD ONLY*" << std::endl; #if !defined(_MSC_VER) && !defined(RUSAGE_THREAD)