Computer Chess Club Archives


Search

Terms

Messages

Subject: Crafty 19.1 for dual G4 Macs

Author: Ian Osgood

Date: 18:14:48 12/18/02


Greetings,

For those who wish to compile the latest crafty to take advantage of their dual
processor G4 PowerMacs, you can modify the standard Makefile to add a FreeBSD
target derivative:

freebsd-osx:
	$(MAKE) target=FreeBSD \
		CC=gcc CXX=g++ \
		CFLAGS='$(CFLAGS) -fomit-frame-pointer -O3 -Wall' \
		CXFLAGS=$(CFLAGS) \
		LDFLAGS=$(LDFLAGS) \
		opt='$(opt) -DSMP -DCPUS=2 -DMUTEX -DPOSIX \
		     -DCOMPACT_ATTACKS' \
		crafty-make

For the 3.1 version of gcc shipped with OS X 10.2 (Jaguar), one must modify the
link step, replacing $(CC) with $(CXX).

crafty:	$(objects)
	$(CXX) $(LDFLAGS) -o crafty $(objects) -lm  $(LIBS)

Going from one to two cpus sped up bench from 267 seconds to 175 seconds for
about 48M nodes (which varies from 41M to 62M due to multi-processing
indeterminacy).  The minimum bench time I've seen on my dual 450 is 138 seconds
(307K nps).

I found a marginal improvement with COMPACT_ATTACKS, and no improvement with
USE_ATTACK_FUNCTIONS.  I haven't fiddled around with the various gcc flags, but
the freebsd set above performs better than the netbsd set.

Pthread mutexes (MUTEX) could be eliminated if someone would write a PowerPC
equivalent for the inline assembly macro exchange() in lock.h.  I found an
inline __test_and_set in the Apple dev tools gcc headers, but I don't know
enough about gcc assembly syntax to get it to compile.

Ian Osgood



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.