Main
Date: 06 Aug 2006 01:25:25
From: Dave (from the UK)
Subject: Crafty with muliple UltraSPARC CPUs
At one point in the dim and distant past I compiled crafty to run on a
Sun which had 4 CPUs. I believe it was a Sun SPARCstation 20, with
32-bit SuperSPARC CPUs but it might possibly have been a quad processor
Sun Ultra 80 with 64-bit UltraSPARC CPUs. I've no idea of what version
ofd crafty it was.

I've downloaded the latest crafty (20.14), but it refuses to compile if
I try to define SMP in the makefile.

teal /export/home/drkirkby/crafty-20.14 % gmake solaris-gcc
gmake target=SUN \
CC=gcc CXX=g++ \
CFLAGS=' -Wall -pipe -D_REENTRANT -O2 \
-fforce-mem -fomit-frame-pointer' \
CXFLAGS= \
LDFLAGS=' -lstdc++' \
opt=' -DSMP -DCPUS=4' \
crafty-make
gmake[1]: Entering directory `/export/home/drkirkby/crafty-20.14'
gmake[2]: Entering directory `/export/home/drkirkby/crafty-20.14'
g++ -c -DSMP -DCPUS=4 -DSUN egtb.cpp
egtb.cpp:4493: warning: `TB_CRC_CHECK' initialized and declared `extern'
lock.h: In function `void UnlockX86(volatile int*)':
lock.h:110: error: impossible constraint in `asm'

Although the UltraSPARC are 64-bit I did not attempt to compile as 64-bit.

Has crafty changed in a way that would break SMP support on SPARC in the
last few years?

I know crafty used to use all 4 CPUs on a quad processor Sun of mine, I
just can't recall if it was the somewhat more modern Ultra 80 (4 x
64-bit CPUs) I have now or the older SPARCstation 20 (4 x 32-bit CPUs).

--
Dave (from the UK)

Please note my email address changes periodically to avoid spam.
It is always of the form: [email protected]
Hitting reply will work for a few months only - later set it manually.

http://witm.sourceforge.net/ (Web based Mathematica front end)




 
Date: 06 Aug 2006 07:11:12
From: Anders Thulin
Subject: Re: Crafty with muliple UltraSPARC CPUs
Dave (from the UK) wrote:

> lock.h: In function `void UnlockX86(volatile int*)':
> lock.h:110: error: impossible constraint in `asm'
>
> Although the UltraSPARC are 64-bit I did not attempt to compile as 64-bit.
>
> Has crafty changed in a way that would break SMP support on SPARC in the
> last few years?

The function name is somewhat suspicious: why should a SPARC binary call
UnlockX86? The error seems to be that the 'q' constraint is invoked in the
asm-statement: 'q' applies only to X86 targets.

A quick check of the lock.h file suggests that when SMP is defined,
SPARC is not among the possible target architectures: the default architecture
is X86, and that's where you end up. The other two supported targets are
ALPHA and POWERPC. (Slight lack of defensive coding of the #if's here, I think.)

I suggest you write directly to Robert Hyatt, and ask.

--
Anders Thulin ath*algonet.se http://www.algonet.se/~ath



  
Date: 06 Aug 2006 09:59:12
From: Dave (from the UK)
Subject: Re: Crafty with muliple UltraSPARC CPUs
Anders Thulin wrote:
> Dave (from the UK) wrote:
>
>> lock.h: In function `void UnlockX86(volatile int*)':
>> lock.h:110: error: impossible constraint in `asm'
>>
>> Although the UltraSPARC are 64-bit I did not attempt to compile as
>> 64-bit.
>>
>> Has crafty changed in a way that would break SMP support on SPARC in
>> the last few years?
>
>
> The function name is somewhat suspicious: why should a SPARC binary call
> UnlockX86? The error seems to be that the 'q' constraint is invoked in the
> asm-statement: 'q' applies only to X86 targets.


Em, I had not noticed that. I should have been more observant.
> A quick check of the lock.h file suggests that when SMP is defined,
> SPARC is not among the possible target architectures: the default
> architecture
> is X86, and that's where you end up. The other two supported targets are
> ALPHA and POWERPC. (Slight lack of defensive coding of the #if's here, I
> think.)

I'm pretty sure I have run multiprocessors on Crafty in the past. I had
a .crafty rc of years ago which set the number of cpus to be 3.
(Although I have 4 CPU, I was not overkeen on letting it use too much
resources).

But clearly something is very wrong in this case.

> I suggest you write directly to Robert Hyatt, and ask.

Yes, will do.

--
Dave (from the UK)

Please note my email address changes periodically to avoid spam.
It is always of the form: [email protected]
Hitting reply will work for a few months only - later set it manually.

http://witm.sourceforge.net/ (Web based Mathematica front end)