[Radiance-general] Compile error on AMD running Fedora 4
Ian Tester
ian at testers.homelinux.net
Mon Jun 27 17:46:39 CEST 2005
iebele wrote:
> Current rmake command is:
> #!/bin/sh
> exec make "SPECIAL=" \
> "OPT=-m64 -O3 -mfpmath=sse -DSPEED=200" \
> "MACH=-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib
> -I/usr/include/X11 -DNOSTEREO" \
> ARCH=IBMPC "COMPAT=bmalloc.o erf.o getpagesize.o" \
> INSTDIR=/usr/local/bin \
> LIBDIR=/usr/local/lib/ray \
> ESUFFIX= \
> CC=gcc "$@" -f Rmakefile
What version of gcc is installed on your system?
Check using gcc -v
Looking at the man page for gcc-3.4 on my Debian (Athlon XP) system, I'd
suggest the following settings:
-march=k8 to enable the AMD64 instructions, implies the same
argument to -mtune.
-msse2 to enable SSE2 instructions. Without this, the -mfpmath=sse
option is useless.
-mfpmath=sse,387 this will give you a boost if the SSE unit is separate
from the old x87 unit but I don't know enough about the K8
architecture to know if it does. It will try to use both
execution units, but the man page says it still
experimental.
-ffast-math the man page says this is dangerous but I've never noticed
any problems myself. Try it if you want.
Apart from that, wait for upcoming GCC-4.x releases to flesh out its
optimisation features, in particular auto vectorization. The SSE2
instruction set can handle double precision FP math, better than the single
precision in SSE or Altivec. You should theoretically be able to get some
pretty awesome performance out of that processor. Reality is another matter
though... :(
My other suggestion would be to check out some Gentoo web sites. Those guys
are nuts about compiler optimisations :P
bye
More information about the Radiance-general
mailing list