Intel Compiler Help

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Intel Compiler Help

Postby Pradu » 27 Jul 2007, 06:10

Recently I've been having fun compiling Buzz with the free Intel C Compiller 10.0 for Linux and it compiled Buzz fine with -O3, but it started complaining when I used the -fast option:
Code: Select all
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c bitinstructions.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c board.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c book.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c consolecolors.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c dts.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c eval.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c hash.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c log.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c magicmoves.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c main.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c movegen.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c moveordering.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c mt19937-64.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c recog.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c search.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c thread.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c timemanager.c
icc -g -x c -DNDEBUG -D_POSIX -fast -static -w -c xboard.c
icc -s -pthread -static bitinstructions.o board.o book.o consolecolors.o dts.o eval.o hash.o log.o magicmoves.o main.o movegen.o moveordering.o mt19937-64.o recog.o search.o thread.o timemanager.o xboard.o -o Buzz
ipo: remark #11000: performing multi-file optimizations
ipo: remark #11006: generating assembly file /tmp/icccit1IBas_.s
log.c(71): (col. 3) remark: REVERSED LOOP WAS VECTORIZED.
log.c(85): (col. 3) remark: REVERSED LOOP WAS VECTORIZED.
search.c(247): (col. 5) remark: LOOP WAS VECTORIZED.
search.c(248): (col. 5) remark: LOOP WAS VECTORIZED.
/tmp/icccit1IBas_.s: Assembler messages:
/tmp/icccit1IBas_.s:34652: Error: no such instruction: `palignr $13,(%ebx),%xmm0'
/tmp/icccit1IBas_.s:34657: Error: no such instruction: `palignr $13,%xmm0,%xmm1'/tmp/icccit1IBas_.s:34781: Error: no such instruction: `palignr $11,(%ebx),%xmm0'
/tmp/icccit1IBas_.s:34786: Error: no such instruction: `palignr $11,%xmm0,%xmm1'icc: error #10014: problem during multi-file optimization compilation (code 1)
make: *** [Buzz] Error 1
I don't use any assembly at all for the code for the Intel Compiler, so I have no idea about what I have done wrong or how to fix this error. Anyone else had problems like this with the Intel Compiler?
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: Intel Compiler Help

Postby Tord Romstad » 27 Jul 2007, 11:00

Pradu wrote:Anyone else had problems like this with the Intel Compiler?

I haven't seen such problems, but here are the compiler flags which work best for my engine (using the Intel Compiler 10.0 for Mac OS X):
Code: Select all
-O2 -fno-exceptions -fomit-frame-pointer -fno-rtti -fstrict-aliasing -mdynamic-no-pic -no-prec-div -ipo -static -xP


-O2 is faster than -O3 for me with the Intel compiler. With GCC, -O3 is faster.

Tord
User avatar
Tord Romstad
 
Posts: 639
Joined: 09 Oct 2004, 12:49
Location: Oslo, Norway

Re: Intel Compiler Help

Postby Gerd Isenberg » 27 Jul 2007, 13:42

Seems the SSE vectorizer likes to use the SSE3 instruction PALIGNR (Packed Align Right), but you don't have the appropriate core 2 duo cpu, which supports this instruction. According to the new AMD64 manuals even K10 does not support PALIGNR. I guess one may adjust the vectorizer to only use SSE2 or the AMD64 subset of SSE3 - but I am not familar with this compiler...

http://en.wikipedia.org/wiki/SSSE3

Gerd
Gerd Isenberg
 
Posts: 285
Joined: 31 Jan 2005, 20:31
Location: Hattingen, Germany

Re: Intel Compiler Help

Postby Pradu » 27 Jul 2007, 14:21

Tord Romstad wrote:I haven't seen such problems, but here are the compiler flags which work best for my engine (using the Intel Compiler 10.0 for Mac OS X):
Code: Select all
-O2 -fno-exceptions -fomit-frame-pointer -fno-rtti -fstrict-aliasing -mdynamic-no-pic -no-prec-div -ipo -static -xP


-O2 is faster than -O3 for me with the Intel compiler. With GCC, -O3 is faster.

Tord
Thanks Tord! It compiles fine with these flags.
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: Intel Compiler Help

Postby Pradu » 27 Jul 2007, 14:24

Gerd Isenberg wrote:Seems the SSE vectorizer likes to use the SSE3 instruction PALIGNR (Packed Align Right), but you don't have the appropriate core 2 duo cpu, which supports this instruction. According to the new AMD64 manuals even K10 does not support PALIGNR. I guess one may adjust the vectorizer to only use SSE2 or the AMD64 subset of SSE3 - but I am not familar with this compiler...

http://en.wikipedia.org/wiki/SSSE3

Gerd
Yes this is true, I'm compiling on a Pentium 4. I think perhaps using -O3 makes Intel use SSE3 instructions because -fast expands out to -xP -O3 -ipo -static. Tord's -O2 flags works perfect for my PC.
User avatar
Pradu
 
Posts: 343
Joined: 12 Jan 2005, 19:17
Location: Chandler, Arizona, USA

Re: Intel Compiler Help

Postby bob » 27 Jul 2007, 17:16

Pradu wrote:
Gerd Isenberg wrote:Seems the SSE vectorizer likes to use the SSE3 instruction PALIGNR (Packed Align Right), but you don't have the appropriate core 2 duo cpu, which supports this instruction. According to the new AMD64 manuals even K10 does not support PALIGNR. I guess one may adjust the vectorizer to only use SSE2 or the AMD64 subset of SSE3 - but I am not familar with this compiler...

http://en.wikipedia.org/wiki/SSSE3

Gerd
Yes this is true, I'm compiling on a Pentium 4. I think perhaps using -O3 makes Intel use SSE3 instructions because -fast expands out to -xP -O3 -ipo -static. Tord's -O2 flags works perfect for my PC.


You probably should look at the options carefully. You can specifically tell the compiler which instruction set architecture to target when producing the output for gas. That will let you target your plain PIV and not get caught up in the above. However, that said, it is even more likely you are running an older linux version. gas should recognize those opcodes just fine, but they ought to fail when you run 'em on a PIV. If gas is barfing, it is old enough to not know about those mnemonics.
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 40 guests