Error in building 400.perlbench_ riscv64-unknown-linux-gnu compilers_ & running spec in riscv-gem5

917 views
Skip to first unread message

Artemis Mohseni

unread,
Jul 12, 2017, 6:49:26 AM7/12/17
to RISC-V SW Dev
Dear Sir/Madam,

I am a PhD student and I am beginner in using RISCV_Gem5 and SPEC cpu2006 benchmark. I followed all the tutorial of gem5 web pages and also spec bechmark, but I did not find any useful and clear user-guide about running SPEC CPU2006 Benchmarks in the RISVC_gem5 simulator.

I have 2 problems in spec and gem5 as follow.

1. the first one is that I made a copy of Example-linux64-amd64-gcc43+.cfg of spec and modified it according the tutorials. I use a riscv64-unknown-linux-gnu compilers(gcc, g++ and gfortran).

CC                 = /home/ubuntu/riscv/bin/riscv64-unknown-linux-gnu-gcc
CXX                = /home/ubuntu/riscv/bin/riscv64-unknown-linux-gnu-g++
FC                 = /home/ubuntu/riscv/bin/riscv64-unknown-linux-gnu-gfortran
default=base=default=default:
COPTIMIZE   = -O2 -static
CXXOPTIMIZE = -O2 -static
FOPTIMIZE   = -O2 -static


After doing this work I ran the following command in order to build the perlbench benchmark, but there is an error which is just related to this benchmark, because I build all the benchmark and just this benchmark had an error which yu can see this:

runspec --config my-riscv1.cfg --action build perlbench


Error with make 'specmake build': check file '/home/ubuntu/cpu2006/benchspec/CPU2006/400.perlbench/build/build_base_gcc41-64bit.0000/make.err'
Command returned exit code 2
Error with make!
*** Error building 400.perlbench


2. The second error is related to
running SPEC CPU2006 Benchmarks in the RISVC_gem5 simulator. I have the binary and config files of bzip2 benchmark, but I do not exaclty how can I use it in RISVC_gem5. I saw the following link, the commands are not clear.
https://markgottscho.wordpress.com/2014/09/20/tutorial-easily-running-spec-cpu2006-benchmarks-in-the-gem5-simulator/


It will be perfect if you guide me in these areas.
Sincerely,
Artemis


Andrew Waterman

unread,
Jul 12, 2017, 2:06:57 PM7/12/17
to Artemis Mohseni, RISC-V SW Dev
There is probably a more interesting error message inside of make.err.

It's a shot in the dark, but you might need -std=gnu89 in COPTIMIZE
and -std=gnu++98 in CXXOPTIMIZE. The defaults changed in GCC versions
5 and 6, which broke some old code, including some of the SPEC
benchmarks.

>
> 2. The second error is related to running SPEC CPU2006 Benchmarks in the
> RISVC_gem5 simulator. I have the binary and config files of bzip2 benchmark,
> but I do not exaclty how can I use it in RISVC_gem5. I saw the following
> link, the commands are not clear.
> https://markgottscho.wordpress.com/2014/09/20/tutorial-easily-running-spec-cpu2006-benchmarks-in-the-gem5-simulator/
>
>
> It will be perfect if you guide me in these areas.
> Sincerely,
> Artemis
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "RISC-V SW Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sw-dev+un...@groups.riscv.org.
> To post to this group, send email to sw-...@groups.riscv.org.
> Visit this group at
> https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
> To view this discussion on the web visit
> https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/5a6040e2-7655-437c-afa7-1976aee29638%40groups.riscv.org.

Christopher Celio

unread,
Jul 12, 2017, 2:22:02 PM7/12/17
to Andrew Waterman, Artemis Mohseni, RISC-V SW Dev
Yup, gnu89 is needed for 400.perlbench. 

Here is my RISC-V configure file I use for SPEC (although the text segment stuff is superfluous and the strict aliasing stuff I think only hurts performance and isn't actually needed):


Sorry I can't help you with gem5 though.

-Chris

--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.

To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.

Artemis Mohseni

unread,
Jul 14, 2017, 6:34:41 AM7/14/17
to RISC-V SW Dev, and...@sifive.com, artemis...@gmail.com
Dear Chris,

Thank you so much for your help. I used the riscv config file which you sent me a link of that, but after running the config file, there are a few errors related to building some benchmarks as follow. Who should I do in order to solve the problem?

ubuntu@ubuntu-VirtualBox:~$ runspec -c riscv.cfg --action=build --tune=base all
runspec v6674 - Copyright 1999-2011 Standard Performance Evaluation Corporation
Using 'linux-suse10-amd64' tools
Reading MANIFEST... 22481 files
Loading runspec modules................
Locating benchmarks...found 31 benchmarks in 6 benchsets.
Reading config file '/home/ubuntu/cpu2006/config/riscv.cfg'
Running "specperl /home/ubuntu/cpu2006/Docs/sysinfo" to gather system information.
Loading "http://www.spec.org/auto/cpu2006/current_version" for version check: OK
Benchmarks selected: 400.perlbench, 401.bzip2, 403.gcc, 429.mcf, 445.gobmk, 456.hmmer, 458.sjeng, 462.libquantum, 464.h264ref, 471.omnetpp, 473.astar, 483.xalancbmk, 999.specrand, 410.bwaves, 416.gamess, 433.milc, 434.zeusmp, 435.gromacs, 436.cactusADM, 437.leslie3d, 444.namd, 447.dealII, 450.soplex, 453.povray, 454.calculix, 459.GemsFDTD, 465.tonto, 470.lbm, 481.wrf, 482.sphinx3, 998.specrand
Compiling Binaries
  Building 400.perlbench base riscv default: (build_base_riscv.0000)
  Up to date 401.bzip2 base riscv default
  Building 403.gcc base riscv default: (build_base_riscv.0000)
  Building 429.mcf base riscv default: (build_base_riscv.0000)
  Building 445.gobmk base riscv default: (build_base_riscv.0000)
  Building 456.hmmer base riscv default: (build_base_riscv.0000)
  Building 458.sjeng base riscv default: (build_base_riscv.0000)
  Building 462.libquantum base riscv default: (build_base_riscv.0000)
  Building 464.h264ref base riscv default: (build_base_riscv.0000)
  Building 471.omnetpp base riscv default: (build_base_riscv.0000)
  Building 473.astar base riscv default: (build_base_riscv.0000)
  Building 483.xalancbmk base riscv default: (build_base_riscv.0000)
  Building 999.specrand base riscv default: (build_base_riscv.0000)
  Building 410.bwaves base riscv default: (build_base_riscv.0000)
  Building 416.gamess base riscv default: (build_base_riscv.0000)
  Building 433.milc base riscv default: (build_base_riscv.0000)
  Building 434.zeusmp base riscv default: (build_base_riscv.0000)
  Building 435.gromacs base riscv default: (build_base_riscv.0000)
  Building 436.cactusADM base riscv default: (build_base_riscv.0000)
  Building 437.leslie3d base riscv default: (build_base_riscv.0000)
  Building 444.namd base riscv default: (build_base_riscv.0000)
  Building 447.dealII base riscv default: (build_base_riscv.0000)
Error with make 'specmake build': check file '/home/ubuntu/cpu2006/benchspec/CPU2006/447.dealII/build/build_base_riscv.0000/make.err'

  Command returned exit code 2
  Error with make!
*** Error building 447.dealII
  Building 450.soplex base riscv default: (build_base_riscv.0000)
Error with make 'specmake build': check file '/home/ubuntu/cpu2006/benchspec/CPU2006/450.soplex/build/build_base_riscv.0000/make.err'

  Command returned exit code 2
  Error with make!
*** Error building 450.soplex
  Building 453.povray base riscv default: (build_base_riscv.0000)
  Building 454.calculix base riscv default: (build_base_riscv.0000)
  Building 459.GemsFDTD base riscv default: (build_base_riscv.0000)
  Building 465.tonto base riscv default: (build_base_riscv.0000)
  Building 470.lbm base riscv default: (build_base_riscv.0000)
  Building 481.wrf base riscv default: (build_base_riscv.0000)

Sincerely,
Artemis



On Wednesday, July 12, 2017 at 8:22:02 PM UTC+2, celio wrote:
Yup, gnu89 is needed for 400.perlbench. 

Here is my RISC-V configure file I use for SPEC (alth#------addedough the text segment stuff is superfluous and the strict aliasing stuff I think only hurts performance and isn't actually needed):

> To post to this group, send email to sw-...@groups.riscv.org.
> Visit this group at
> https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
> To view this discussion on the web visit
> https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/5a6040e2-7655-437c-afa7-1976aee29638%40groups.riscv.org.

--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.

To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.

Artemis Mohseni

unread,
Jul 14, 2017, 6:44:51 AM7/14/17
to RISC-V SW Dev, and...@sifive.com, artemis...@gmail.com
Dears,

There is a list of executable files which are there in the directory of 
cpu2006/benchspec/CPU2006/ but as you can see, I did not have the 450.soplex and 447.dealII benchmarks. Should I change some lines in config file to have this binary files?

ubuntu@ubuntu-VirtualBox:~/cpu2006/benchspec/CPU2006$ ls */exe/*
400.perlbench/exe/perlbench_base.riscv
401.bzip2/exe/bzip2_base.gcc41-64bit
401.bzip2/exe/bzip2_base.riscv
403.gcc/exe/gcc_base.gcc41-64bit
403.gcc/exe/gcc_base.riscv
410.bwaves/exe/bwaves_base.gcc41-64bit
410.bwaves/exe/bwaves_base.riscv
416.gamess/exe/gamess_base.gcc41-64bit
416.gamess/exe/gamess_base.riscv
429.mcf/exe/mcf_base.gcc41-64bit
429.mcf/exe/mcf_base.riscv
433.milc/exe/milc_base.gcc41-64bit
433.milc/exe/milc_base.riscv
434.zeusmp/exe/zeusmp_base.gcc41-64bit
434.zeusmp/exe/zeusmp_base.riscv
435.gromacs/exe/gromacs_base.gcc41-64bit
435.gromacs/exe/gromacs_base.riscv
436.cactusADM/exe/cactusADM_base.gcc41-64bit
436.cactusADM/exe/cactusADM_base.riscv
437.leslie3d/exe/leslie3d_base.gcc41-64bit
437.leslie3d/exe/leslie3d_base.riscv
444.namd/exe/namd_base.gcc41-64bit
444.namd/exe/namd_base.riscv
445.gobmk/exe/gobmk_base.gcc41-64bit
445.gobmk/exe/gobmk_base.riscv
453.povray/exe/povray_base.gcc41-64bit
453.povray/exe/povray_base.riscv
454.calculix/exe/calculix_base.gcc41-64bit
454.calculix/exe/calculix_base.riscv
456.hmmer/exe/hmmer_base.gcc41-64bit
456.hmmer/exe/hmmer_base.riscv
458.sjeng/exe/sjeng_base.gcc41-64bit
458.sjeng/exe/sjeng_base.riscv
459.GemsFDTD/exe/GemsFDTD_base.gcc41-64bit
459.GemsFDTD/exe/GemsFDTD_base.riscv
462.libquantum/exe/libquantum_base.gcc41-64bit
462.libquantum/exe/libquantum_base.riscv
464.h264ref/exe/h264ref_base.gcc41-64bit
464.h264ref/exe/h264ref_base.riscv
465.tonto/exe/tonto_base.gcc41-64bit
465.tonto/exe/tonto_base.riscv
470.lbm/exe/lbm_base.gcc41-64bit
470.lbm/exe/lbm_base.riscv
471.omnetpp/exe/omnetpp_base.gcc41-64bit
471.omnetpp/exe/omnetpp_base.riscv
473.astar/exe/astar_base.gcc41-64bit
473.astar/exe/astar_base.riscv
481.wrf/exe/wrf_base.gcc41-64bit
481.wrf/exe/wrf_base.riscv
482.sphinx3/exe/sphinx_livepretend_base.gcc41-64bit
482.sphinx3/exe/sphinx_livepretend_base.riscv
483.xalancbmk/exe/Xalan_base.gcc41-64bit
483.xalancbmk/exe/Xalan_base.riscv
998.specrand/exe/specrand_base.gcc41-64bit
998.specrand/exe/specrand_base.riscv
999.specrand/exe/specrand_base.gcc41-64bit
999.specrand/exe/specrand_base.riscv
ubuntu@ubuntu-VirtualBox:~/cpu2006/benchspec/CPU2006$


Thanks in advance,

Artemis


On Wednesday, July 12, 2017 at 8:22:02 PM UTC+2, celio wrote:

> To post to this group, send email to sw-...@groups.riscv.org.
> Visit this group at
> https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
> To view this discussion on the web visit
> https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/5a6040e2-7655-437c-afa7-1976aee29638%40groups.riscv.org.

--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.

To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
Reply all
Reply to author
Forward
0 new messages