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

gccOportabilityresults
4.7.3-O2-DSPEC_CPU_LINUX_X64works

401.bzip2
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
4.8.4-O2-DSPEC_CPU_LP64works
403.gcc
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
4.8.4-O2-DSPEC_CPU_LP64works
4.9.2-O2-DSPEC_CPU_LP64works
410.bwaves
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
4.8.4-O2-DSPEC_CPU_LP64works
416.gamess
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
4.8.4-O2-DSPEC_CPU_LP64works
429.mcf
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
4.8.4-O2-DSPEC_CPU_LP64works
4.9.2-O2-DSPEC_CPU_LP64works
433.milc
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
434.zeusmp
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
4.8.4-O2-DSPEC_CPU_LP64works
435.gromacs
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
4.8.4-O2-DSPEC_CPU_LP64works
436.cactusADM
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
437.leslie3d
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
4.8.4-O2-DSPEC_CPU_LP64works
444.namd
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
445.gobmk
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
447.dealII
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64error: 'atof' is not a member of 'std'
4.4.7-O2-include cstdlib -include cstringworks
4.7.3-O2-DSPEC_CPU_LP64error: 'ptrdiff_t' does not name a type etc.
4.7.3-O2-include cstdlib -include cstringworks etc.
4.8.4-O2-DSPEC_CPU_LP64error: 'ptrdiff_t' does not name a type etc.
4.8.4-O2-include cstdlib -include cstringerror: 'ptrdiff_t' does not name a type etc.
4.8.4-O2-include cstdlib -include cstring -include cstddefworks
4.9.2-O2-DSPEC_CPU_LP64error: 'ptrdiff_t' does not name a type etc.
4.9.2-O2-include cstdlib -include cstringerror: 'ptrdiff_t' does not name a type etc.
4.9.2-O2-include cstdlib -include cstring -include cstddefworks
450.soplex
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
4.8.4-O2-DSPEC_CPU_LP64works
453.povray
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
454.calculix
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
456.hmmer
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
458.sjeng
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
459.GemsFDTD
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LP64works
4.7.3-O2-DSPEC_CPU_LP64works
462.libquantum
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LINUXworks
4.7.3-O2-DSPEC_CPU_LINUXworks
464.h264ref
gccOportabilityresults
4.7.3-O2-DSPEC_CPU_LP64works
465.tonto
gccOportabilityresults
4.7.3-O2-DSPEC_CPU_LP64works
470.lbm
gccOportabilityresults
4.7.3-O2-DSPEC_CPU_LP64works
471.omnetpp
gccOportabilityresults
4.7.3-O2-DSPEC_CPU_LP64works
473.astar
gccOportabilityresults
4.7.3-O2-DSPEC_CPU_LP64works
481.wrf
gccOportabilityresults
4.7.3-O2-DSPEC_CPU_CASE_FLAG -DSPEC_CPU_LINUX; wrf_data_header_size = 8Runtime: 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_LINUXworks
482.sphinx3
gccOportabilityresults
4.7.3-O2-DSPEC_CPU_LP64works
483.xalancbmk
gccOportabilityresults
4.4.7-O2-DSPEC_CPU_LINUXerror: 'memset' was not declared in this scope
4.4.7-O2-DSPEC_CPU_LINUX -include cstdlib -include cstringworks
4.7.3-O2-DSPEC_CPU_LINUXerror: 'memset' was not declared in this scope
4.7.3-O2-DSPEC_CPU_LINUX -include cstdlib -include cstringworks
4.8.4-O2-DSPEC_CPU_LINUXerror: 'memset' was not declared in this scope
4.8.4-O2-DSPEC_CPU_LINUX -include cstdlib -include cstringworks
4.9.2-O2-DSPEC_CPU_LINUXerror: 'memset' was not declared in this scope
4.9.2-O2-DSPEC_CPU_LINUX -include cstdlib -include cstringworks

Please send any corrections or questions to lena@cs. Last updated 29 March 2015.