Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Q. Why might node count differ between DEBUG and RELEASE

Author: Eugene Nalimov

Date: 12:19:19 12/13/04

Go up one level in this thread


On December 13, 2004 at 14:26:46, Scott Gasch wrote:

>On December 13, 2004 at 06:21:24, David B Weller wrote:
>
>>Hi,
>>
>>Inspired by a post over in the WB forum, I tried doing a 9 ply search from start
>>position. The DEBUG version searched fewer nodes.
>>
>>I am currently trying to switch off opt flags but so far I cant seem to pinpoint
>>the culprit.
>>
>>Any ideas what this means?
>>
>>using vc 2005 express beta
>>
>>Thank you.
>>
>>-Davidw
>
>No one here is going to be able to say for sure what's causing the node count
>difference.  It could be one of the things people already mentioned.  But here's
>how you find it yourself:
>
>1. Make a version of your engine that can dump a big text file to represent the
>search tree.  I prefer to make the text file in XML format so you can load it
>with a web browser and get some tree-like behavior / collapse branches.  Make
>one big text file for DEBUG and one for a release build and then diff them.
>That will tell you where the trees differ.  An added bonus is that you will be
>able to look over search trees and get some good pruning ideas.
>
>2. You said you are building with MSVC.  Another thing I like doing is building
>with multiple compilers and comparing nodecounts.  The downside is you have to
>do some work to get your code to build with both compilers.  The upside is that
>with different compilers/code generators/linkers you are much more likely to
>find bugs that are related to layout of the binary or "oops I referenced array
>entry 10 of a 9 entry array."
>
>3. If you choose to do 2. then may I suggest gcc for your other compiler?  The
>benefits are: if you use gcc your code will be buildable on a ton of different
>hardware and OS platforms and if you use gcc (and are only building C code --
>not C++) then there's a very good bounds checker patch for the compiler.  Check
>out the gcc homepage for more info.
>
>4. If you have money to burn, are an employee of NuMega, or are an employee of a
>big company who has a site license for it... you might run your code through
>Boundschecker.  It's a commercial product that does the same thing as the free
>bounds checker patch to gcc.  I bet it works with C++ though.  This thing is
>pretty pricey though.
>
>5. If you choose to do 3. then another great way to find bugs is to build for a
>totally different processor family.  I build for x86 and ia64, for example.  Of
>course any assembly language routines you have linked in need to be ported over
>or have generic replacements.
>
>Good luck!
>Scott

If you are using recent VC version you can try to compile your program with
/RTCus /GS flags. They can help you to find use of uninitialized variables and
stack arrays overwrites.

You can download recent (or beta) VS versions from MS web site free of charge.

Thanks,
Eugene



This page took 0.01 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.