13
'--upload!' => \$to_upload,
16
my $dest_dir = 'fcc_solver_for_amadiro';
18
mkpath("$dest_dir/pthread");
19
mkpath("$dest_dir/libavl");
21
system(qq{./Tatzer -l x64b --nfc=2 --states-type=COMPACT_STATES --dbm=kaztree});
22
my @modules = ('app_str.o', 'card.o', 'fcc_solver.o', 'state.o', 'kaz_tree.o', 'rwlock.o', 'queue.o', 'meta_alloc.o', 'libavl/avl.o', );
24
foreach my $fn ('alloc.c', 'app_str.c', 'card.c', 'dbm_solver.c', 'state.c',
25
'dbm_kaztree.c', 'alloc.h', 'card.h', 'config.h', 'state.h',
26
'dbm_solver.h', 'kaz_tree.c', 'kaz_tree.h', 'dbm_solver_key.h',
27
'fcs_move.h', 'inline.h', 'bool.h', 'internal_move_struct.h', 'app_str.h',
28
'delta_states.c', 'fcs_dllexport.h', 'bit_rw.h', 'fcs_enums.h', 'unused.h',
29
'portable_time.h', 'dbm_calc_derived.h', 'dbm_calc_derived_iface.h',
30
'dbm_common.h', 'fcc_solver.c', 'indirect_buffer.h', 'fcc_brfs_test.h',
31
'fcc_brfs.h', 'dbm_lru_cache.h', 'dbm_cache.h', 'meta_alloc.h',
32
'meta_alloc.c', 'libavl/avl.c',, 'libavl/avl.h', 'generic_tree.h',
36
io($fn) > io("$dest_dir/$fn");
39
foreach my $fn ('rwlock.c', 'queue.c', 'pthread/rwlock_fcfs.h', 'pthread/rwlock_fcfs_queue.h')
41
io("/home/shlomif/progs/C/pthreads/rwlock/fcfs-rwlock/pthreads/$fn") > io("$dest_dir/$fn")
44
my $cache_size = 64_000_000;
50
foreach my $deal_idx (@deals)
52
system(qq{python board_gen/make_pysol_freecell_board.py -t --ms $deal_idx > $dest_dir/$deal_idx.board});
55
@modules = sort { $a cmp $b } @modules;
57
io("$dest_dir/Makefile")->print(<<"EOF");
58
TARGET = fcc_fc_solver
61
DEALS_DUMPS = \$(patsubst %,%.dump,\$(DEALS))
63
CACHE_SIZE = $cache_size
65
CFLAGS = -O3 -march=native -fomit-frame-pointer -DFCS_DBM_WITHOUT_CACHES=1 -DFCS_DBM_USE_LIBAVL=1 -I. -I./libavl/
70
\$(TARGET): \$(MODULES)
71
\tgcc \$(CFLAGS) -fwhole-program -o \$\@ \$(MODULES) -lm -lpthread
74
\tgcc -c \$(CFLAGS) -o \$\@ \$<
78
\$(DEALS_DUMPS): %.dump: all
79
\t./\$(TARGET) --caches-delta \$(CACHE_SIZE) -o \$\@ \$(patsubst %.dump,%.board,\$\@)
82
\t\@echo "\$* = \$(\$*)"
87
my $arc_name = "$dest_dir-trunk-r4442.tar.bz2";
88
if (system('tar', '-cjvf', $arc_name, $dest_dir))
92
system("rsync", "-a", "-v", "--progress", "--inplace", $arc_name,
93
"hostgator:public_html/Files/files/code/"