Compiling crafty 21.6

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Compiling crafty 21.6

Post by pedrox »

Denis P. Mendoza wrote:
pedrox wrote:Hi Denis,

Thx for full details on compilation, are very useful, I was trying to find some messages of Jim and yours.

I have a question about pgo, I use microsoft visual c. I make "Profile Guided Optimization" --> "Instrument".

So I want to train the program, if I call the program from "Run Instumented/Optimized Application", it appears the console, at the console of danasah I have a test that I used to see 30 positions for 10 seconds, but I do like to do a test Positions epd or play several games? If I use Arena and install the engine that I have in the folder release, I have a message saying that "this application has failed to start becasuse PGORT90.DLL was not found.

Thx

Pedro
Hello Pedro,

This problem you encountered maybe caused by too many MSVC compilers inside your pc. Maybe the default environmental variables, etc.. are not properly set for your new compiler. It also happened to me using MSVC8 and MSVC9. My MSVC6 is still active as I use it to check errors on ICC compiling (as errors are not completely seen in console mode for ICC).

Since I'm not so familiar with the compiler GUI instructions, here's a trial-and-error attempt which works at the moment. I'm not exactly sure if all the files I'll mention are needed. I had not time to verify!

1. For MSVC9 (2008), after creating an instrumented excutable (assuming it is a normal 32 bit compilation) copy the pgort90.dll and pgodb90.dll (from C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin) and paste it in the location of the executable. If it doesn't work, try also to include pgocvt.exe, pgomgr.exe, and pgosweep.exe. I'm sure it will collect profiling data and merge these datas to create optimized code in the end. It isn't a perfect procedure but it works.
2. For MSVC 2005, you only need the dlls

It's unusual, but it is the only procedure I know at the moment.

I hope this helps Pedro.

Denis
Thx Denis.

It has worked with single copy the file pgort90.dll.

In this way I have followed your recommendation and since Arena tried to make the test WAC in 5 s, resolve the position 230 for 10 minutes and play 4 games of 5 +5. But I have not found difference by doing this to analyse 30 positions of test ICQ in 10 s.

The executable maked crash in a game, I am not sure whether it was coincidence or not.

I use a virtual machine with visual studio 2008 beta2, could it be that in a virtual machine optimization is not appropriate?

Pedro
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: Compiling crafty 21.6

Post by Denis P. Mendoza »

Hello Pedro,

If my unorthodox procedure worked, then it will be just the way to do it till a better procedure comes around. It's common to encounter crashes when profiling. I also use Arena for epd tests when gathering profiling data. Just discard the last data when crash occurred and restart again your "instrumented" engine.

I have no experience using virtual machines. I haven't been successful installing this when I tried on my XP x64 machine. At least, you could compile successfully.

Denis
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Compiling crafty 21.6

Post by bob »

thciobanu wrote:
Robert Hyatt wrote:There is effectively no difference.
Yes, I noticed that. When I first looked through the code I saw some for loops being left out for single CPU and was curious how much difference would they make in performance, but in my newbie test none were visible. Also no significant improvements were seen when comparing a SSE2 build with a "regular" one, but that again is probably just my noob-ness manifesting.
The only thing done in a one-cpu search is the test at the bottom of search.c to see if there are any idle processors that could help. the answer is always "no" so that test is the _only_ overhead incurred. None of the other code can ever be reached until that test is satisfied, which it never will be.