crafty-22.0

Discussion of chess software programming and technical issues.

Moderator: Ras

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

Re: crafty-22.0

Post by bob »

Guetti wrote:Does somebody have good compile options for crafty using the latest Intel compiler 10.1.012 on linux for amd64/Opteron?
I tried make linux-icc but the compiler tells me that -xN and -Ob2 are not supported anymore.
An can I just compile with 'make profile'?
Use the make linux-64 target. That is what I am using on my 64 bit box with the latest intel compiler... (version 10.whatever)...

Even better:

edit the "profile" target (profile: label) and at the top, change the make target to
"make linux-64-profile" and at the bottom of that section, change the make target to "make linux-64".

Now type "make profile", sit back for about 2 minutes, and you will have a profile-guided version that is built exactly as I build mine...

If you want, email me and I can email you a copy of the make file for my core-2 laptop that is set up to do exactly that already...
Guetti

Re: crafty-22.0

Post by Guetti »

bob wrote:
Guetti wrote:Does somebody have good compile options for crafty using the latest Intel compiler 10.1.012 on linux for amd64/Opteron?
I tried make linux-icc but the compiler tells me that -xN and -Ob2 are not supported anymore.
An can I just compile with 'make profile'?
Use the make linux-64 target. That is what I am using on my 64 bit box with the latest intel compiler... (version 10.whatever)...

Even better:

edit the "profile" target (profile: label) and at the top, change the make target to
"make linux-64-profile" and at the bottom of that section, change the make target to "make linux-64".

Now type "make profile", sit back for about 2 minutes, and you will have a profile-guided version that is built exactly as I build mine...

If you want, email me and I can email you a copy of the make file for my core-2 laptop that is set up to do exactly that already...
Hm, there seem to be no linux-64 in the Makefile that I downloaded with crafty. :oops:
I only have linux-icc and linux-icc-profile targets, but they are for 32-bit.

Code: Select all

inux-icc:
	$(MAKE) target=LINUX \
		CC=icc CXX=icc \
		CFLAGS='$(CFLAGS) -O2 \
			-xN -prof_use -prof_dir ./profdir \
			-Ob2 -fno-alias' \
		CXFLAGS='$(CFLAGS) -O2 \
			-w -xN -prof_use -prof_dir ./profdir' \
		LDFLAGS='$(LDFLAGS) -lstdc++' \
		opt='$(opt) -DTEST -DINLINE32 -DCPUS=2' \
		crafty-make

linux-icc-profile:
	$(MAKE) target=LINUX \
		CC=icc CXX=icc \
		CFLAGS='$(CFLAGS) -O2 \
			-xN -prof_genx -prof_dir ./profdir \
			-Ob2 -fno-alias' \
		CXFLAGS='$(CFLAGS) -O2 \
			-w -xN -prof_genx -prof_dir ./profdir' \
		LDFLAGS='$(LDFLAGS) -lstdc++ ' \
		opt='$(opt) -DTEST -DINLINE32 -DCPUS=2' \
		crafty-make
Can you paste your linux-64(-profile) sections?
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: crafty-22.0

Post by bob »

Guetti wrote:
bob wrote:
Guetti wrote:Does somebody have good compile options for crafty using the latest Intel compiler 10.1.012 on linux for amd64/Opteron?
I tried make linux-icc but the compiler tells me that -xN and -Ob2 are not supported anymore.
An can I just compile with 'make profile'?
Use the make linux-64 target. That is what I am using on my 64 bit box with the latest intel compiler... (version 10.whatever)...

Even better:

edit the "profile" target (profile: label) and at the top, change the make target to
"make linux-64-profile" and at the bottom of that section, change the make target to "make linux-64".

Now type "make profile", sit back for about 2 minutes, and you will have a profile-guided version that is built exactly as I build mine...

If you want, email me and I can email you a copy of the make file for my core-2 laptop that is set up to do exactly that already...
Hm, there seem to be no linux-64 in the Makefile that I downloaded with crafty. :oops:
I only have linux-icc and linux-icc-profile targets, but they are for 32-bit.

Code: Select all

inux-icc:
	$(MAKE) target=LINUX \
		CC=icc CXX=icc \
		CFLAGS='$(CFLAGS) -O2 \
			-xN -prof_use -prof_dir ./profdir \
			-Ob2 -fno-alias' \
		CXFLAGS='$(CFLAGS) -O2 \
			-w -xN -prof_use -prof_dir ./profdir' \
		LDFLAGS='$(LDFLAGS) -lstdc++' \
		opt='$(opt) -DTEST -DINLINE32 -DCPUS=2' \
		crafty-make

linux-icc-profile:
	$(MAKE) target=LINUX \
		CC=icc CXX=icc \
		CFLAGS='$(CFLAGS) -O2 \
			-xN -prof_genx -prof_dir ./profdir \
			-Ob2 -fno-alias' \
		CXFLAGS='$(CFLAGS) -O2 \
			-w -xN -prof_genx -prof_dir ./profdir' \
		LDFLAGS='$(LDFLAGS) -lstdc++ ' \
		opt='$(opt) -DTEST -DINLINE32 -DCPUS=2' \
		crafty-make
Can you paste your linux-64(-profile) sections?
certainly:

Code: Select all




linux-64:
        $(MAKE) target=LINUX \
                CC=icc CXX=icc \
                CFLAGS='$(CFLAGS) -xP -O3 -fno-alias -ip -prof_use -prof_dir ./profdir' \
                CXFLAGS='$(CFLAGS) -O2 -w -prof_use -prof_dir ./profdir' \
                LDFLAGS='$(LDFLAGS) -lstdc++' \
                opt='$(opt) -DINLINE64 -DCPUS=2' \
                crafty-make

linux-64-profile:
        $(MAKE) target=LINUX \
                CC=icc CXX=icc \
                CFLAGS='$(CFLAGS) -xP -O3 -fno-alias -ip -prof_genx -prof_dir ./profdir' \
                CXFLAGS='$(CFLAGS) -O2 -w -prof_genx -prof_dir ./profdir' \
                LDFLAGS='$(LDFLAGS) -lstdc++ ' \
                opt='$(opt) -DINLINE64 -DCPUS=2' \
                crafty-make


For the other part I mentioned:

Code: Select all


profile:
        @rm -rf profdir
        @rm -rf position.bin
        @mkdir profdir
        @touch *.c *.cpp *.h
        $(MAKE) linux-64-profile    <----------------------------------------
        @echo "#!/bin/csh" > runprof
...
...
        @./runprof
        @rm runprof
        @touch *.c *.cpp *.h
        $(MAKE) linux-64  <----------------------------------------




with the above, "make profile" will make the best executable I know how to make..."
Guetti

Re: crafty-22.0

Post by Guetti »

It worked thanks, I just had to replace -xP with -xW. (no SEE3)
I'm not sure however if ICC is a good option for Athlon64. Here are the results I get using craftys bench command:

crafty-22.0 Athlon64 3400+ 96M hash
Linux gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)

gcc:
Raw nodes per second: 2110330.425710

gcc profile:
Raw nodes per second: 2297297.455702

icc:
Raw nodes per second: 2224527.804663

icc profile:
Raw nodes per second: 2256292.592593

crafty-22.0 PowerPC G5 96M hash
Apple gcc version 4.2.1 (Apple Inc. build 5531)

gcc:
Raw nodes per second: 1619068.747999

gcc profile:
Raw nodes per second: 1677621.665561
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: crafty-22.0

Post by bob »

Guetti wrote:It worked thanks, I just had to replace -xP with -xW. (no SEE3)
I'm not sure however if ICC is a good option for Athlon64. Here are the results I get using craftys bench command:
I didn't notice your AMD processor. Yes, I found the same thing. I would tend to use gcc with AMD. I have never tried to see what is wrong, but when I have tried ICC on opterons, I have always gotten unsatisfactory speed results... On Intel processors, icc is better than gcc by a wide margin... just not on AMD processors, which is strange...


crafty-22.0 Athlon64 3400+ 96M hash
Linux gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)

gcc:
Raw nodes per second: 2110330.425710

gcc profile:
Raw nodes per second: 2297297.455702

icc:
Raw nodes per second: 2224527.804663

icc profile:
Raw nodes per second: 2256292.592593

crafty-22.0 PowerPC G5 96M hash
Apple gcc version 4.2.1 (Apple Inc. build 5531)

gcc:
Raw nodes per second: 1619068.747999

gcc profile:
Raw nodes per second: 1677621.665561