Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4975 Discussions

Assertion `g_lsepAdapter != ((void *)0)' failed

daothanhtuan
Beginner
568 Views
Hi all,
I've been trying to use VTuneApi functions. I used very similiar code to this link: http://software.intel.com/en-us/articles/use-vtuneapi-in-your-code-to-profile-without-launching-vtunetm-analyzer/
My machine is intel Xeon 5660, Linux Redhat 2.16.18.
As I run the program (with the api attached to it), an error occured:

VTStartSampling: Assertion `g_lsepAdapter != ((void *)0)' failed.
Aborted

I used the 64 bit library (in /opt/intel/vtune/rdc/analyzer/bin/libVtuneApi.so ).

Can anyone tell me how to solve this problem please? I've been headache because of this.
Thanks in advance,
Tuan
0 Kudos
3 Replies
Peter_W_Intel
Employee
568 Views
This article is only workable on Windows* environment, not suitable for Linux*.

First at all, please check if vtune driver is loaded - lsmod | grep vtune

Use this article on Linux* environment - you have to comment out statement "VTStartSampling(&params)" and statement "VTStopSampling(1)". That means only VTResumeSampling() & VTPauseSampling() are used in your code.

Create new project / activity after launching vtlec, select your app (use VTResumeSampling & VTPauseSampling) as launched app. Before finishing Wizard, please set "Start with data collection paused" on.

I have verified it works after doing above changes. Again, 1) doing VTStartSampling on vtlec 2) When application terminates, sampling will be stoppedby vtlec.

Good Luck!

Regards, Peter
0 Kudos
daothanhtuan
Beginner
568 Views
Thanks Peter,
Yes I googled this for a while and found out that removing VTStartSampling and VTStopSampling defenitely works as I tested this (this also means Ismode is on for Vtune).
To this end, these two APIs can not run in Linux enviroments? Or is there any solutions to make them work on Linux? Not only these two APIs don't work, VTBindResults doesn't.
Putting it another way, i don't want to use vtl or vtlec because i want to print the results of VTune at some particular points in my program, is there any way to do this?
Thanks a lot,
Tuan
0 Kudos
Peter_W_Intel
Employee
568 Views

Hi Tuan,

I'm glad that you can use APIs (Pause and Resume)on Linux* environment. I don't know why other APIs don't work on Linux*.

Results can only beviewed by VTune Analyzer GUI or vtl command, so youhave no way to print resultsin your program.

Regards, Peter

0 Kudos
Reply