bugXBoard - Bugs: bug #6908, Node count stops after about 4.3...

 
 

bug #6908: Node count stops after about 4.3 billion nodes

Submitted by:  None
Submitted on:  Tue 02 Dec 2003 12:13:27 AM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: NoneStatus: Remind
Assigned to: Daniel Mehrmann <mehrmann>Open/Closed: Closed
Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 15 Feb 2004 02:30:50 AM UTC, comment #4:

I forgot this:

--- backend.c 2004-02-15 01:51:08.000000000 +0100
+++ backend.c.new 2004-02-15 03:16:44.453125000 +0100
@@ -4375,7 +4375,7 @@

~ if (!ignore) {
~ buf1[0] = NULLCHAR;
- if (sscanf(message, "%d%c %d %d %I64u %[^\n]\n",
+ if (sscanf(message, "%d%c %d %d" u64Display "%[^\n]\n",
~ &plylev, &plyext, &curscore, &time, &nodes, buf1) >= 5) {

~ if (plyext != ' ' && plyext != '\t') {
@@ -4455,7 +4455,7 @@
~ DisplayAnalysis();
~ }
~ return;
- } else if (sscanf(message,"stat01: %d %lu %d %d %d %s",
+ } else if (sscanf(message,"stat01: %d" u64Display "%d %d %d %s",
~ &time, &nodes, &plylev, &mvleft,
~ &mvtot, mvname) >= 5) {
~ /* The stat01: line is from Crafty (9.29+) in response
@@ -9263,7 +9263,7 @@

~ if (programStats.moves_left > 0 && appData.periodicUpdates) {
~ if (programStats.move_name[0] != NULLCHAR) {
- sprintf(buf, "depth=%d %d/%d(%s) %+.2f %s%s\nNodes: %I64u NPS:
%d\nTime: %02d:%02d:%02d.%02d",
+ sprintf(buf, "depth=%d %d/%d(%s) %+.2f %s%s\nNodes: "u64Display"
NPS: %d\nTime: %02d:%02d:%02d.%02d",
~ programStats.depth,
~ programStats.nr_moves-programStats.moves_left,
~ programStats.nr_moves, programStats.move_name,
@@ -9272,7 +9272,7 @@
~ xtra[programStats.got_fail] : "",
~ (u64)programStats.nodes, (int)nps, h, m, s, cs);
~ } else {
- sprintf(buf, "depth=%d %d/%d %+.2f %s%s\nNodes: %I64u NPS:
%d\nTime: %02d:%02d:%02d.%02d",
+ sprintf(buf, "depth=%d %d/%d %+.2f %s%s\nNodes: "u64Display" NPS:
%d\nTime: %02d:%02d:%02d.%02d",
~ programStats.depth,
~ programStats.nr_moves-programStats.moves_left,
~ programStats.nr_moves, ((float)programStats.score)/100.0,
@@ -9282,7 +9282,7 @@
~ (u64)programStats.nodes, (int)nps, h, m, s, cs);
~ }
~ } else {
- sprintf(buf, "depth=%d %+.2f %s%s\nNodes: %I64u NPS: %d\nTime:
%02d:%02d:%02d.%02d",
+ sprintf(buf, "depth=%d %+.2f %s%s\nNodes: "u64Display" NPS:
%d\nTime: %02d:%02d:%02d.%02d",
~ programStats.depth,
~ ((float)programStats.score)/100.0,
~ programStats.movelist,

--- backend.h 2004-02-15 01:51:08.000000000 +0100
+++ backend.h.new 2004-02-15 03:12:08.359375000 +0100
@@ -177,16 +177,17 @@
~ int ics_type;

~ /* unsigned int 64 for engine nodes work and display */
-#define u64Display "%I64u"
~ #ifdef WIN32
~ /* I don't know the name for this type of other compilers
~ * If it not work just added here
~ * Thats for MS Visual Studio
~ */
~ #define u64 unsigned __int64
+ #define u64Display "%I64u"
~ #else
~ /* GNU gcc */
~ #define u64 unsigned long long
+ #define u64Display "%llu"
~ #endif

Anonymous
Sun 15 Feb 2004 01:00:57 AM UTC, comment #3:

Hi,
this is my patch for Bug #6908.
Its not full tested, but i'm sure it works. I let my crafty running over
the night and we will see what happend ;))

--- backend.h 2004-02-12 13:32:59.000000000 +0100
+++ backend.h.new 2004-02-15 00:08:52.265625000 +0100
@@ -174,8 +174,21 @@
~ #define ICS_ICC 1
~ #define ICS_FICS 2
~ #define ICS_CHESSNET 3 /* not really supported */
-int ics_type;
-
+int ics_type;
+
+/* unsigned int 64 for engine nodes work and display */
+#define u64Display "%I64u"
+#ifdef WIN32
+ /* I don't know the name for this type of other compilers
+ * If it not work just added here
+ * Thats for MS Visual Studio
+ */
+ #define u64 unsigned __int64
+#else
+ /* GNU gcc */
+ #define u64 unsigned long long
+#endif
+

~ /* pgntags.c prototypes
~ */

--- backend.c 2004-02-12 13:32:59.000000000 +0100
+++ backend.c.new 2004-02-15 01:24:33.578125000 +0100
@@ -131,7 +131,7 @@
~ int nr_moves; /* Total nr of root moves */
~ int moves_left; /* Moves remaining to be searched */
~ char move_name[MOVE_LEN]; /* Current move being searched, if
provided */
- unsigned long nodes; /* # of nodes searched */
+ u64 nodes; /* # of nodes searched */
~ int time; /* Search time (centiseconds) */
~ int score; /* Score (centipawns) */
~ int got_only_move; /* If last msg was "(only move)" */
@@ -4344,7 +4344,7 @@
~ if (appData.showThinking) {
~ int plylev, mvleft, mvtot, curscore, time;
~ char mvname[MOVE_LEN];
- unsigned long nodes;
+ u64 nodes;
~ char plyext;
~ int ignore = FALSE;
~ int prefixHint = FALSE;
@@ -4375,7 +4375,7 @@

~ if (!ignore) {
~ buf1[0] = NULLCHAR;
- if (sscanf(message, "%d%c %d %d %lu %[^\n]\n",
+ if (sscanf(message, "%d%c %d %d %I64u %[^\n]\n",
~ &plylev, &plyext, &curscore, &time, &nodes, buf1) >= 5) {

~ if (plyext != ' ' && plyext != '\t') {
@@ -9251,7 +9251,7 @@
~ if (programStats.got_only_move) {
~ strcpy(buf, programStats.movelist);
~ } else {
- nps = (((double)programStats.nodes) /
+ nps = (((u64)programStats.nodes) /
~ (((double)programStats.time)/100.0));

~ cs = programStats.time % 100;
@@ -9263,32 +9263,32 @@

~ if (programStats.moves_left > 0 && appData.periodicUpdates) {
~ if (programStats.move_name[0] != NULLCHAR) {
- sprintf(buf, "depth=%d %d/%d(%s) %+.2f %s%s\nNodes: %lu NPS:
%d\nTime: %02d:%02d:%02d.%02d",
+ sprintf(buf, "depth=%d %d/%d(%s) %+.2f %s%s\nNodes: %I64u NPS:
%d\nTime: %02d:%02d:%02d.%02d",
~ programStats.depth,
~ programStats.nr_moves-programStats.moves_left,
~ programStats.nr_moves, programStats.move_name,
~ ((float)programStats.score)/100.0, programStats.movelist,
~ only_one_move(programStats.movelist)?
~ xtra[programStats.got_fail] : "",
- programStats.nodes, (int)nps, h, m, s, cs);
+ (u64)programStats.nodes, (int)nps, h, m, s, cs);
~ } else {
- sprintf(buf, "depth=%d %d/%d %+.2f %s%s\nNodes: %lu NPS: %d\nTime:
%02d:%02d:%02d.%02d",
+ sprintf(buf, "depth=%d %d/%d %+.2f %s%s\nNodes: %I64u NPS:
%d\nTime: %02d:%02d:%02d.%02d",
~ programStats.depth,
~ programStats.nr_moves-programStats.moves_left,
~ programStats.nr_moves, ((float)programStats.score)/100.0,
~ programStats.movelist,
~ only_one_move(programStats.movelist)?
~ xtra[programStats.got_fail] : "",
- programStats.nodes, (int)nps, h, m, s, cs);
+ (u64)programStats.nodes, (int)nps, h, m, s, cs);
~ }
~ } else {
- sprintf(buf, "depth=%d %+.2f %s%s\nNodes: %lu NPS: %d\nTime:
%02d:%02d:%02d.%02d",
+ sprintf(buf, "depth=%d %+.2f %s%s\nNodes: %I64u NPS: %d\nTime:
%02d:%02d:%02d.%02d",
~ programStats.depth,
~ ((float)programStats.score)/100.0,
~ programStats.movelist,
~ only_one_move(programStats.movelist)?
~ xtra[programStats.got_fail] : "",
- programStats.nodes, (int)nps, h, m, s, cs);
+ (u64)programStats.nodes, (int)nps, h, m, s, cs);
~ }
~ }
~ DisplayAnalysisText(buf)

Anonymous
Tue 02 Dec 2003 10:04:29 AM UTC, comment #2:

This problem is known and at the moment still open because its not easy to find a right solution.

Daniel Mehrmann <mehrmann>
Project MemberIn charge of this item.
Tue 02 Dec 2003 12:33:50 AM UTC, comment #1:

Allright , I should have known that this number of Nodes
is 2^32. So can we change "long nodes" to something else ?
I don't know C-programming.

Anonymous
Tue 02 Dec 2003 12:13:27 AM UTC, original submission:

Xboard 4.2.7. Analysing position with Crafty 19.6.
Observing after a while that the Node count has stopped.
Not sure if depth and variation gets updated. The time runs.
NPS is dropping.

depth=21 1/24 +0.66 1. Kf3 Rc8 2. Rd7+ Rc7 3. Rd3 Kc8 4. Rd8+ Kb7 5. a3 Rc8 6. Rd7+ Rc7 7. Rd3 Kc8 8. Rd8+ Kb7 9. Ke4 Rc8 10. Rd7+ Rc7 11. Rd3 Kc8 12. Rd8+ Kb7 13. Bf4 Re7 14. f3 Kc7
Nodes: 4294967295 NPS: 913574
Time: 01:18:21.28

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 28 May 2010 06:35:00 AM UTCerkDependencies-=>bugs #29978 is dependent
Tue 17 Feb 2004 12:13:39 AM UTCmehrmannOpen/ClosedOpen=>Closed
Thu 12 Feb 2004 12:45:25 AM UTCmehrmannAssigned toNone=>mehrmann
Tue 02 Dec 2003 10:04:29 AM UTCmehrmannSeverity3 - Normal=>2 - Minor
  StatusNone=>Remind

Back to the top


Powered by Savane 3.1-cleanup1