# ROSE Compiler Framework/SPEC CPU 2006 benchmark
## spec cpu 2006

Assuming the source package is under /usr/casc/overture/ROSE/svn/spec_cpu2006_v1.1

### files and directories

/home/yourAccount/opt/spec_cpu2006/benchspec/CPU2006/400.perlbench Subdirectories
* build data Docs exe run Spec src

### benchmark summary

12+17= 29 benchmarks
12 Integer benchmarks: http://www.spec.org/cpu2006/CINT2006/
* 400.perlbench C Programming Language
** Derived from Perl V5.8.7. The workload includes SpamAssassin, MHonArc (an email indexer), and specdiff (SPEC's tool that checks benchmark outputs).
* 401.bzip2 C Compression
** Julian Seward's bzip2 version 1.0.3, modified to do most work in memory, rather than doing I/O.
* 403.gcc C C Compiler
** Based on gcc Version 3.2, generates code for Opteron.
* 429.mcf C Combinatorial Optimization
** Vehicle scheduling. Uses a network simplex algorithm (which is also used in commercial products) to schedule public transport.
* 445.gobmk C Artificial Intelligence: Go
** Plays the game of Go, a simply described but deeply complex game.
* 456.hmmer C Search Gene Sequence
** Protein sequence analysis using profile hidden Markov models (profile HMMs)
* 458.sjeng C Artificial Intelligence: chess
** A highly-ranked chess program that also plays several chess variants.
* 462.libquantum C Physics / Quantum Computing
** Simulates a quantum computer, running Shor's polynomial-time factorization algorithm.
* 464.h264ref C Video Compression
** A reference implementation of H.264/AVC, encodes a videostream using 2 parameter sets. The H.264/AVC standard is expected to replace MPEG2
* 471.omnetpp C++ Discrete Event Simulation
** Uses the OMNet++ discrete event simulator to model a large Ethernet campus network.
* 473.astar C++ Path-finding Algorithms
** Pathfinding library for 2D maps, including the well known A* algorithm.
* 483.xalancbmk C++ XML Processing
** A modified version of Xalan-C++, which transforms XML documents to other document types.
17 Floating point benchmarks: http://www.spec.org/cpu2006/CFP2006/
* 410.bwaves Fortran Fluid Dynamics Computes 3D transonic transient laminar viscous flow.
* 416.gamess Fortran Quantum Chemistry. Gamess implements a wide range of quantum chemical computations. For the SPEC workload, self-consistent field calculations are performed using the Restricted Hartree Fock method, Restricted open-shell Hartree-Fock, and Multi-Configuration Self-Consistent Field
* 433.milc C Physics / Quantum Chromodynamics A gauge field generating program for lattice gauge theory programs with dynamical quarks.
* 434.zeusmp Fortran Physics / CFD ZEUS-MP is a computational fluid dynamics code developed at the Laboratory for Computational Astrophysics (NCSA, University of Illinois at Urbana-Champaign) for the simulation of astrophysical phenomena.
* 435.gromacs C,
Fortran Biochemistry / Molecular Dynamics Molecular dynamics, i.e. simulate Newtonian equations of motion for hundreds to millions of particles. The test case simulates protein Lysozyme in a solution.
* 436.cactusADM C,
Fortran Physics / General Relativity Solves the Einstein evolution equations using a staggered-leapfrog numerical method
* 437.leslie3d Fortran Fluid Dynamics Computational Fluid Dynamics (CFD) using Large-Eddy Simulations with Linear-Eddy Model in 3D. Uses the MacCormack Predictor-Corrector time integration scheme.
* 444.namd C++ Biology / Molecular Dynamics Simulates large biomolecular systems. The test case has 92,224 atoms of apolipoprotein A-I.
* 447.dealII C++ Finite Element Analysis deal.II is a C++ program library targeted at adaptive finite elements and error estimation. The testcase solves a Helmholtz-type equation with non-constant coefficients.
* 450.soplex C++ Linear Programming, Optimization Solves a linear program using a simplex algorithm and sparse linear algebra. Test cases include railroad planning and military airlift models.
* 453.povray C++ Image Ray-tracing Image rendering. The testcase is a 1280x1024 anti-aliased image of a landscape with some abstract objects with textures using a Perlin noise function.
* 454.calculix C,
Fortran Structural Mechanics Finite element code for linear and nonlinear 3D structural applications. Uses the SPOOLES solver library.
* 459.GemsFDTD Fortran Computational Electromagnetics Solves the Maxwell equations in 3D using the finite-difference time-domain (FDTD) method.
* 465.tonto Fortran Quantum Chemistry An open source quantum chemistry package, using an object-oriented design in Fortran 95. The test case places a constraint on a molecular Hartree-Fock wavefunction calculation to better match experimental X-ray diffraction data.
* 470.lbm C Fluid Dynamics Implements the "Lattice-Boltzmann Method" to simulate incompressible fluids in 3D
* 481.wrf C,
Fortran Weather Weather modeling from scales of meters to thousands of kilometers. The test case is from a 30km area over 2 days.
* 482.sphinx3 C Speech recognition A widely-known speech recognition system from Carnegie Mellon University

### language summary

C : 14 benchmarks/ 12 real ones excluding specrand
C++: 7 benchmarks : namd dealII soplex povray omnetpp astar xalancbmk
Fortran: 6 benchmarks: bwaves gamess zeusmp leslie3d GemsFDTD tonto
Mixed C and Fortran: 4: gromacs cactusADM calculix wrf

### configuration

* enviornment Source the shrc or cshrc in /home/youAccount/opt/spec_cpu2006 to set up your environment for the benchmark.
* configuration prepare config/tux268-gcc42.cfg set compilers and flags based on existing examples there
Table summary
* output_format = asc, pdf, Screen, html

### use

http://www.spec.org/cpu2006/Docs/runspec.html#section3.1actions
* build only:
clean up first
* runspec --config=rose-linux64-gcc41 --tune=base --size=test --iterations=1 --noreportable --action=clobber all
* Run with test data set default is --size=ref : run with reference data set
* run all integer or fp benchmarks 12 total integer
test gcc/g++/gfortran first then build only

### cleanup/clobber

clean up: --action=clean or clobber then identityTranslator
runspec --config=tux268-rose-gcc42.cfg --tune=base --size=test --iterations=1 --noreportable gobmk

### data set

Reportable runs ensure that your binaries can produce correct results with the test and train workloads (this run rule requirement is new as of CPU2006 V1.0) and then run the ref workload 3 times for the actual measurements.
runspec --config=tux268-rose-gcc42.cfg --tune=base --size=ref --iterations=1 --noreportable perlbench
data sizes
* test: smallest data set
* train: test the ability to run more than one size in a single invocation
* ref (default): run 3 times for reportable results

### modified source run

Changed /home/yourAccount/opt/spec_cpu2006/benchspec/CPU2006/400.perlbench/src/spec_config.h
to have #include <stdbool.h>
Have to add a line in the config file (eg. config/tux268-rose-gcc42.cfg) to avoid corrupted source warning

### debug

pwd
/home/yourAccount/opt/spec_cpu2006/benchspec/CPU2006/400.perlbench/src

### results verification

/home/yourAccount/opt/spec_cpu2006/benchspec/CPU2006/401.bzip2/run/run_base_test_i386-m32-gcc42-nn.0001
* .mis

## run manually

each benchmark has a command line file:
sphinx_livepretend_base.amd64-m64-gcc41-nn ctlfile . args.an4
403.gcc ~/opt/spec_cpu2006/benchspec/CPU2006/403.gcc/run/run_base_test_amd64-m64-gcc41-nn.0000]

## ROSE identityTranslator
### formal text

We use ROSE's identityTranslator. Like any other ROSE-based translators, it is designed to automatically detect input source file types and invoke the right EDG capability.
We do test ROSE on a subset of SPEC CPU2006 as part of our daily regression test. ROSE can fully support 10 out 12 spec C benchmarks (compiling them and having verified execution results). The 10 C benchmars are perlbench, bzip2, mcf, milc, gobmk, hmmer, sjeng, libquantum, lbm, and sphinx3. gcc and h264ref have some minor issues (mostly related to ROSE's handling of macro calls) but we are working on this.
The way we compile SPEC using ROSE is: 1) install (via make install) ROSE to a directory, like ROSE_INS (specified via configure --prefix=ROSE_INS).
2) set up the environment for using the installed ROSE, identityTranslator is located under ROSE_INS/bin PATH=$ROSE_INS/bin:$PATH LD_LIBRARY_PATH=$ROSE_INS/lib:$LD_LIBRARY_PATH export PATH LD_LIBRARY_PATH
3) preparing an SPEC configuration file (e.g. spec_installation_path/config/rose.cfg) to use ROSE A set of relevant options in rose.cfg are:
4) finally you can test ROSE on spec

### 12 C benchmarks

10/12 passed now
Passing set: runspec --config=tux268-rose-gcc42.cfg --tune=base --size=test --iterations=1 --noreportable perlbench bzip2 mcf milc gobmk hmmer sjeng libquantum lbm sphinx3
runspec --config=tux268-rose-gcc42.cfg --tune=base --size=test --iterations=1 --noreportable sphinx3

### 7 C++ benchmarks

runspec --config=tux268-rose-gcc42.cfg --tune=base --size=test --iterations=1 --noreportable namd dealII soplex povray omnetpp astar xalancbmk

## References

* Henning, J.L., SPEC CPU2000 Measuring CPU Performance in the New Millennium, 2000
* http://www.spec.org/cpu2006/