Community
cancel
Showing results for 
Search instead for 
Did you mean: 
lionnel_c_
Beginner
127 Views

report hotspots using command line : UnicodeDecodeError: 'ascii' codec can't decode byte

Hi

I need to generate a report with CPU metric for each line of the source code using the CLI version of Vtune.

It's OK using the GUI version (right click in the Top Down view, Export to CSV), but no luck with CLI

amplxe-cl -report hotspots -source-object function=MyFunc -source-search-dir <path-to-src> -result-dir <path-to-report-dir> -search-dir <path-to-bin>

that leads to:

amplxe: Executing actions 75 % Generating a report
[snip line of code]
exception 'ascii' codec can't decode byte 0xc3 in position 453: ordinal not in range(128)
Traceback (most recent call last):
  File "/builds/patbbinn/b/INNLphep2l4r/b/b/tmpaFKEYq/build/build_release_posix-x86_64_icl_15.0.3_gnutools_4.9_binutils_2.22/reporter.python/src/python/tmp0uURQm/wrapper.py", line 72, in run
  File "/opt/intel/vtune_amplifier_xe_2016.1.1.434111/config/report/hotspots.tmpl", line 10, in <module>
    report.make_report(environment, column_bys, column_order_sort=[common.order_by_event(), common.order_grouping_data_info])
  File "/builds/patbbinn/b/INNLphep2l4r/b/b/tmpaFKEYq/build/build_release_posix-x86_64_icl_15.0.3_gnutools_4.9_binutils_2.22/perfconfigs/templates/common/tmpt6uOrw/common_report.py", line 139, in make_report
  File "/builds/patbbinn/b/INNLphep2l4r/b/b/tmpaFKEYq/build/build_release_posix-x86_64_icl_15.0.3_gnutools_4.9_binutils_2.22/perfconfigs/templates/common/tmpt6uOrw/common_report.py", line 76, in dump_report
  File "/builds/patbbinn/b/INNLphep2l4r/b/b/tmpaFKEYq/build/build_release_posix-x86_64_icl_15.0.3_gnutools_4.9_binutils_2.22/dpihelpers.python/python/python/tmpj86tOz/table_formatter.py", line 148, in format_table
  File "/builds/patbbinn/b/INNLphep2l4r/b/b/tmpaFKEYq/build/build_release_posix-x86_64_icl_15.0.3_gnutools_4.9_binutils_2.22/dpihelpers.python/python/python/tmpj86tOz/table_formatter.py", line 252, in _print_table
  File "/builds/patbbinn/b/INNLphep2l4r/b/b/tmpaFKEYq/build/build_release_posix-x86_64_icl_15.0.3_gnutools_4.9_binutils_2.22/dpihelpers.python/python/python/tmpj86tOz/table_formatter.py", line 421, in _grid_data_line
  File "/builds/patbbinn/b/INNLphep2l4r/b/b/tmpaFKEYq/build/build_release_posix-x86_64_icl_15.0.3_gnutools_4.9_binutils_2.22/dpihelpers.python/python/python/tmpj86tOz/output.py", line 48, in write
  File "build/build_release_posix-x86_64_icl_15.0.3_gnutools_4.9_binutils_2.22/python.core/sitelib/codecs.py", line 303, in write
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 453: ordinal not in range(128)
amplxe: Executing actions 100 % done                                           
amplxe: Error: 0x40000028 (Reporter error)

 

I understand this is a matter of text-coding as the source code contains accentuated letters at the line specified in the error message.

Please advise on how to fix the problem ?

 

my environment :

Linux localhost.localdomain 3.10.0-229.20.1.el7.x86_64 #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Intel(R) VTune(TM) Amplifier XE 2016 Update 1 (build 434111) Command Line Tool
Copyright (C) 2009-2015 Intel Corporation. All rights reserved.

locale
LANG=fr_FR.utf8
LC_CTYPE="fr_FR.utf8"
LC_NUMERIC="fr_FR.utf8"
LC_TIME="fr_FR.utf8"
LC_COLLATE="fr_FR.utf8"
LC_MONETARY="fr_FR.utf8"
LC_MESSAGES="fr_FR.utf8"
LC_PAPER="fr_FR.utf8"
LC_NAME="fr_FR.utf8"
LC_ADDRESS="fr_FR.utf8"
LC_TELEPHONE="fr_FR.utf8"
LC_MEASUREMENT="fr_FR.utf8"
LC_IDENTIFICATION="fr_FR.utf8"
LC_ALL=fr_FR.utf8

 

regards

lionnel

0 Kudos
1 Reply
Peter_W_Intel
Employee
127 Views

Was it possible that you can repeat this problem after upgrading to VTune(TM) Amplifier XE 2016 Update 2?

Please rerun this CLI, if problem still be here: run "amplxe-feedback -create-bug-report <report archive>". Please send vtune's result directory with report to me via private message, if you like. Thank you.

 

Reply