Compiling and Running Benchmarks (Parsec and Splash) on Ubuntu 18.04

1,991 views
Skip to first unread message

Quintin Fettes

unread,
Jan 4, 2019, 3:57:12 PM1/4/19
to Sniper simulator
I was able to get the benchmarks (only Parsec and Splash) to compile on Ubuntu 18.04; I'll provide instructions below. HOWEVER, a few are broken at runtime and others have some general weirdness that makes me weary of using them. The recent support for newer operating systems in snipersim has been great so far. Will the benchmarks provided at [http://snipersim.org/w/Download_Benchmarks] also be modified to support new operating systems "out of the box?" This would be incredibly useful for the work I'm performing if I could run these benchmarks with confidence that they are working correctly.


Instructions for compiling Parsec and Splash benchmarks on Ubuntu 18.04:
wget http://snipersim.org/packages/sniper-benchmarks.tbz
tar xjf sniper-benchmarks.tbz
cd benchmarks
export SNIPER_ROOT=/path/to/sniper
export BENCHMARKS_ROOT=$(pwd)
  1. Edit benchmarks/MAKEFILE ; This only fixed parsec and splash 2, I did not attempt to fix cpu2006 or npb, and both will fail to compile. comment out the following lines:
    • make -C cpu2006
    • make -C npb
    • make -C local
    • make -C cpu2006 clean
    • make -C npb clean
    • make -C local clean
  2. Edit benchmarks/parsec/parsec-2.1/pkgs/apps/bodytrack/parsec/gcc-sniper.bldconf
    • Add
      • CXXFLAGS="-std=gnu++98 ${CXXFLAGS} ${HOOKS_CXXFLAGS}"
  3. Edit src files in ferret. Replace all instances of HUGE with HUGE_VAL. The files needing modified are listed below
    • benchmarks/parsec/parsec-2.1/pkgs/apps/ferret/src/src/lsh/LSH_query.c
    • benchmarks/parsec/parsec-2.1/pkgs/apps/ferret/src/src/lsh/LSH_query_batch.c
    • benchmarks/parsec/parsec-2.1/pkgs/apps/ferret/src/benchmark/ferret-parallel.c
    • benchmarks/parsec/parsec-2.1/pkgs/apps/ferret/src/benchmark/ferret-serial.c
  4. Edit benchmarks/parsec/parsec-2.1/pkgs/tools/cmake/parsec/gcc-sniper.bldconf
    • Modify line 8 to read (added -std=gnu++98 flag):
      build_env="CC=\"${CC}\" CXXFLAGS=\"-std=gnu++98 ${CXXFLAGS} -fexceptions\" LDFLAGS=\"-L${CC_HOME}/lib64 -L${CC_HOME}/lib -L${PARSECDIR}/pkgs/libs/hooks/inst/${PARSECPLAT}/lib\""
  5. Edit benchmarks/parsec/parsec-2.1/pkgs/apps/x264/parsec/gcc-sniper.bldconf
    •  Add 
      CC="${HOOKS_CC} -no-pie"
  6. RUN MAKE. IT WILL FAIL. WHEN IT GETS TO THE SSL LIBRARY. THE ERROR WILL READ: 
    smime.pod around line 272: Expected text after =item, not a number
    smime.pod around line 276: Expected text after =item, not a number
    smime.pod around line 280: Expected text after =item, not a number
    smime.pod around line 285: Expected text after =item, not a number
    smime.pod around line 289: Expected text after =item, not a number
    • This is the only error I couldn't fix before running make once because the src is not downloaded prior to the first run of make
  7. Edit benchmarks/parsec/parsec-2.1/pkgs/libs/ssl/src/Makefile.org
    • Line 612 is:
      install: all install_docs install_sw
    • change it to:
      install: all install_sw
    • This is a hack I found online. It just prevents the docs from being compiled
  8. Run make again. the benchmarks should now compile correctly
  9. The pin2 branch (to my knowledge) doesn't compile correctly on Ubuntu 18.04. This step is only necessary for the pin3 branch
    • in benchmarks/run-sniper comment out lines 138-140, which are
      • if not os.path.exists(os.path.realpath(os.path.join(graphiterootdir, 'lib', 'pin_sim.so'))):
         
        print '\nERROR: Sniper has not been compiled. Please compile Sniper before trying to run an application.\n'
          sys
        .exit(1)
    • in benchmarks/run-sniper comment out lines 154-156, which are:
      • if not os.path.exists(os.path.realpath(os.path.join(graphiterootdir, 'lib', 'pin_sim.so'))):
         
        print '\nERROR: Sniper has not been compiled. Please compile Sniper before trying to run an application.\n'
          sys
        .exit(1)

I hope this is helpful to other people, and I hope it can get us closer to official support on newer operating systems for these benchmarks!
Message has been deleted

Dan Recher

unread,
Jan 28, 2019, 1:50:44 PM1/28/19
to Sniper simulator
Hi Quintin,

I tried to do as you described,
in step 3 I didn't find directory benchmarks/parsec/parsec-2.1/pkgs/apps/ferret/src/src/lsh/LSH_query.c 
what I am doing wrong?

Thanks,
Dan

Quintin Fettes

unread,
Jan 29, 2019, 3:51:43 PM1/29/19
to Sniper simulator
It could be that I made a mistake in my instructions and you have to run make once so that the files download. Try performing the previous steps then running make one and see if the files appear.

Dan Recher

unread,
Feb 2, 2019, 10:20:21 AM2/2/19
to Sniper simulator
thanks,

I fount the files after make :)

The Turing Project

unread,
Feb 4, 2019, 7:12:53 AM2/4/19
to Sniper simulator
hello i have make that procedure and i have a probleme during the end of compilation, it doesnt find benchmarks/parsec/parsec-2.1/


gcc -I/home/chapoul/sniper-7.1/benchmarks/parsec/parsec-2.1/pkgs/libs/ssl/inst/amd64-linux.gcc-sniper/include -I/home/chapoul/sniper-7.1/benchmarks/parsec/parsec-2.1/pkgs/libs/zlib/inst/amd64-linux.gcc-sniper/include -O3 -funroll-loops -fprefetch-loop-arrays -static-libgcc -Wl,--hash-style=both,--as-needed -DPARSEC_VERSION=2.1 -DENABLE_PARSEC_HOOKS -I/home/chapoul/sniper-7.1/benchmarks/parsec/parsec-2.1/pkgs/libs/hooks/inst/amd64-linux.gcc-sniper/include -I/home/chapoul/sniper-7.1/benchmarks/parsec/tools/hooks -I/include -DENABLE_PARMACS -Wall -std=c99 -fno-strict-aliasing -D_XOPEN_SOURCE=600 -DPARALLEL -pthread -L/home/chapoul/sniper-7.1/benchmarks/parsec/parsec-2.1/pkgs/libs/ssl/inst/amd64-linux.gcc-sniper/lib -L/home/chapoul/sniper-7.1/benchmarks/parsec/parsec-2.1/pkgs/libs/zlib/inst/amd64-linux.gcc-sniper/lib -L/usr/lib64 -L/usr/lib -L/home/chapoul/sniper-7.1/benchmarks/parsec/parsec-2.1/pkgs/libs/hooks/inst/amd64-linux.gcc-sniper/lib -uparmacs_roi_end -uparmacs_roi_start -L/home/chapoul/sniper-7.1/benchmarks/parsec/tools/hooks -lhooks_base -lrt -pthread -o dedup hashtable.o queue.o util.o binheap.o tree.o decoder.o dedup.o rabin.o encoder.o  -lhooks -lcrypto -lz
/usr/bin/ld : ne peut trouver -lhooks_base
collect2: error: ld returned 1 exit status



  1. pkgs/libs/ssl/src/Makefile.org

The Turing Project

unread,
Feb 4, 2019, 8:36:27 AM2/4/19
to Sniper simulator
thanks for the hack ;-)


Le vendredi 4 janvier 2019 21:57:12 UTC+1, Quintin Fettes a écrit :

ahmad sedigh

unread,
Oct 24, 2019, 12:54:35 PM10/24/19
to Sniper simulator
Hi
Can someone take a look to my issue after 3rd step in this post??
https://groups.google.com/d/msg/snipersim/GIV89Lv7omg/tpEF43bECwAJ

ahmad sedigh

unread,
Oct 24, 2019, 8:16:46 PM10/24/19
to Sniper simulator
Hi Quintin,
i recommend -std=gnu++17 or 11 at step 2 and 4. 
Regards

Kleber Kruger

unread,
Sep 6, 2020, 1:27:18 AM9/6/20
to Sniper simulator

Thank you very much!

Jagadeesh Samala

unread,
Sep 8, 2020, 4:01:44 AM9/8/20
to Sniper simulator
I am able to run parsec but facing the following issue while building the SPLASH


Please help me. Also, can anyone provide the information related to all the input parameters required for the simulation.

Zilmarij Iqbal

unread,
Jun 20, 2021, 3:41:29 AM6/20/21
to Sniper simulator
Hi,

I followed the steps till Step5, then did make and encountered the following error (couple of these):

benchmarks/parsec/parsec-2.1/./pkgs/apps/vips/src/libsrcCC/vipsc++.cc:5483:37: error: ISO C++1z does not allow dynamic exception specifications
 VImage VImage::notequal( double c ) throw( VError )


I also tried using gnu++11/17/14, and all showed the same error.
I would really appreciate any help in this regard.



Thanks,
Zilmarij Iqbal
MS(R) Scholar
IIT Delhi


Zilmarij Iqbal

unread,
Jun 20, 2021, 12:58:21 PM6/20/21
to Sniper simulator
I found a solution to this problem. I replaced all the throw( VError ) with noexcept(false) in all the files, at all the locations that popped errors.
The following link has the posts related to this:



Zilmarij Iqbal
MS(R) Scholar
IIT Delh

Seyyed Hossein SeyyedAghaei Rezaei

unread,
Jul 4, 2021, 6:32:56 AM7/4/21
to Sniper simulator
Hi Quintin 
Hope you are doing well.
I followed your instructions but I got the below error.
Any Idea?

BTW, I'm trying to install sniper on Ubuntu 20.04 64bit
Thanks in advance for your help.

make[4]: *** [RTTL/CMakeFiles/test_rtvec.dir/build.make:56: RTTL/CMakeFiles/test_rtvec.dir/test/TestRTVec/TestRTVec.o] Error 1
make[4]: Leaving directory '/home/hossein/Sniper/sniper-latest/sniper-7.4/sniper-benchmarks/benchmarks/parsec/parsec-2.1/pkgs/apps/raytrace/obj/amd64-linux.gcc-sniper'
make[3]: *** [CMakeFiles/Makefile2:224: RTTL/CMakeFiles/test_rtvec.dir/all] Error 2
make[3]: Leaving directory '/home/hossein/Sniper/sniper-latest/sniper-7.4/sniper-benchmarks/benchmarks/parsec/parsec-2.1/pkgs/apps/raytrace/obj/amd64-linux.gcc-sniper'
make[2]: *** [Makefile:114: all] Error 2
make[2]: Leaving directory '/home/hossein/Sniper/sniper-latest/sniper-7.4/sniper-benchmarks/benchmarks/parsec/parsec-2.1/pkgs/apps/raytrace/obj/amd64-linux.gcc-sniper'
[PARSEC] Error: 'env CXXFLAGS=-I/home/hossein/Sniper/sniper-latest/sniper-7.4/sniper-benchmarks/benchmarks/parsec/parsec-2.1/pkgs/libs/mesa/inst/amd64-linux.gcc-sniper/include -std=gnu++98 -O3 -funroll-loops -fprefetch-loop-arrays -fpermissive -fno-exceptions -static-libgcc -Wl,--hash-style=both,--as-needed -DPARSEC_VERSION=2.1 -DENABLE_PARSEC_HOOKS -I/home/hossein/Sniper/sniper-latest/sniper-7.4/sniper-benchmarks/benchmarks/parsec/parsec-2.1/pkgs/libs/hooks/inst/amd64-linux.gcc-sniper/include -I/home/hossein/Sniper/sniper-latest/sniper-7.4/sniper-benchmarks/benchmarks/tools/hooks -I/home/hossein/Sniper/sniper-latest/sniper-7.4/include -fexceptions -fno-strict-aliasing -fno-align-labels -DNDEBUG -D_MM_NO_ALIGN_CHECK LDFLAGS=-L/home/hossein/Sniper/sniper-latest/sniper-7.4/sniper-benchmarks/benchmarks/parsec/parsec-2.1/pkgs/libs/mesa/inst/amd64-linux.gcc-sniper/lib -L/usr/lib64 -L/usr/lib -L/home/hossein/Sniper/sniper-latest/sniper-7.4/sniper-benchmarks/benchmarks/parsec/parsec-2.1/pkgs/libs/hooks/inst/amd64-linux.gcc-sniper/lib -uparmacs_roi_end -uparmacs_roi_start -L/home/hossein/Sniper/sniper-latest/sniper-7.4/sniper-benchmarks/benchmarks/tools/hooks -lhooks_base -lrt -pthread LIBS= -lhooks -lXmu -lX11 -lGL -lGLU -lpthread /usr/bin/make' failed.
make[1]: *** [Makefile:31: parsec-build] Error 1

Jingyao Zhang

unread,
Oct 1, 2021, 2:37:35 PM10/1/21
to Sniper simulator
Hi,

Have you ever solved this problem?
I have encountered the same issue.

Thanks!

Cloud Yao

unread,
Dec 23, 2021, 8:50:31 PM12/23/21
to Sniper simulator
Hi Iqbal,
Which gcc version are you using?

Best,
Jingyao

Cloud Yao

unread,
Dec 23, 2021, 11:35:18 PM12/23/21
to Sniper simulator
I have figured it out by replacing all the throw( VError ) with noexcept(false) in all the files, at all the locations that popped errors.
Thank you very much, Zilmarij!

Reply all
Reply to author
Forward
0 new messages