Problem using VtuneApi functions

Problem using VtuneApi functions

Hi all,

I have just started using vtune and have downloaded an evaluation version for the purpose. I am trying to use local sampling in a C program using Vtune on linux. I am using the functions VTStartSampling() and VTStopSampling() as described in the header file VtuneApi.h that comes with vdk. I am also linking it with libVtuneApi.so. The program compiles without any errors but gives the following error on running:

"1 Error: NTD is not running at the moment, please start it before using NT services."

It gives this error on encountering the VTStartSampling() function call. I checked using the ps command, and ntd is running as 5 different processes under the sag user.

As far as I know, the installation of Vtune went smoothly and the components EntireX DCOM, vdk and the vtune analyzer were correctly installed. Besides this problem with local sampling, other aspects like EBS and callgraph sampling through the command line are working perfectly.

I am not sure why one needs the windows components for running vtune on a standalone linux system and I could not find adequate documentation in this regard either in the user guide or the reference manual.

Any help on this matter will be greatly appreciated.

Regards,
Srinivas.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Great question, Srinivas, and super nice to see you posting here. A couple of things:

1) when you install vtl, a log (filename: install.log) is created in the installation directory, which keeps track of all user decisions, installation successes, and installation failures. You should vi that beastie and see if you actually have stopped some service from starting up, as the error seems to indicate

2) The error message indicates an NT component, but of course it's a Linux service that's actually being invoked (that DCOM layer, its functionality for Linux, anyway). The reason we did this is complicated, but in the end distills down to we got a command line (vtl) for Linux *AND* Windows at the same time.

3) This required layer shows up as processes started by UID "sag", a pseudo user who doesn't actually log in to the server. ANYWAY, if you want to see if those services are running, give it the ol':

$ ps -ef | grep sag

and see what you get.

4) For grins anyway, try the following and see if find more clues:

$ vtl version

$ vtl -help

and, if ok, something super simple:

$ vtl activity -c sampling /bin/ls run

$ vtl view

or

$ vtl activity -c callgraph -app /bin/ls -moi /bin/ls run

$ vtl view

$ vtl view -gui

You get the idea.

If these work, we need to point to how your PATH is setup (echo $PATH) and see if all the directories that contain your relevent app files are in there.

Either way, report back here on what you see!

cheers

jdg

Thanks a lot for your reply! I should have probably told you this before -- I'm running vtl on a Mandrake distribution; the kernel version is 2.4.21-0.13mdksmp. Could this be a reason in any way? Besides this, I did the following checks as suggested by you:

1.I checked the install.log file and everything looks okay.

2. There are some 13 processes under the sag user.

3. The vtl version is shown as 2.0 for Linux; Build: 348.

4. Commands like vtl -help, vtl view and vtl activity are working correctly.

5. However, vtl view -gui gives an error, saying -gui is an invalid option. I believe, the callgraph viewer is not installed -- the install program displayed a message towards the end that said, one needs to download the viewer (version 2.0) from the intel site. I haven't done this so far, as I am primarily interested in EBS and not as much in profiling.

6. The PATH variable seems to be alright as I can execute all the vtl commands correctly. It's only the local sampling using libVtuneApi.so that is giving problems.

Also, just to be sure, I re-installed all the components, and still the error won't go away. Local sampling, I believe, might prove useful for us because otherwise, a lot of unnecessary data is generated by event based sampling -- which is why, I want to get it working.

Thanks for your help!

Message Edited by spdsresearch on 02-25-2004 02:35 AM

Srinivas:

If you just want to control "when" sampling data is collected, you can use the VTPause() and VTResume() APIs. I am not sure if the VTStartSampling() and VTStopSampling() are supported on Linux*, but I know that VTPause() and VTResume() are!

You will need to use the -start-paused option, if you want to wait to collect data until a certain point in your applicaiton.

See the "Pause/Resume APIs" in the User's Guide for more info.

-dlanders

Regards,
MrAnderson

Leave a Comment

Please sign in to add a comment. Not a member? Join today