When I run the following command, I receive error:

/usr/lib/linux-tools/4.4.0-66-generic/perf stat -e cycles ./shFile
/usr/lib/linux-tools/4.4.0-66-generic/perf: symbol lookup error: /usr/local/MATLAB/R2016a/bin/glnxa64/libunwind.so.8: undefined symbol: __gcc_personality_v0

I would like to use perf utility to test FLOPS for the MATLAB code. Since perf only accept execute file, so I used mcc -m shFile.m to convert .sh file and then used perf command perf stat -e cycles ./shFile, it shows the above error. How can I fix this error?

Here's more info:

System: Ubuntu 16.4
Matlab: R2016a
perf: 4.4.0-66-generic/perf
share|improve this question
    
Can you show output of file -k ./shFile and ldd ./shFile? How mcc works, is there verbose mode? This is strange that perf can't start process, and as workarund you may try starting the application and using perf with pid of it ./shFile & perf stat -p `pidof shFile` and ./shFile & perf record -p `pidof shFile`. You can also try to embed working with hardware counters inside your Matlab code with PAPI (icl.cs.utk.edu/papi/index.html) there should be bindings, something like github.com/arm-hpc/papi/blob/master/src/Matlab/… & Matlab/flops.readme – osgx Mar 15 '17 at 1:46
1  
file -k ./shFile ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.26, stripped\012- data ldd ./shFile linux-vdso.so.1 => (0x00007ffe88da5000) libmwlaunchermain.so => /usr/local/MATLAB/R2016a/bin/glnxa64/libmwlaunchermain.so (0x00007f6b6f3fb000) libmwmclmcrrt.so.9.0.1 => /usr/local/MATLAB/R2016a/runtime/glnxa64/libmwmclmcrrt.so.9.‌​0.1 (0x00007f6b6f1b3000) ... – Xiong Yunyang Mar 15 '17 at 2:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.