sniper-4.0 problem while running python scripts

317 views
Skip to first unread message

Francesco

unread,
Dec 13, 2012, 5:07:25 PM12/13/12
to snip...@googlegroups.com
Hello,

I am having an error when launching any of the scripts for the new version of SNIPER. I did not get this error with the previous version
It seems there is some conflict when importing 'sim'

here is an example:

$ ./run-sniper -p parsec-dedup  -i test -n 4 -c gainestown -d prova -g perf_model/core/frequency=1.60 -s powertrace
[PARSEC] Benchmarks to run:  dedup

[PARSEC] [========== Running benchmark dedup ==========]
[PARSEC] Setting up run directory.
[PARSEC] Unpacking benchmark input 'test'.
test.dat
[PARSEC] Running '/***********/sniper-4.0/run-sniper -n 4 -m 'localhost' -d '/***********/benchmarks/prova' -c gainestown -g perf_model/core/frequency=1.60 -s powertrace --roi --curdir=/***********/benchmarks  --  /***********/benchmarks/parsec/parsec-2.1/pkgs/kernels/dedup/inst/i686-linux.gcc-sniper/bin/dedup -c -p -f -t 1 -i test.dat -o output.dat.ddp':
[PARSEC] [---------- Beginning of output ----------]
[SNIPER] Start
Running ['bash', '-c', '/***********/sniper-4.0/pin_kit/ia32/bin/pinbin -mt -injection child -xyzzy -enable_vsm 0 -t /***********/sniper-4.0/lib/pin_sim -c /***********/sniper-4.0/config/base.cfg --general/total_cores=4 --general/output_dir=/***********/benchmarks/prova --config=/***********/sniper-4.0/config/nehalem.cfg --config=/***********/sniper-4.0/config/gainestown.cfg --perf_model/core/frequency=1.60 -g --general/magic=true -g --hooks/numscripts=1 -g --hooks/script0name=/***********/sniper-4.0/scripts/powertrace.py -g --hooks/script0args= -- /***********/benchmarks/parsec/parsec-2.1/pkgs/kernels/dedup/inst/i686-linux.gcc-sniper/bin/dedup -c -p -f -t 1 -i test.dat -o output.dat.ddp']
Executing Python script /***********/sniper-4.0/scripts/powertrace.py
Traceback (most recent call last):
  File "/***********/sniper-4.0/scripts/powertrace.py", line 5, in <module>
    import sys, os, sim
  File "/***********/sniper-4.0/scripts/sim/__init__.py", line 9, in <module>
    import os, sqlite3
  File "/home/wheirman/src/exascience/graphite-master/python_kit/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
  File "/home/wheirman/src/exascience/graphite-master/python_kit/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module>
ImportError: No module named _sqlite3
Cannot open Python script /***********/sniper-4.0/scripts/powertrace.py

any suggestion?
Thank you
Francesco

Trevor E. Carlson

unread,
Dec 13, 2012, 5:53:56 PM12/13/12
to snip...@googlegroups.com
Francesco,

It looks like you have an old version of Python for some reason. I just tried a test example, and didn't see that error with the latest version of Sniper. The makefiles normally get the new version automatically. Can you try a 'make distclean' followed by a 'make' to get the latest version of Python?

Trevor

--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en

Francesco

unread,
Dec 13, 2012, 7:03:27 PM12/13/12
to snip...@googlegroups.com
Hi Trevor,

I tried make distclean and then make on SNIPER-4.0.
I still have the same error, anyway distclean gives me this output

$ make distclean
[CLEAN ] logs
[CLEAN ] config
[CLEAN ] deps
[CLEAN ] standalone
[CLEAN ] pin
[CLEAN ] common
[CLEAN ] sift
[CLEAN ] sift/recorder
make: *** //***********/sniper-4.0/doc/manual: No such file or directory.  Stop.
make: *** [manualclean] Error 2
sreda@scalelab:~/workspace/x86simulator/sniper/sniper-4.0$ make
mkdir -p python_kit/ia32
wget -O - --no-verbose "http://snipersim.org/packages/sniper-python27-ia32.tgz" | tar xz --strip-components 1 -C python_kit/ia32

my python is Python 2.7.3.



do you have any other suggestion?

Thanks,
Francesco

Wim Heirman

unread,
Dec 14, 2012, 4:39:21 AM12/14/12
to snip...@googlegroups.com
Hi Francesco,

Looks like the latest 32-bit version of our Python package wasn't
built properly, sorry about that. It should be fixed now, can you do
another make distclean + make?

Thanks,
Wim

Francesco

unread,
Dec 14, 2012, 9:57:31 AM12/14/12
to snip...@googlegroups.com, wim.h...@elis.ugent.be
Hi Wim,

I tried again. I got the same error.

Look forward to hearing from you!

Thanks,
Francesco

Tung Hoang

unread,
Dec 14, 2012, 10:08:46 AM12/14/12
to snip...@googlegroups.com, wim.h...@elis.ugent.be
Fi Francesco,

Look at this link "/home/wheirman/src/exascience/graphite-master/python_kit/lib", I think the problem is in compiling python-kit. Seem that the library link to python-kit library is fixed to Wim's machine therefore running Sniper on user machine has problem. I worked around this issues by looking at python.pc in python-kit library but error is not solved.

I prefer to have pre-compiled python-kit then a update Makefile that support compiling python-kit rather than download post-compiled python-kin from website

B.R
/Tung

Francesco

unread,
Dec 14, 2012, 10:14:28 AM12/14/12
to snip...@googlegroups.com, wim.h...@elis.ugent.be
Hi Tung,

I actually tried right now to remove the python_kit folder and execute make distclean & make again. Now it works!
By the way thank you for your suggestions, I'll keep them in mind!

Best,
Francesco
Reply all
Reply to author
Forward
Message has been deleted
0 new messages