~ubuntu-branches/ubuntu/saucy/freecell-solver/saucy

« back to all changes in this revision

Viewing changes to scripts/Run-dbm-solver.pl

  • Committer: Package Import Robot
  • Author(s): Gergely Risko
  • Date: 2012-06-22 10:08:05 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120622100805-evoda1ccdr8vt5xr
Tags: 3.12.0-1
New upstream version. (closes: #675262)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
use strict;
 
4
use warnings;
 
5
 
 
6
use Cwd;
 
7
 
 
8
my $filename = shift(@ARGV);
 
9
 
 
10
my $dbm_store = (Cwd::getcwd() . "/" . "dbm_store.leveldb");
 
11
my $dump_file = "$filename-dump";
 
12
 
 
13
if (-e $dbm_store)
 
14
{
 
15
    die "DBM store '$dbm_store' exists.";
 
16
}
 
17
 
 
18
if (-e $dump_file)
 
19
{
 
20
    die "Dump file $dump_file exists.";
 
21
}
 
22
 
 
23
exec(
 
24
    "./dbm_fc_solver",
 
25
    "-o", $dump_file,
 
26
    "--dbm-store-path", $dbm_store,
 
27
    # "--dbm-store-path", (Cwd::getcwd() . "/" . "dbm_store.bdb"),
 
28
    "--pre-cache-max-count", 10_000_000,
 
29
    "--caches-delta", 20_000_000,
 
30
    # Very important to only have one thread because we nullified the locking
 
31
    # checks (using an #ifdef).
 
32
    "--num-threads", 1,
 
33
    $filename
 
34
);