Author: Eugene Nalimov
Date: 11:19:50 09/22/99
Go up one level in this thread
Write something like that in your chess.h:
#if defined (__gcc) // Or how it is called
typedef long long node_t;
#define node_format "%lld"
#elif defined (_MSC_VER)
typedef __int64 node_t;
#define node_format "%I64d"
#else
typedef unsigned node_t;
#define node_format "%ud"
#endif
And when you print out the counter, use string concatenation:
printf ("... other formats " node_format " ... rest of formats", ...);
Eugene
On September 22, 1999 at 13:36:11, Robert Hyatt wrote:
>On September 22, 1999 at 02:29:00, Richard A. Fowell (fowell@netcom.com) wrote:
>
>>On September 21, 1999 at 13:38:56, Dann Corbit wrote:
>>
>>>On September 21, 1999 at 13:20:59, Dann Corbit wrote:
>>>[snip]
>>>> time=600:00 cpu=99% mat=0 n=2230832056 fh=1% nps=61952
>>>> ext-> checks=663307593 recaps=20560034 pawns=12911665
>>>>1rep=21027250 thrt:296212
>>>> predicted=0 nodes=2230832056 evals=1175553882
>>>> endgame tablebase-> probes done=48311 successful=44616
>>>The actual node count will be something around 6 billion.
>>
>>Looks like rollover of an unsigned 32-bit int. It's a common symptom - at
>>least Crafty doesn't seem to be using signed 32-bit ints, which leads to the
>>ever-popular negative node count. MacChess went to 64-bit ints
>>a number of revs back because of this issue, which I first noted when
>>running 3-day analyses.
>>
>>Richard A. Fowell (fowell@netcom.com)
>>http://dmoz.org/Games/Board_Games/Chess/Software/Macintosh/
>
>
>There is a problem doing this for me. 64 bit ints are not yet ANSI-standard.
>If a compiler supports them, you can use them. But _if_ you want to print them,
>portability becomes an issue. IE in gcc I can use %lld to print one and it
>works just fine. But that breaks other compilers. If we can get a group that
>can give me a working 'format specification' that works on each compiler that
>supports this, I can perhaps #define something and switch the node counter to
>a long long/_int64...
>
>Bob
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.