New Intel C++ Compiler v10.1.020

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
David Dahlem
Posts: 900
Joined: Wed Mar 08, 2006 9:06 pm

Re: New Intel C++ Compiler v10.1.020

Post by David Dahlem »

Denis P. Mendoza wrote:
David Dahlem wrote:
Denis P. Mendoza wrote:
David Dahlem wrote:I downloaded the 30 day trial of the new Intel C++ Compiler version 10.1.020 available here ...

https://registrationcenter.intel.com/Re ... ister.aspx

It's supposed to support the IDE integration of VS2008, but doesn't seem to work with my 2008 express version. So i'm trying to learn how to use the Intel compiler on the command line. I admit i am almost a complete dummy with compilers, and especially the command line.

I have managed to compile a simple Hello.cpp file on the Intel command line with this command - icl Hello.cpp. Could someone help a compiler idiot with the commands for multiple source files?

Thanks
Dave
Hello David,

Welcome to the Intel compiling group. I've been an IDE dependent before, but later on found out that compiling in command prompt is much easier.

Here's a simple tip:

1. Let's say we want to compile Fruit 2.1 src. Extract it in a folder location like c:\fruit21src
2. Start your IA-32 32-bit compiler in command prompt. Type "cd" then click space, and type the location of source, which is "c:\fruit21src". Press enter and your 'source" location will display at command prompt.
3. For ease in typing the command lines, you could prepare the long scripts in a text editor like notepad. Here's the following sample:

Code: Select all

icl -o fruit.exe *.cpp /nologo /MT /W3 /DWIN32 /DNDEBUG /D_CONSOLE /D_MBCS /G7 /Ox /QxK /Qipo /Qprof-gen
(or add some "spices" like /Qunroll /fp:fast /Zp16 (experiment with them))
Copy and paste it at command prompt, then press "enter".
4. Run some games/epd tests without closing "console", using the "instrumented" engine - fruit.exe. Collect enough profiling data - .dyn files.
5. After profiling, compile your optimized code using the same flags. just replace /Qprof-gen with /Qprof-use. You'll now have Fruit.exe with PGO.
For ease again, here is your last command lines:

Code: Select all

icl -o fruit.exe *.cpp /nologo /MT /W3 /DWIN32 /DNDEBUG /D_CONSOLE /D_MBCS /G7 /Ox /QxK /Qipo /Qprof-use
Copy and paste it at command prompt, then press "enter".

I hope this helps David.

Denis
Hi Denis

Wow, tips from a great compiling guru!! Thank you, this should help me a lot. I'll try your tips. My time is limited, i may be moving to a new home next week, and i want to get a fast build of Sage to release before i move. :-)

Thanks
Dave
Thanks, I'm just new to this stuff and I'm no "guru". I only developed much of this through constant practice and from "Matser Jim' himself :wink: . I only share what I learned from him. And yes, it is much easier to make a bat file for this pupose - no sweat :D. You'll forget about your IDE as time goes on.

We'll be waiting for yoiur Intel optimized "Super Sage"!

[/code]
Hi Denis

I've forgotten my IDE already. :-) It's still necessary for writing code though.

I've learned to do PGO compiling on the Intel command line now!! It's awesome, create much faster builds. But it's slow and tiresome, the way i have to do it. There must be a way to automate this process. In order to create the .dyn files, i manually entered 25 epd positions and let Sage analyze for 10 seconds.

Can this be automated somehow with a .bat file? And another question, will the amount of .dyn files created make a difference, will more be better?

Anyway, thanks for the great tips. I'll probably release a new version of Sage soon.

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

Re: New Intel C++ Compiler v10.1.020

Post by pedrox »

You can have a function in your code, for example Test () with 25 positions, this is what I do.

Putting more positions or play more games I do not think it improves the speed, I tried once and got the same results.

Code: Select all

void Test() 
{
	max_time = 10000;
	max_depth = 64;
	status = SEARCH;
	SetBoard("5rk1/1p6/q2P3p/2p2rp1/p1nbQ3/P1N3BP/1PR1B1P1/4K3 b - -");
	Think();
	SetBoard("4r1k1/1pq2p1p/2p2npb/2N5/1PPQn1P1/7P/6B1/B2R2K1 b - -");
	Think();
                ...
                ...
}
User avatar
David Dahlem
Posts: 900
Joined: Wed Mar 08, 2006 9:06 pm

Re: New Intel C++ Compiler v10.1.020

Post by David Dahlem »

pedrox wrote:You can have a function in your code, for example Test () with 25 positions, this is what I do.

Putting more positions or play more games I do not think it improves the speed, I tried once and got the same results.

Code: Select all

void Test() 
{
	max_time = 10000;
	max_depth = 64;
	status = SEARCH;
	SetBoard("5rk1/1p6/q2P3p/2p2rp1/p1nbQ3/P1N3BP/1PR1B1P1/4K3 b - -");
	Think();
	SetBoard("4r1k1/1pq2p1p/2p2npb/2N5/1PPQn1P1/7P/6B1/B2R2K1 b - -");
	Think();
                ...
                ...
}
I also have a bench test function with 15 positions. Running this test only creates one .dyn file. Running the perft test on a positiion will also create a .dyn file. I notice the difficulty of the perft position will create a larger .dyn file, and the bench test will create a larger file.

I haven't had time to test this effect on the resulting build. It probably doesn't make any difference.

Regards
Dave

Regards
Dave
User avatar
David Dahlem
Posts: 900
Joined: Wed Mar 08, 2006 9:06 pm

Re: New Intel C++ Compiler v10.1.020

Post by David Dahlem »

pedrox wrote:You can have a function in your code, for example Test () with 25 positions, this is what I do.

Putting more positions or play more games I do not think it improves the speed, I tried once and got the same results.

Code: Select all

void Test() 
{
	max_time = 10000;
	max_depth = 64;
	status = SEARCH;
	SetBoard("5rk1/1p6/q2P3p/2p2rp1/p1nbQ3/P1N3BP/1PR1B1P1/4K3 b - -");
	Think();
	SetBoard("4r1k1/1pq2p1p/2p2npb/2N5/1PPQn1P1/7P/6B1/B2R2K1 b - -");
	Think();
                ...
                ...
}
I'm still a little confused about the .dyn files. Once i create some .dyn files with specific switches and the /Qprof-gen switch, they can only be used for creating a build using the same switches and the /Qprof-use switch, right?

Or can the .dyn files be used with a different set of switches along with the /Qprof-use switch? In other words, do i have to create different .dyn files for each build? Creating the .dyn files takes a lot of time, and there are so many switch combinations to test, so i'm hoping for a time saving answer. :-)

Regards
Dave