MCPAT problem

656 views
Skip to first unread message

Francesco

unread,
Nov 20, 2012, 12:15:08 PM11/20/12
to snip...@googlegroups.com
Hello,

I am using PARSEC benchmarks and I would like to get power statistic but I have problem running the powertrace script.
Here is an example

./run-sniper -p parsec-blackscholes -i test -n 2 -c gainestown -d dir -s powertrace

/------------------/sniper-3.07/tools/../mcpat/mcpatXeonCore: 1: /------------------/tools/../mcpat/mcpatXeonCore: Syntax error: Unterminated quoted string
Traceback (most recent call last):
  File "/------------------/sniper-3.07/tools/mcpat.py", line 1076, in <module>
    main(jobid = jobid, resultsdir = resultsdir, powertype = powertype, vdd = vdd, config = config, outputfile = outputfile, no_graph = no_graph, partial = partial)
  File "/------------------/sniper-3.07/tools/mcpat.py", line 130, in main
    raise ValueError('No valid McPAT output found')
ValueError: No valid McPAT output found

Any suggestions?

Thank you in advance.
Francesco


Wim Heirman

unread,
Nov 21, 2012, 8:22:07 AM11/21/12
to snip...@googlegroups.com
Hi Francesco,

I can't see anything wrong immediately, your command-line seems to
work fine in my freshly-checked out copy of Sniper 3.07.

Are you able to do a normal simulation (i.e. without the -s
powertrace), and then run sniper/tools/mcpat.py on it?

Did you have GRAPHITE_ROOT and BENCHMARKS_ROOT set up correctly?

Thanks,
Wim
> --
> --
> 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,
Nov 21, 2012, 10:21:09 AM11/21/12
to snip...@googlegroups.com, wim.h...@elis.ugent.be
Hi Wim,

thank you for your reply.

I think my ambient variables are well set up, here they are

$echo $GRAPHITE_ROOT
/.../sniper/sniper-3.07

$ echo $BENCHMARKS_ROOT
/.../sniper/benchmarks

Running without powertrace as follows, the simulation works (the complete output is below)


 ./run-sniper -p parsec-blackscholes -i test -n 2 -c gainestown -d dir

But if I run inside the dir directory mcpac in this way: ../../sniper-3.07/tools/mcpat.py

I have the same error as before

../../sniper-3.07/tools/../mcpat/mcpatXeonCore: 1: ../../sniper-3.07/tools/../mcpat/mcpatXeonCore: Syntax error: Unterminated quoted string

Traceback (most recent call last):
  File "../../sniper-3.07/tools/mcpat.py", line 1076, in <module>

    main(jobid = jobid, resultsdir = resultsdir, powertype = powertype, vdd = vdd, config = config, outputfile = outputfile, no_graph = no_graph, partial = partial)
  File "../../sniper-3.07/tools/mcpat.py", line 130, in main

    raise ValueError('No valid McPAT output found')
ValueError: No valid McPAT output found


The files inside dir are:


ls -l dir/
total 96
-rw-rw-r-- 1 ... ...   320 Nov 21 10:10 app_1.log
-rw-rw-r-- 1 ... ...    11 Nov 21 10:10 debug_offset.out
-rw-rw-r-- 1 ... ...  1954 Nov 21 10:10 graphite.out
-rw-rw-r-- 1 ... ...     0 Nov 21 10:11 power.txt
-rw-rw-r-- 1 ... ... 32930 Nov 21 10:11 power.xml
-rw-rw-r-- 1 ... ...  4759 Nov 21 10:10 sim.cfg
-rw-rw-r-- 1 ... ...  1904 Nov 21 10:10 sim.out
-rw-rw-r-- 1 ... ... 15538 Nov 21 10:10 sim.stats.base
-rw-rw-r-- 1 ... ... 19951 Nov 21 10:10 sim.stats.delta
-rw-rw-r-- 1 ... ...     0 Nov 21 10:10 system-default.log

Maybe power.txt should not be empty!

Do you have any suggestion?

Thanks,
Francesco



-----------
output of ./run-sniper -p parsec-blackscholes -i test -n 2 -c gainestown -d dir

[PARSEC] Benchmarks to run:  blackscholes

[PARSEC] [========== Running benchmark blackscholes ==========]
[PARSEC] Setting up run directory.
[PARSEC] Unpacking benchmark input 'test'.
in_4.txt
[PARSEC] Running '/.../sniper/sniper-3.07/run-sniper -n 2 -m 'localhost' -d '/.../sniper/benchmarks/dir' -c gainestown --roi  --  /.../sniper/benchmarks/parsec/parsec-2.1/pkgs/apps/blackscholes/inst/i686-linux.gcc-sniper/bin/blackscholes 1 in_4.txt prices.txt':
[PARSEC] [---------- Beginning of output ----------]
[SNIPER] Start
Running ['bash', '-c', '/.../sniper/sniper-3.07/pin_kit/ia32/bin/pinbin -mt -injection child -xyzzy -enable_vsm 0 -t /.../sniper/sniper-3.07/lib/pin_sim -c /.../sniper/sniper-3.07/config/base.cfg --general/total_cores=2 --general/output_dir=/.../sniper/benchmarks/dir --config=/.../sniper/sniper-3.07/config/nehalem.cfg --config=/.../sniper/sniper-3.07/config/gainestown.cfg -g --general/magic=true -- /.../sniper/benchmarks/parsec/parsec-2.1/pkgs/apps/blackscholes/inst/i686-linux.gcc-sniper/bin/blackscholes 1 in_4.txt prices.txt']
PARSEC Benchmark Suite Version 2.1
[HOOKS] PARSEC Hooks Version 1.2
Num of Options: 4
Num of Runs: 100
Size of data: 160
[HOOKS] Entering ROI
[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
0          [23070]  [ 1]  [interval_timer.cc   : 180]  *WARNING* Significant fraction of x87 instructions encountered, accuracy will be low. Compile without -mno-sse2 -mno-sse3 to avoid these instructions.
46         [23070]  [ 1]  [interval_timer.cc   : 180]  *WARNING* Future warnings of this type will be suppressed.
[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 0.91 seconds
[SNIPER] Simulated 0.2M instructions @ 176.4 KIPS (88.2 KIPS / target core - 11340.7ns/instr)
[SNIPER] Setting instrumentation mode to FAST_FORWARD
[HOOKS] Leaving ROI
[HOOKS] Total time spent in ROI: 0.000s
[SNIPER] End
[SNIPER] Elapsed time: 6.35 seconds
[PARSEC] [----------    End of output    ----------]
[PARSEC] Done.

Wim Heirman

unread,
Nov 21, 2012, 10:28:45 AM11/21/12
to Francesco, snip...@googlegroups.com
Hi Francesco,

power.txt is empty becaues McPAT failed to run. The actual error is this one: "mcpatXeonCore: Syntax error: Unterminated quoted string" which is very weird, as mcpatXeonCore should be an executable. Can you try running it, without arguments? It should print out some help message. What type of file is it? If something is weird there, can you delete it, then build Sniper again -- this will download a fresh copy from our server.

Regards,
Wim

Wim Heirman

unread,
Nov 21, 2012, 10:30:05 AM11/21/12
to snip...@googlegroups.com
Are you running on a 32-bit system? The McPAT binary we ship is
64-bit, maybe that's what causing this...

-Wim

Francesco

unread,
Nov 21, 2012, 10:36:33 AM11/21/12
to snip...@googlegroups.com, wim.h...@elis.ugent.be
oh yes, my system is an ubuntu 12.04 64 bit

here is what I have

sniper/sniper-3.07/mcpat$ ls -l
total 1256
-rw-r--r-- 1 sreda sreda    8083 Sep 11 10:06 mcpat-vdd.patch
-rwxr-xr-x 1 sreda sreda 1277293 Sep 11 10:11 mcpatXeonCore
..../sniper/sniper-3.07/mcpat$ ./mcpatXeonCore
bash: ./mcpatXeonCore: cannot execute binary file


Should I try using a 32-bit version of McPAT? May You have any suggestion?

Thanks,
Francesco

Francesco

unread,
Nov 21, 2012, 10:37:14 AM11/21/12
to snip...@googlegroups.com, wim.h...@elis.ugent.be
..sorry I meant ubuntu 12.04 32 bit

Francesco

Wim Heirman

unread,
Nov 21, 2012, 11:01:42 AM11/21/12
to snip...@googlegroups.com
Francesco,

I just uploaded a new 32-bit McPAT binary. Just delete
sniper/mcpat/mcpatXeonCore and build Sniper again, and you'll get the
new version.

Regards,
Wim

Francesco

unread,
Nov 21, 2012, 11:12:51 AM11/21/12
to snip...@googlegroups.com, wim.h...@elis.ugent.be
oh thank you very much!

In the meanwhile I downloaded McPAT and built it, then I linked mcpatXeonCore to what I had just compiled.
It seems to work, I got the trace below. Anyway I will download the new sniper, Thank you!

One last question, could the warning below a problem?


[HOOKS] Entering ROI
[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to DETAILED
0          [28943]  [ 1]  [interval_timer.cc   : 180]  *WARNING* Significant fraction of x87 instructions encountered, accuracy will be low. Compile without -mno-sse2 -mno-sse3 to avoid these instructions.
49         [28943]  [ 1]  [interval_timer.cc   : 180]  *WARNING* Future warnings of this type will be suppressed.

[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 0.91 seconds
[SNIPER] Simulated 0.2M instructions @ 176.8 KIPS (88.4 KIPS / target core - 11313.6ns/instr)


                     Power     Energy   Energy %
  core-core         5.86 W     0.00 J     31.71%
  core-ifetch       2.55 W     0.00 J     13.79%
  core-int          0.54 W     0.00 J      2.94%
  core-mem          3.64 W     0.00 J     19.70%
  icache            2.28 W     0.00 J     12.31%
  dcache            2.58 W     0.00 J     13.95%
  l2                0.45 W     0.00 J      2.45%
  dram              0.50 W     0.00 J      2.72%
  other             0.08 W     0.00 J      0.43%



Thanks,
Francesco

Wim Heirman

unread,
Nov 21, 2012, 11:21:11 AM11/21/12
to Francesco, snip...@googlegroups.com
Francesco,

We don't accurately model the latencies from x87-style instructions, since (especially in 64-bit mode, which is our main target) they are rarely used. If you benchmark does use them a lot, the timing predicted by Sniper can be inaccurate (but cache and branch predictor hit rates will be fine).

You can fix this by recompiling your benchmark application without -mno-sse2, then SSE2 instructions (which are properly modeled) should be used instead of x87. Or, you can add the correct instruction latencies to Sniper's performance model. They are specified in the file sniper/common/performance_model/performance_models/core_model/core_model_nehalem.cc -- you can find the correct latencies in the document at [1].

Regards,
Wim

[1] http://agner.org/optimize/instruction_tables.pdf
Reply all
Reply to author
Forward
0 new messages