SPEC 2006: Why won't it compile/run?
Introduction
SPEC 2006 is still commonly used as a benchmark suite, but some versions of gcc do not correctly compile all benchmarks. This is sometimes obvious, such as when you see compile errors or the compiler itself crashes. Sometimes it is less obvious, especially when running only parts of the executable in a simulator. For example, some versions of gcc compile a perlbench executable that looks fine, but when run simply allocates more and more memory until it gets an out-of-memory error. This can go unnoticed when executing in gem5, giving you weird results.
This guide is to help me remember what combinations of compiler, portability, and optimization flags I have had success with. Perhaps it will be useful to others as well. Note that adding or changing any compile flags, no matter how harmless they appear, should be followed by running the suite natively to ensure that all benchmarks still compile and produce correct output.
Also, here's a link to a page with solutions to some common problems -- it's very helpful.
Using gcc-4.7.4
This is the latest of the 4.7 versions installed on our department machines. The default compiler one these machines is 4.4.7; see below for those configurations. For a few benchmarks I do not have a working configuration in 4.7.4 and instead use 4.4.7. Paths are for where things are installed on CSL machines.
General flags:
CC = /s/gcc-4.7.4/bin/gcc
CXX = /s/gcc-4.7.4/bin/g++
FC = /s/gcc-4.7.4/bin/gfortran
Exceptions:
Several benchmarks do not work with these flags. You can give additional/alternate options for them in your config file.
Working configurations by benchmark
This is not scientific or exhaustive, but here are some configurations that seem to work for each benchmark, as well as some known bad ones.
400.perlbench
gcc | O | portability | results |
4.7.3 | -O2 | -DSPEC_CPU_LINUX_X64 | works |
401.bzip2
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | works |
403.gcc
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | works |
4.9.2 | -O2 | -DSPEC_CPU_LP64 | works |
410.bwaves
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | works |
416.gamess
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | works |
429.mcf
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | works |
4.9.2 | -O2 | -DSPEC_CPU_LP64 | works |
433.milc
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
434.zeusmp
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | works |
435.gromacs
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | works |
436.cactusADM
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
437.leslie3d
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | works |
444.namd
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
445.gobmk
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
447.dealII
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | error: 'atof' is not a member of 'std' |
4.4.7 | -O2 | -include cstdlib -include cstring | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | error: 'ptrdiff_t' does not name a type etc. |
4.7.3 | -O2 | -include cstdlib -include cstring | works etc. |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | error: 'ptrdiff_t' does not name a type etc. |
4.8.4 | -O2 | -include cstdlib -include cstring | error: 'ptrdiff_t' does not name a type etc. |
4.8.4 | -O2 | -include cstdlib -include cstring -include cstddef | works |
4.9.2 | -O2 | -DSPEC_CPU_LP64 | error: 'ptrdiff_t' does not name a type etc. |
4.9.2 | -O2 | -include cstdlib -include cstring | error: 'ptrdiff_t' does not name a type etc. |
4.9.2 | -O2 | -include cstdlib -include cstring -include cstddef | works |
450.soplex
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
4.8.4 | -O2 | -DSPEC_CPU_LP64 | works |
453.povray
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
454.calculix
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
456.hmmer
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
458.sjeng
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
459.GemsFDTD
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LP64 | works |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
462.libquantum
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LINUX | works |
4.7.3 | -O2 | -DSPEC_CPU_LINUX | works |
464.h264ref
gcc | O | portability | results |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
465.tonto
gcc | O | portability | results |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
470.lbm
gcc | O | portability | results |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
471.omnetpp
gcc | O | portability | results |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
473.astar
gcc | O | portability | results |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
481.wrf
gcc | O | portability | results |
4.7.3 | -O2 | -DSPEC_CPU_CASE_FLAG -DSPEC_CPU_LINUX; wrf_data_header_size = 8 | Runtime: At line 6744 of file module_ra_rrtm.fppized.f90 (unit = 10, file = 'RRTM_DATA') |
4.7.3 | -O2 | -DSPEC_CPU_CASE_FLAG -DSPEC_CPU_LINUX | works |
482.sphinx3
gcc | O | portability | results |
4.7.3 | -O2 | -DSPEC_CPU_LP64 | works |
483.xalancbmk
gcc | O | portability | results |
4.4.7 | -O2 | -DSPEC_CPU_LINUX | error: 'memset' was not declared in this scope |
4.4.7 | -O2 | -DSPEC_CPU_LINUX -include cstdlib -include cstring | works |
4.7.3 | -O2 | -DSPEC_CPU_LINUX | error: 'memset' was not declared in this scope |
4.7.3 | -O2 | -DSPEC_CPU_LINUX -include cstdlib -include cstring | works |
4.8.4 | -O2 | -DSPEC_CPU_LINUX | error: 'memset' was not declared in this scope |
4.8.4 | -O2 | -DSPEC_CPU_LINUX -include cstdlib -include cstring | works |
4.9.2 | -O2 | -DSPEC_CPU_LINUX | error: 'memset' was not declared in this scope |
4.9.2 | -O2 | -DSPEC_CPU_LINUX -include cstdlib -include cstring | works |
Please send any corrections or questions to lena@cs. Last updated 29 March 2015.