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

vtune hangs during data collection

lamedm
Beginner
1,889 Views
Hi.
I am running an evaluation of vtune for linux 1.0 on a redhat 7.2 box. I am trying to collect callgraph data on a multi threaded (pthreads) cpu intensive test executable.
running the executable itself exits after 30 seconds. Running the same exe using the following command gets 'stuck', does not return : I get a message Data collection started..., and nothing else.
The command I used :
vtl activity $name -c callgraph -app $app -moi $app run

Are there any limitations on using vtune with multithreaded applications.
Another question : candoes vtune follow forks ?

Thanks in advance.
0 Kudos
4 Replies
Daniel_B_Intel2
Employee
1,889 Views
hi,

the answer to your last question is "yes" VTune follows forks and will report results on all processes created by "fork".

vtune also reports results collected on multithreaded applcatioin (with pthreads also).

regarding your case, there are may be several scenarios.

1) How long did you wait? the overhead of the call graph collection may be huge (10s of times).
Try to stop the collection and to get partial results (until you stoped it). To do this you should run:

/opt/intel/vtune/shared/bin/ActivityController
(same path as "vtl" has)

from another console window, when your activity is running. Choose "stop" there. If all goes smoothly you should get the call graph results until the point you stopped the collection. Analyze it. (Like see how many times a particular function was called) If you find out that the partial results are OK, run the activity again and go to lunch :-)

2) there may be bug in vtune, then the best thing to do is to call support. they'll probably ask you to attach your application.

--daniel
0 Kudos
lamedm
Beginner
1,889 Views
Hi.

I tried writing a simple test that runs several threads , each runs a simple loop.
Running the program terminates in a few seconds.
Running the program with vtune hangs after the first thread is started.
I can see the vtl processes not doing anything.
Activity controller claims that I do not have any running activities !
I am using the newest download (gold) version.

Thanks,
Meir
0 Kudos
Daniel_B_Intel2
Employee
1,889 Views
Meir,

do you mind sending me your test aplication?
Binary and sources? Do you run it on RH7.2? Standard?

please use this mail address:
ddbricker@hotmail.com

Thank you
Daniel
0 Kudos
Daniel_B_Intel2
Employee
1,889 Views
Meir,

There is a line in release note (/opt/intel/vtune/VTLRELEASENOTES.htm) saying:

Statically linked executables are not fully supported on the software.

So your problem is that you are trying to use statically linked executable.

Try to replace your compilation line from:
g++ -Wall -fPIC -D_REENTRANT -D_PTHREADS -D_POSIX_PTHREAD_SEMANTICS -O2 -static -o test  main.cpp -lpthread 


to (remove -static):
g++ -Wall -fPIC -D_REENTRANT -D_PTHREADS -D_POSIX_PTHREADS_SEMANTICS -O2 -o test main.cpp -lpthread 


The produced executable can be analyzed with VTune (call graph) and will trace all threads and forks.

Is this workaround suitable for you?

-Daniel
0 Kudos
Reply