Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Crafty binary for Cray computers?

Author: Eugene Nalimov

Date: 11:40:22 03/23/99

Go up one level in this thread


On March 23, 1999 at 14:25:26, Dann Corbit wrote:

>On March 23, 1999 at 14:23:29, KarinsDad wrote:
>
>>On March 23, 1999 at 13:47:41, Eugene Nalimov wrote:
>>
>>>On March 23, 1999 at 13:32:17, Dann Corbit wrote:
>>>
>>>>Does anyone know of Crafty binaries for the Cray computers?
>>>>
>>>>I may have need of one.  I would like to get the best possible binary from a
>>>>commercial compiler if that is feasible.  To make matters more difficult, I
>>>>would like to get the source files I have tweaked compiled if possible (not
>>>>necessary, but I make special tiny tweaks for the C.A.P. project).
>>>>
>>>>Also, about tablebase files for the Cray.  Does anyone know if the standard
>>>>files have the right endian ordering, or do they need to be recomputed?
>>>>
>>>>I do not know the model right now, but I know that the machine is two years old.
>>>
>>>Tablebases and compressed tablebases are endian-neutral.
>>>
>>>Eugene
>>
>>What does this mean?
>>
>>I thought that endian ordering was based on the capabilities of the chip and/or
>>OS, not on the database. Wouldn't you need a different set of code to access the
>>files properly on different systems?
>They must be stored as character strings or something like that. You can't get
>away with it if you use integers or floating point.  It's pretty remarkable if
>it works.

Of course you can use binary representation, just be sure you don't
extract more than byte at a time. Look at a code fragment from the
probing code:

#define R4(i) \
  ((ptr[i] << 24) + \
   (ptr[(i) + 1] << 16) +\
   (ptr[(i) + 2] << 8) +\
   (ptr[(i) + 3]))

Obviously that will work on both little-endian and big-endian
machines. You'll lost some performance, but in TB case that code
works only during program initialization.

Yes, formally speaking I'd have to say "TB probing code is endian-
neutral", but TBs without probing code are quite useless. And I
doubt there ever will be indepenently developed version of the
probing code.

Eugene



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.