Error compiling Crafty

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

Moderator: Andres Valverde

Error compiling Crafty

Postby Volker Pittlik » 15 Apr 2008, 10:12

Crafty 22.0 compiles well with gcc. Trying to make a profiled version with the intel compiler I got the following error in the second compilation (everything works fine including generating the *.dyn file):

Code: Select all
...
utility.c(1416): (col. 5) remark: LOOP WAS VECTORIZED.
crafty.c: warning #11503: Total routines 185, routines w/o profile info: 66
icc -lstdc++ -o crafty crafty.o egtb.o -lm
crafty.o: In function `DisplayChessBoard.':
crafty.c:(.text+0x15531): undefined reference to `__svml_irem4'
make[2]: *** [crafty] Fehler 1
make[2]: Leaving directory `/home/volker/schach/crafty/22.0/crafty-22.0'
make[1]: *** [crafty-make] Fehler 2
make[1]: Leaving directory `/home/volker/schach/crafty/22.0/crafty-22.0'
make: *** [linux-icc] Fehler 2
volker@vpittlik:~/schach/crafty/22.0/crafty-22.0>


Flash German lesson: Fehler==Error. I have no idea about this "__svml_irem4" stuff. Any hints?

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: Error compiling Crafty

Postby bob » 15 Apr 2008, 23:04

Volker Pittlik wrote:Crafty 22.0 compiles well with gcc. Trying to make a profiled version with the intel compiler I got the following error in the second compilation (everything works fine including generating the *.dyn file):

Code: Select all
...
utility.c(1416): (col. 5) remark: LOOP WAS VECTORIZED.
crafty.c: warning #11503: Total routines 185, routines w/o profile info: 66
icc -lstdc++ -o crafty crafty.o egtb.o -lm
crafty.o: In function `DisplayChessBoard.':
crafty.c:(.text+0x15531): undefined reference to `__svml_irem4'
make[2]: *** [crafty] Fehler 1
make[2]: Leaving directory `/home/volker/schach/crafty/22.0/crafty-22.0'
make[1]: *** [crafty-make] Fehler 2
make[1]: Leaving directory `/home/volker/schach/crafty/22.0/crafty-22.0'
make: *** [linux-icc] Fehler 2
volker@vpittlik:~/schach/crafty/22.0/crafty-22.0>


Flash German lesson: Fehler==Error. I have no idea about this "__svml_irem4" stuff. Any hints?

Volker


No real idea, but 22.1 will be out tonight, and it has a few compiler issues fixed, you might give it a try and see if this still happens...
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59

Re: Error compiling Crafty

Postby Volker Pittlik » 16 Apr 2008, 10:17

bob wrote:...
No real idea, but 22.1 will be out tonight, and it has a few compiler issues fixed, you might give it a try and see if this still happens...


Same error in the new version. However I remember this error. It has to do with the "short vector math library" (svml). It seems to me it is related to math functions not used in a chess programm as sin, cos, log and so on ( see: http://softwarecommunity.intel.com/articles/eng/1795.htm and http://softwarecommunity.intel.com/articles/eng/3527.htm.

Possible our implementation of the intel compiler is different. I changed the make file to almost the standard stuff which can be found in the help files. With these settings:

Code: Select all
linux-icc:
   $(MAKE) target=LINUX \
      CC=icc CXX=icc \
      CFLAGS='$(CFLAGS) -O3 \
         -prof_use -prof_dir ./profdir \
         ' \
      CXFLAGS='$(CFLAGS) -O3 \
         -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 \
         -prof_genx -prof_dir ./profdir' \
      CXFLAGS='$(CFLAGS) -O2 \
         -prof_genx -prof_dir ./profdir' \
      LDFLAGS='$(LDFLAGS) -lstdc++ ' \
      opt='$(opt) -DTEST -DINLINE32 -DCPUS=2' \
      crafty-make


it compiles without problems. The binary made with intel is faster. Bench takes 32.1 secondes here with 1 cpu. A gcc O3 opimized binary uses 58.7 seconds for the same command under otherwise identical conditions.


Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 29 guests