Crafty 25.0.1

Discussion of anything and everything relating to chess playing software and machines.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
bob
Posts: 20558
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Crafty 25.0.1

Post by bob » Fri Jan 15, 2016 9:57 pm

I've released version 25.0.1... Some NUMA additions, but the main reason for the release is Jon Dart found a glitch in the "memory" command that was caused by an accidental 32 bit math operation that limits memory to 2gb or less. This version fixes that...

No measurable strength improvement unless you run on a larger NUMA box where the new memory management will help modestly.

Dann Corbit
Posts: 10118
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Crafty 25.0.1

Post by Dann Corbit » Fri Jan 15, 2016 10:26 pm

When I build with the current source, I get this warning:
"WARNING. local SMP block cannot be allocated, thread 0"
repeated several times and it appears to use only one thread.

Perhaps there is a new define that I need to set or something.
I cannot use the standard makefile.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

bob
Posts: 20558
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Crafty 25.0.1

Post by bob » Fri Jan 15, 2016 11:14 pm

Dann Corbit wrote:When I build with the current source, I get this warning:
"WARNING. local SMP block cannot be allocated, thread 0"
repeated several times and it appears to use only one thread.

Perhaps there is a new define that I need to set or something.
I cannot use the standard makefile.
More details. Windows or linux? Makefile options? I am guessing windows since I'm running it on linux with no problems...

Try again. I found one line misplaced in several #if defined() conditions...
Last edited by bob on Fri Jan 15, 2016 11:27 pm, edited 1 time in total.

Dann Corbit
Posts: 10118
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Crafty 25.0.1

Post by Dann Corbit » Fri Jan 15, 2016 11:23 pm

Windows

I used the modified makefile from mikeb originally, but fiddled for windows that has the following:

Code: Select all

# To build crafty:
#
#  You want to set up for maximum optimization, but typically you will
#  need to experiment to see which options provide the fastest code.  The
#  following option descriptions explain each option.  To use one or more
#  of these options, to the "opt =" line that follows the explanations and
#  add the options you want, being careful to stay inside the single quote
#  marks.
#   
#   -DAFFINITY     Include code to set processor/thread affinity on windows
#                  systems.  Note this will not work on Apple OS X as it does
#                  not support any sort of processor affinity mechanism.
#                  WARNING:  know what you are doing before using this.  If
#                  you test multiple copies of Crafty (each copy using just
#                  one thread) you can have bogus results because if compiled
#                  with -DAFFINITY, even a single-cpu execution will lock led
#                  itself onto processor zero (since it only has thread #0)  
#                  which is probably NOT what you want.  This is intended to 
#                  be used when you run Crafty using a complete dedicated
#                  machine with nothing else running at the same time.
#   -DBOOKDIR      Path to the directory containing the book binary files.
#                  The default for all such path values is "." if you don't
#                  specify a path with this macro definition.
#   -DCPUS=n       Defines the maximum number of CPUS Crafty will be able
#                  to use in a SMP system.  Note that this is the max you
#                  will be able to use.  You need to use the smpmt=n command
#                  to make crafty use more than the default 1 process.
#   -DDEBUG        This is used for testing changes.  Enabling this option
#                  greatly slows Crafty down, but every time a move is made,
#                  the corresponding position is checked to make sure all of
#                  the bitboards are set correctly.
#   -DEPD          If you want full EPD support built in.
#   -DINLINEASM    Compiles with the Intel assembly code for FirstOne(),
#                  LastOne() and PopCnt().  This is for gcc-style inlining
#                  and now works with the Intel C/C++ compiler as well.  It
#                  also has a MSVC compatible version included.
#   -DLOGDIR       Path to the directory where Crafty puts the log.nnn and
#                  game.nnn files.
#   -DNODES        This enables the sn=x command.  Crafty will search until
#                  exactly X nodes have been searched, then the search 
#                  terminates as if time ran out.
#   -DNOEGTB       Eliminates the egtb code for compilers that can't deal
#                  with the large egtb.cpp code/templates.
#   -DNUMA         Says this system is NUMA, which is mainly used for Linux
#                  or Windows systems, and references libnuma, needed for the
#                  NUMA calls (crafty doesn't use many of these, it does the
#                  memory setup stuff itself)
#   -DPOPCNT       Says this system is a newer Intel/AMD processor with the
#                  built-in hardware popcnt instruction.
#   -DPOSITIONS    Causes Crafty to emit FEN strings, one per book line, as
#                  it creates a book.  I use this to create positions to use
#                  for cluster testing.
#   -DRCDIR        Path to the directory where we look for the .craftyrc or
#                  crafty.rc (windows) file.
#   -DSKILL        Enables the "skill" command which allows you to arbitrarily
#                  lower Crafty's playing skill so it does not seem so
#                  invincible to non-GM-level players.
#   -DTBDIR        Path to the directory where the endgame tablebase files
#                  are found.  default = "./TB"
#   -DTEST         Displays evaluation table after each move (in the logfile)
#   -DTRACE        This enables the "trace" command so that the search tree
#                  can be dumped while running.
#   -Dwindows         This identifies the target O/S as being windows-based, if this
#                  option is omitted, windows is assumed.

#	$(MAKE) -j windows-gcc
#	$(MAKE) -j windows-clang
default:
	$(MAKE) -j windows-gcc
help:
	@echo "You must specify the system which you want to compile for:"
	@echo ""
	@echo "make windows-gcc         windows w/gcc compiler"
	@echo "make windows-icc         windows w/icc compiler"
	@echo "make profile          profile-guided-optimizations"
	@echo "                      (edit Makefile to make the profile"
	@echo "                      option use the right compiler)"
	@echo ""

quick:
	$(MAKE) target=WINDOWS \
		CC=gcc CXX=g++ \
		opt='-DTEST -DTRACE -DINLINEASM -DPOPCNT -DCPUS=24 -DEPD ' \
		CFLAGS='-Wall -Wno-array-bounds -pipe -O3 -pthread' \
		CXFLAGS='-Wall -Wno-array-bounds -pipe -O3 -pthread' \
		LDFLAGS='$(LDFLAGS) -pthread -lstdc++' \
		crafty-make

windows-gcc:
	@rm -rf *.o
	@rm -rf log.*
	@rm -rf game.*
	$(MAKE) -j target=WINDOWS \
	CC=gcc CXX=gcc \
	opt=' -DINLINEASM -DPOPCNT -DCPUS=24 -DEPD ' \
	CFLAGS='-Wall -pipe -Wno-array-bounds -Ofast --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -O3 -msse4.2 -mpopcnt -Os -Ofast -O3 -fprofile-use -fprofile-correction \
	-pthread' \
	CXFLAGS='-Wall -pipe -Wno-array-bounds  --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228  -march=native  -msse4.2 -mpopcnt  -Os -Ofast -O3 -fprofile-use -fprofile-correction \
	-pthread' \
	LDFLAGS='$(LDFLAGS) -fprofile-use -pthread -lstdc++' \
	crafty-make

windows-gcc-profile:
	@rm -rf *.o
	@rm -rf log.*
	@rm -rf game.*
	$(MAKE) -j target=WINDOWS \
	CC=gcc CXX=gcc \
	opt=' -DINLINEASM  -DPOPCNT -DCPUS=24 -DEPD' \
	CFLAGS='-Wall -pipe -Wno-array-bounds --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -msse4.2 -mpopcnt -flto -Os -Ofast -O3  -fprofile-arcs -pthread' \
	CXFLAGS='-Wall -pipe -Wno-array-bounds --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -msse4.2 -mpopcnt -flto -Os -Ofast -O3  -fprofile-arcs -pthread' \
	LDFLAGS='$(LDFLAGS) -fprofile-arcs  -pthread -lstdc++ ' \
	crafty-make

windows-gcc-hy:
	$(MAKE) -j target=WINDOWS \
		CC=gcc CXX=g++ \
		opt='-DTEST -DINLINEASM -DPOPCNT -DCPUS=24 -DEPD ' \
		CFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-use \
		-fprofile-correction -pthread' \
		CXFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-use \
		-fprofile-correction -pthread' \
		LDFLAGS='$(LDFLAGS) -fprofile-use -pthread -lstdc++' \
		crafty-make

windows-gcc-profile-hy:
	$(MAKE) -j target=WINDOWS \
		CC=gcc CXX=g++ \
		opt='-DTEST -DINLINEASM -DPOPCNT -DCPUS=24 -DEPD ' \
		CFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-arcs \
		-pthread' \
		CXFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-arcs \
		-pthread' \
		LDFLAGS='$(LDFLAGS) -fprofile-arcs -pthread -lstdc++ ' \
		crafty-make

windows-clang:
	@/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-profdata merge -output=crafty.profdata *.profraw
	$(MAKE) -j target=WINDOWS \
		CC=gcc CXX=g++ \
		opt='-DTEST -DINLINEASM -DPOPCNT -DCPUS=24 -DEPD ' \
		CFLAGS='-Wall -Wno-array-bounds -pipe -O3 \
			-fprofile-instr-use=crafty.profdata' \
		CXFLAGS='-Wall -Wno-array-bounds -pipe -O3 \
			-fprofile-instr-use=crafty.profdata' \
		LDFLAGS='$(LDFLAGS) -fprofile-use -lstdc++' \
		crafty-make

windows-clang-profile:
	$(MAKE) -j target=WINDOWS \
		CC=gcc CXX=g++ \
		opt='-DTEST -DINLINEASM -DPOPCNT -DCPUS=24 -DEPD ' \
		CFLAGS='-Wall -Wno-array-bounds -pipe -O3 \
			-fprofile-instr-generate' \
		CXFLAGS='-Wall -Wno-array-bounds -pipe -O3 \
			-fprofile-instr-generate' \
		LDFLAGS='$(LDFLAGS) -fprofile-instr-generate -lstdc++ ' \
		crafty-make

windows-icc:
	$(MAKE) -j target=WINDOWS \
		CC=icc CXX=icc \
		opt='-DTEST -DINLINEASM -DPOPCNT -DCPUS=24 -DEPD ' \
		CFLAGS='-Wall -w -O3 -prof_use -prof_dir ./prof -fno-alias \
                        -pthread' \
		CXFLAGS='-Wall -w -O3 -prof_use -prof_dir ./prof -pthread' \
		LDFLAGS='$(LDFLAGS) -pthread -lstdc++' \
		crafty-make

windows-icc-profile:
	$(MAKE) -j target=WINDOWS \
		CC=icc CXX=icc \
		opt='-DTEST -DINLINEASM -DPOPCNT -DCPUS=24 -DEPD ' \
		CFLAGS='-Wall -w -O2 -prof_gen -prof_dir ./prof -fno-alias \
                        -pthread' \
		CXFLAGS='-Wall -w -O2 -prof_gen -prof_dir ./prof -pthread' \
		LDFLAGS='$(LDFLAGS) -pthread -lstdc++ ' \
		crafty-make


profile:
	@rm -rf *.o
	@rm -rf log.*
	@rm -rf game.*
	@rm -rf prof
	@rm -rf *.gcda
	@mkdir prof
	@touch *.c *.cpp *.h
	$(MAKE) -j windows-gcc-profile
	@echo "!/bin/csh" > runprof
	@echo "./crafty <<EOF" >>runprof
	@echo "pgo -3" >>runprof
	@echo "display nomoves" >>runprof
	@echo "ponder off" >>runprof
	@echo "egtb" >>runprof
	@echo "setboard /k/rnn////5RBB/K/ w" >>runprof
	@echo "mt=2" >>runprof
	@echo "st=2" >>runprof
	@echo "go" >>runprof
	@echo "setboard /k/3p/p2P1p/P2P1P///K/ w" >>runprof
	@echo "go" >>runprof
	@echo "mt=0" >>runprof
	@echo "quit" >>runprof
	@echo "EOF" >>runprof
	@chmod +x runprof
	@./runprof
	@rm runprof
	@touch *.c *.cpp *.h
	$&#40;MAKE&#41; -j windows-gcc
	@strip crafty.exe


#
#  one of the two following definitions for "objects" should be used.  The
#  default is to compile everything separately.  However, if you use the 
#  definition that refers to crafty.o, that will compile using the file crafty.c
#  which #includes every source file into one large glob.  This gives the
#  compiler max opportunity to inline functions as appropriate.  You should try
#  compiling both ways to see which way produces the fastest code.
#

#objects = main.o iterate.o time.o search.o quiesce.o evaluate.o thread.o \
       repeat.o hash.o next.o history.o movgen.o make.o unmake.o attacks.o \
       swap.o boolean.o utility.o probe.o book.o drawn.o epd.o epdglue.o \
       init.o input.o autotune.o interrupt.o option.o output.o ponder.o \
       resign.o root.o learn.o setboard.o test.o validate.o annotate.o \
       analyze.o evtest.o bench.o edit.o data.o

objects = crafty.o

# Do not change anything below this line!

opts = $&#40;opt&#41; -D$&#40;target&#41;

#	@$&#40;MAKE&#41; -j opt='$&#40;opt&#41;' CXFLAGS='$&#40;CXFLAGS&#41;' CFLAGS='$&#40;CFLAGS&#41;' crafty
crafty-make&#58;
	@$&#40;MAKE&#41; opt='$&#40;opt&#41;' CXFLAGS='$&#40;CXFLAGS&#41;' CFLAGS='$&#40;CFLAGS&#41;' crafty

crafty.o&#58; *.c *.h

crafty&#58;	$&#40;objects&#41; egtb.o
	$&#40;CC&#41; $&#40;LDFLAGS&#41; -o crafty $&#40;objects&#41; egtb.o -lm  $&#40;LIBS&#41;

evaluate.o&#58; evaluate.h

egtb.o&#58; egtb.cpp
	$&#40;CXX&#41; -c $&#40;CXFLAGS&#41; $&#40;opts&#41; egtb.cpp
clean&#58;
	-rm -f *.o crafty

$&#40;objects&#41;&#58; chess.h data.h

.c.o&#58;
	$&#40;CC&#41; $&#40;CFLAGS&#41; $&#40;opts&#41; -c $*.c

.s.o&#58;
	$&#40;AS&#41; $&#40;AFLAGS&#41; -o $*.o $*.s
With option:

Code: Select all

$ make windows-gcc-proile
With build session as follows:

Code: Select all

DCorbit@dcorbit MINGW64 /f/project/dcorbit/crafty-25.0.1
$ make windows-gcc-profile
make -j target=WINDOWS \
CC=gcc CXX=gcc \
opt=' -DINLINEASM  -DPOPCNT -DCPUS=24 -DEPD' \
CFLAGS='-Wall -pipe -Wno-array-bounds --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -msse4.2 -mpopcnt -flto -Os -Ofast -O3  -fprofile-arcs -pthread' \
CXFLAGS='-Wall -pipe -Wno-array-bounds --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -msse4.2 -mpopcnt -flto -Os -Ofast -O3  -fprofile-arcs -pthread' \
LDFLAGS=' -fprofile-arcs  -pthread -lstdc++ ' \
crafty-make
make&#91;1&#93;&#58; Entering directory '/f/project/dcorbit/crafty-25.0.1'
make&#91;2&#93;&#58; Entering directory '/f/project/dcorbit/crafty-25.0.1'
gcc -Wall -pipe -Wno-array-bounds --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -msse4.2 -mpopcnt -flto -Os -Ofast -O3  -fprofile-arcs -pthread -DINLINEASM  -DPOPCNT -DCPUS=24 -DEPD -DWINDOWS -c crafty.c
gcc -c -Wall -pipe -Wno-array-bounds --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -msse4.2 -mpopcnt -flto -Os -Ofast -O3  -fprofile-arcs -pthread -DINLINEASM  -DPOPCNT -DCPUS=24 -DEPD -DWINDOWS egtb.cpp
In file included from egtb.cpp&#58;54&#58;0&#58;
lock.h&#58;18&#58;0&#58; warning&#58; ignoring #pragma intrinsic  &#91;-Wunknown-pragmas&#93;
 #    pragma intrinsic (_InterlockedExchange&#41;
 ^
In file included from chess.h&#58;77&#58;0,
                 from iterate.c&#58;1,
                 from crafty.c&#58;13&#58;
lock.h&#58;18&#58;0&#58; warning&#58; ignoring #pragma intrinsic  &#91;-Wunknown-pragmas&#93;
 #    pragma intrinsic (_InterlockedExchange&#41;
 ^
In file included from chess.h&#58;646&#58;0,
                 from iterate.c&#58;1,
                 from crafty.c&#58;13&#58;
inline.h&#58; In function 'MSB'&#58;
inline.h&#58;76&#58;23&#58; warning&#58; passing argument 1 of '_BitScanReverse64' from incompatible pointer type &#91;-Wincompatible-pointer-types&#93;
     _BitScanReverse64&#40;&v, a&#41;;
                       ^
In file included from C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h&#58;27&#58;0,
                 from C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h&#58;163,
                 from C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/windef.h&#58;8,
                 from C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/windows.h&#58;69,
                 from chess.h&#58;51,
                 from iterate.c&#58;1,
                 from crafty.c&#58;13&#58;
C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h&#58;750&#58;1&#58; note&#58; expected 'long unsigned int *' but argument is of type 'int *'
 __buildbitscan&#40;_BitScanReverse64, unsigned __int64, "bsr&#123;q %&#91;Mask&#93;,%&#91;Index&#93; | %&#91;Index&#93;,%&#91;Mask&#93;&#125;")
 ^
In file included from chess.h&#58;646&#58;0,
                 from iterate.c&#58;1,
                 from crafty.c&#58;13&#58;
inline.h&#58; In function 'LSB'&#58;
inline.h&#58;83&#58;23&#58; warning&#58; passing argument 1 of '_BitScanForward64' from incompatible pointer type &#91;-Wincompatible-pointer-types&#93;
     _BitScanForward64&#40;&v, a&#41;;
                       ^
In file included from C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h&#58;27&#58;0,
                 from C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h&#58;163,
                 from C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/windef.h&#58;8,
                 from C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/windows.h&#58;69,
                 from chess.h&#58;51,
                 from iterate.c&#58;1,
                 from crafty.c&#58;13&#58;
C&#58;/msys64/mingw64/x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h&#58;743&#58;1&#58; note&#58; expected 'long unsigned int *' but argument is of type 'int *'
 __buildbitscan&#40;_BitScanForward64, unsigned __int64, "bsf&#123;q %&#91;Mask&#93;,%&#91;Index&#93; | %&#91;Index&#93;,%&#91;Mask&#93;&#125;")
 ^
In file included from crafty.c&#58;13&#58;0&#58;
iterate.c&#58; In function 'Iterate'&#58;
iterate.c&#58;244&#58;49&#58; warning&#58; cast to pointer from integer of different size &#91;-Wint-to-pointer-cast&#93;
                     NumaStartThread&#40;ThreadInit, &#40;void *) proc&#41;;
                                                 ^
iterate.c&#58;51&#58;15&#58; warning&#58; unused variable 'pt' &#91;-Wunused-variable&#93;
     pthread_t pt;
               ^
In file included from crafty.c&#58;28&#58;0&#58;
utility.c&#58; In function 'ReadClock'&#58;
utility.c&#58;1425&#58;14&#58; warning&#58; unused variable 'tUser64' &#91;-Wunused-variable&#93;
     uint64_t tUser64;
              ^
utility.c&#58;1424&#58;42&#58; warning&#58; unused variable 'ftUser' &#91;-Wunused-variable&#93;
     FILETIME ftCreate, ftExit, ftKernel, ftUser;
                                          ^
utility.c&#58;1424&#58;32&#58; warning&#58; unused variable 'ftKernel' &#91;-Wunused-variable&#93;
     FILETIME ftCreate, ftExit, ftKernel, ftUser;
                                ^
utility.c&#58;1424&#58;24&#58; warning&#58; unused variable 'ftExit' &#91;-Wunused-variable&#93;
     FILETIME ftCreate, ftExit, ftKernel, ftUser;
                        ^
utility.c&#58;1424&#58;14&#58; warning&#58; unused variable 'ftCreate' &#91;-Wunused-variable&#93;
     FILETIME ftCreate, ftExit, ftKernel, ftUser;
              ^
utility.c&#58;1423&#58;12&#58; warning&#58; unused variable 'hThread' &#91;-Wunused-variable&#93;
     HANDLE hThread;
            ^
utility.c&#58; In function 'WinNumaInit'&#58;
utility.c&#58;2703&#58;24&#58; warning&#58; format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' &#91;-Wformat=&#93;
                 printf&#40;"System is NUMA. %d nodes reported by Windows\n",
                        ^
utility.c&#58;2708&#58;28&#58; warning&#58; format '%d' expects argument of type 'int', but argument 2 has type 'DWORD &#123;aka long unsigned int&#125;' &#91;-Wformat=&#93;
                     printf&#40;"Node %d CPUs&#58; ", ulNode&#41;;
                            ^
utility.c&#58;2716&#58;40&#58; warning&#58; format '%d' expects argument of type 'int', but argument 2 has type 'DWORD &#123;aka long unsigned int&#125;' &#91;-Wformat=&#93;
                                 printf&#40;"%d ", ulCPU&#41;;
                                        ^
utility.c&#58;2728&#58;24&#58; warning&#58; format '%u' expects argument of type 'unsigned int', but argument 2 has type 'DWORD &#123;aka long unsigned int&#125;' &#91;-Wformat=&#93;
                 printf&#40;"Current ideal CPU is %u\n", dwCPU&#41;;
                        ^
utility.c&#58;2734&#58;36&#58; warning&#58; format '%d' expects argument of type 'int', but argument 2 has type 'DWORD &#123;aka long unsigned int&#125;' &#91;-Wformat=&#93;
                             printf&#40;"Exchanging nodes 0 and %d\n", ulNode&#41;;
                                    ^
utility.c&#58;2680&#58;15&#58; warning&#58; unused variable 'dwMask' &#91;-Wunused-variable&#93;
     DWORD_PTR dwMask;
               ^
utility.c&#58; In function 'NumaStartThread'&#58;
utility.c&#58;2761&#58;16&#58; warning&#58; format '%d' expects argument of type 'int', but argument 2 has type 'DWORD &#123;aka long unsigned int&#125;' &#91;-Wformat=&#93;
         printf&#40;"Starting thread on node %d CPU mask %I64d\n", ulNumaNode,
                ^
In file included from crafty.c&#58;41&#58;0&#58;
init.c&#58; In function 'Initialize'&#58;
init.c&#58;67&#58;26&#58; warning&#58; overflow in implicit constant conversion &#91;-Woverflow&#93;
         fseek&#40;book_file, -sizeof&#40;int&#41;, SEEK_END&#41;;
                          ^
init.c&#58;22&#58;29&#58; warning&#58; unused variable 'node' &#91;-Wunused-variable&#93;
     int i, j, v, major, id, node;
                             ^
init.c&#58;22&#58;9&#58; warning&#58; unused variable 'i' &#91;-Wunused-variable&#93;
     int i, j, v, major, id, node;
         ^
init.c&#58; In function 'InitializeHashTables'&#58;
init.c&#58;804&#58;6&#58; warning&#58; type of 'fault_in' defaults to 'int' &#91;-Wimplicit-int&#93;
 void InitializeHashTables&#40;fault_in&#41; &#123;
      ^
egtb.cpp&#58; In function 'void* PvMalloc&#40;size_t&#41;'&#58;
egtb.cpp&#58;334&#58;64&#58; warning&#58; format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t &#123;aka long long unsigned int&#125;' &#91;-Wformat=&#93;
         printf ("*** Cannot allocate %lu bytes of memory\n", cb&#41;;
                                                                ^
egtb.cpp&#58; In function 'void VInitEnumerations&#40;)'&#58;
egtb.cpp&#58;1310&#58;66&#58; warning&#58; format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t &#123;aka long long unsigned int&#125;' &#91;-Wformat=&#93;
         printf ("\nAllocated %luk\n\n", &#40;cbAllocated + 1023&#41;/1024&#41;;
                                                                  ^
egtb.cpp&#58; In function 'void VCheckSize&#40;int, color, int, INDEX, char*)'&#58;
egtb.cpp&#58;6238&#58;45&#58; warning&#58; unknown conversion type character 'l' in format &#91;-Wformat=&#93;
                 rgchTbName, cbOk1, cbOk2, cb&#41;;
                                             ^
egtb.cpp&#58;6238&#58;45&#58; warning&#58; unknown conversion type character 'l' in format &#91;-Wformat=&#93;
egtb.cpp&#58;6238&#58;45&#58; warning&#58; unknown conversion type character 'l' in format &#91;-Wformat=&#93;
egtb.cpp&#58;6238&#58;45&#58; warning&#58; too many arguments for format &#91;-Wformat-extra-args&#93;
gcc -fprofile-arcs  -pthread -lstdc++  -o crafty crafty.o egtb.o -lm
make&#91;2&#93;&#58; Leaving directory '/f/project/dcorbit/crafty-25.0.1'
make&#91;1&#93;&#58; Leaving directory '/f/project/dcorbit/crafty-25.0.1'

DCorbit@dcorbit MINGW64 /f/project/dcorbit/crafty-25.0.1
$
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

Dann Corbit
Posts: 10118
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Crafty 25.0.1

Post by Dann Corbit » Sat Jan 16, 2016 12:09 am

I think the problem may have been that I needed WINDOWS64 defined.
I also changed to the gcc intrinsic popcount.

Those two things with this option:

windows-gcc-profile-hy:
$(MAKE) -j target=WINDOWS \
CC=gcc CXX=g++ \
opt='-DTEST -DWINDOWS64 -DINLINEASM -DPOPCNT -DCPUS=24 -DEPD ' \
CFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-arcs \
-pthread -std=gnu11' \
CXFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-arcs \
-pthread -std=gnu++14' \
LDFLAGS='$(LDFLAGS) -fprofile-arcs -pthread -lstdc++ ' \
crafty-make

created a functional binary.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

Dann Corbit
Posts: 10118
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Crafty 25.0.1

Post by Dann Corbit » Sat Jan 16, 2016 1:46 am

Until Jim makes a better one, here is a version which will function on some 64 bit systems:

https://www.dropbox.com/s/4pe5g8qb13fgd ... .1.7z?dl=0
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

Dann Corbit
Posts: 10118
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Crafty 25.0.1

Post by Dann Corbit » Sat Jan 16, 2016 2:32 am

This version does not work properly on my system either.
Probably best to wait for Jim Ablett to make one.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

User avatar
Peter Skinner
Posts: 1760
Joined: Sun Feb 26, 2006 12:49 pm
Location: Edmonton, Alberta, Canada
Full name: Peter Skinner
Contact:

Re: Crafty 25.0.1

Post by Peter Skinner » Sat Jan 16, 2016 5:03 am

The latest source released just a few minutes ago compiles just fine here using Dann's method:

https://drive.google.com/file/d/0B-Mq4c ... sp=sharing

Peter
I got kicked out of Chapters because I moved all the Bible's to the fiction section.

User avatar
Jim Ablett
Posts: 1327
Joined: Fri Jul 14, 2006 5:56 am
Location: London, England
Contact:

Re: Crafty 25.0.1

Post by Jim Ablett » Sat Jan 16, 2016 10:26 pm

Builds on my Crafty page have been updated to latest version.

http://crafty0981.moonfruit.com/

Jim.

Gusev
Posts: 1475
Joined: Mon Jan 28, 2013 1:51 pm

Re: Crafty 25.0.1

Post by Gusev » Mon Feb 29, 2016 10:49 pm

Would it be possible to get Crafty 25.0.1 JA UCI made, by any chance? We could run it in FOSCEC Season 3, then.
Jim Ablett wrote:Builds on my Crafty page have been updated to latest version.

http://crafty0981.moonfruit.com/

Jim.

Post Reply