Skip to content

Commit 29bb7bc

Browse files
committed
Merge branch 'msoos-master'
2 parents 3db5894 + 99e19fc commit 29bb7bc

File tree

5 files changed

+102
-7
lines changed

5 files changed

+102
-7
lines changed

appveyor.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# branches to build
2+
branches:
3+
# whitelist
4+
only:
5+
- master
6+
- appveyor_debug
7+
8+
# Operating system (build VM template)
9+
os: Visual Studio 2015
10+
11+
# scripts that are called at very beginning, before repo cloning
12+
init:
13+
- git config --global core.autocrlf input
14+
15+
16+
# clone directory
17+
clone_folder: c:\projects\minisat
18+
19+
platform:
20+
- x64
21+
# - x86
22+
23+
environment:
24+
global:
25+
BOOST_ROOT: C:\projects\minisat\boost_1_59_0_install
26+
ZLIB_ROOT: C:\projects\minisat\zlib\myinstall
27+
BUILD_TYPE: Release
28+
MSBUILD_FLAGS: /maxcpucount /nologo
29+
30+
configuration:
31+
- Release
32+
33+
build_script:
34+
#- IF "%PLATFORM%" == "x86" ( SET BOOST_LIBRARYDIR=C:/Libraries/boost_1_59_0/lib32-msvc-14.0)
35+
- IF "%PLATFORM%" == "x86" ( SET CMAKE_GENERATOR="Visual Studio 14 2015")
36+
37+
#- IF "%PLATFORM%" == "x64" ( SET BOOST_LIBRARYDIR=C:/Libraries/boost_1_59_0/lib64-msvc-14.0)
38+
- IF "%PLATFORM%" == "x64" ( SET CMAKE_GENERATOR="Visual Studio 14 2015 Win64")
39+
40+
- echo %PLATFORM%
41+
- echo %BOOST_LIBRARYDIR%
42+
- echo %CMAKE_GENERATOR%
43+
- echo %configuration%
44+
- echo %APPVEYOR_BUILD_FOLDER%
45+
- echo %cd%
46+
47+
# zlib
48+
# TODO check out http://stackoverflow.com/questions/10507893/libzip-with-visual-studio-2010
49+
- cd C:\projects\minisat
50+
- git clone https://github.com/madler/zlib
51+
- cd zlib
52+
- git checkout v1.2.8
53+
- echo %cd%
54+
- mkdir build
55+
- mkdir myinstall
56+
- cd build
57+
- cmake -G %CMAKE_GENERATOR% -DCMAKE_INSTALL_PREFIX=%ZLIB_ROOT% ..
58+
- if %PLATFORM%==x86 call msbuild %MSBUILD_FLAGS% /t:Build /p:Configuration=%CONFIGURATION% /p:Platform="x86" zlib.sln
59+
- if %PLATFORM%==x64 call msbuild %MSBUILD_FLAGS% /t:Build /p:Configuration=%CONFIGURATION% /p:Platform="x64" zlib.sln
60+
- msbuild %MSBUILD_FLAGS% INSTALL.vcxproj
61+
- dir ..\myinstall\
62+
63+
# minisat
64+
- cd C:\projects\minisat
65+
- mkdir build
66+
- mkdir myinstall
67+
- cd build
68+
- cmake -G %CMAKE_GENERATOR% -DCMAKE_INSTALL_PREFIX=%MINISAT_ROOT% -DZLIB_ROOT=%ZLIB_ROOT% ..
69+
- cmake --build . --config %CONFIGURATION%
70+
- dir ..\myinstall\
71+
72+
73+
build:
74+
# project: INSTALL.vcxproj # path to Visual Studio solution or project
75+
parallel: true
76+
verbosity: minimal
77+
78+
79+
# scripts to run after build
80+
after_build:
81+
- 7z a c:\projects\minisat\minisat.zip %APPVEYOR_BUILD_FOLDER%\build -tzip
82+
- cd c:\projects\minisat
83+
84+
artifacts:
85+
- path: minisat.zip
86+
name: minisat.zip
87+
88+
deploy_script:
89+
#- cd c:\projects\minisat
90+
#- curl -T minisat.zip --user %ACCOUNT% https://someplace/
91+
92+
test: off

minisat/core/Solver.cc

+5-5
Original file line numberDiff line numberDiff line change
@@ -992,11 +992,11 @@ void Solver::printStats() const
992992
{
993993
double cpu_time = cpuTime();
994994
double mem_used = memUsedPeak();
995-
printf("restarts : %"PRIu64"\n", starts);
996-
printf("conflicts : %-12"PRIu64" (%.0f /sec)\n", conflicts , conflicts /cpu_time);
997-
printf("decisions : %-12"PRIu64" (%4.2f %% random) (%.0f /sec)\n", decisions, (float)rnd_decisions*100 / (float)decisions, decisions /cpu_time);
998-
printf("propagations : %-12"PRIu64" (%.0f /sec)\n", propagations, propagations/cpu_time);
999-
printf("conflict literals : %-12"PRIu64" (%4.2f %% deleted)\n", tot_literals, (max_literals - tot_literals)*100 / (double)max_literals);
995+
printf("restarts : %lu\n", starts);
996+
printf("conflicts : %-12lu (%.0f /sec)\n", conflicts , conflicts /cpu_time);
997+
printf("decisions : %-12lu (%4.2f %% random) (%.0f /sec)\n", decisions, (float)rnd_decisions*100 / (float)decisions, decisions /cpu_time);
998+
printf("propagations : %-12lu (%.0f /sec)\n", propagations, propagations/cpu_time);
999+
printf("conflict literals : %-12lu (%4.2f %% deleted)\n", tot_literals, (max_literals - tot_literals)*100 / (double)max_literals);
10001000
if (mem_used != 0) printf("Memory used : %.2f MB\n", mem_used);
10011001
printf("CPU time : %g s\n", cpu_time);
10021002
}

minisat/core/SolverTypes.h

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ typedef int Var;
5151
struct Lit {
5252
int x;
5353

54+
// Use this as a constructor:
55+
friend Lit mkLit(Var var, bool sign);
56+
5457
bool operator == (Lit p) const { return x == p.x; }
5558
bool operator != (Lit p) const { return x != p.x; }
5659
bool operator < (Lit p) const { return x < p.x; } // '<' makes p, ~p adjacent in the ordering.

minisat/utils/Options.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class Int64Option : public Option
290290
else
291291
fprintf(stderr, "%4" PRIi64, range.end);
292292

293-
fprintf(stderr, "] (default: %" PRIi64")\n", value);
293+
fprintf(stderr, "] (default: %" PRIi64 ")\n", value);
294294
if (verbose){
295295
fprintf(stderr, "\n %s\n", description);
296296
fprintf(stderr, "\n");

minisat/utils/System.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ double Minisat::memUsed() {
7777
struct rusage ru;
7878
getrusage(RUSAGE_SELF, &ru);
7979
return (double)ru.ru_maxrss / 1024; }
80-
double Minisat::memUsedPeak() { return memUsed(); }
80+
double Minisat::memUsedPeak(bool strictlyPeak) { return memUsed(); }
8181

8282

8383
#elif defined(__APPLE__)

0 commit comments

Comments
 (0)