Skip to content
Nikita Sobolev edited this page Jun 10, 2020 · 11 revisions

Building tools

1) extract tools

$ cd $SPEC/install_archives
$tar -xvf tools-src/tar
$ cp -r tools/src $SPEC/tools

[Done in custom repo] Update TimeDate module to 2.31 for usage in 2020

https://metacpan.org/release/TimeDate

Download link: https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-2.31.tar.gz

2) Set env variables

FORCE_UNSAFE_CONFIGURE=1
BUILDTOOLS_KEEP_GOING=1
MAKEFLAGS=-j4

3) Run buildtools

$ ./buildtools

4)Source shrc

$ . $SPEC/shrc

[Optional]To save tools as prebuilt run:

$ packagetools <name-of-tools>

5) Run install.sh

$ $SPEC/install.sh -d <where_to_install>

How to run prebuilt SPEC

Link to the repo with prebuilt tools and config for ARC: https://gitsnps.internal.synopsys.com/arc_oss/spec_cpu2000/tree/sobolev-spec_cpu2017-custom

1) If you have prebuilt tools in $SPEC/tools/bin, then you can run install.sh script:

./install.sh -d <destination dir>

2) Go to the directory, where you have installed SPEC with a script. and source shrc file

. ./shrc

3) SPEC tools are located in $SPEC/bin/. But specmake has some problems. You can use the usual make instead. Delete specmake and create symlink to system's make

cd $SPEC/bin
rm specmake
ln -s /usr/bin/make specmake

4) SPEC checks sha512sum of tools. Count it for new specmake and replace old sum in $SPEC/TOOLS.sha512 with a new one

sha512sum $SPEC/bin/specmake

5) You should have a config to run SPEC with. One can be found in repo by a link above. Or you can take any default config and edit it. Configs are located in $SPEC/config

6) Run SPEC with appropriate config and tests list You can specify intrate, fprate or list of tests. Here is a command with a list of tests that can be executed successfully now.

runcpu --config=arc.cfg 500.perlbench_r 502.gcc_r 520.omnetpp_r 523.xalancbmk_r 525.x264_r 531.deepsjeng_r 541.leela_r 548.exchange2_r 557.xz_r

runcpu --config=arc.cfg 503.bwaves_r 508.namd_r 510.parest_r 511.povray_r 519.lbm_r 526.blender_r 527.cam4_r 544.nab_r  549.fotonik3d_r 554.roms_r

Troubleshooting

Fixed in repo

  1. Problem in glob.c in make

add this fix in $SPEC/tools/src/make-4.2.1/glob/glob.c: https://stackoverflow.com/questions/51675200/install-older-version-of-gnu-make-in-ubuntu-18-04

  1. Delete these lines from wildcard test in $SPEC/tools/src/make-4.2.1/tests/scripts/functions/wildcard
# TEST #5: wildcard used to verify file existence

touch('xxx.yyy');

run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
              '', "file=xxx.yyy\n");

unlink('xxx.yyy');

run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
              '', "file=\n");

Clone this wiki locally