-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profile C++ code executed by Python script? #16
Comments
Here a minimal example:
fooWrapper.py:
foo.py:
Compiled and linked with
Executed with
Note: If I tried just using
I can fix that by using
but no profiling will be done for the C++ code either. Another note: |
Hey, the example you posted worked for me. However, it might not work as you might expected. The point is, that foo.cpp is more or less header only. This means that all functions of the class Foo are virtual. The Score-P compiler plugin for gcc and g++ is written in that way, that it ignores all virtual functions. If you change foo.cpp to
and add a foo.h with the content of
compile and run as you have written, all calls are instrumented. You should see the calls to Foo::get and so on in the profile:
[output of cube_calltree] I hope this answers your question. Best, Andreas |
I still can't see the call to Foo_bar(Foo*) and everything below. Perhaps something is odd with my Score-P installation? Is there a way to check that? Or maybe I should just reinstall Score-P.
I appreciate your help! |
In theory this should work. However, I wonder which gcc version you are using? Score-P uses Can you please post the output of
and
? Best, Andreas |
It works now. I noticed, I didn't have headers installed for gcc plugins, I missed libopenmpi-dev, libunwind and perf (I didn't have PAPI as an alternative either). After installing that and reinstalling Score-P, I get all the details I have dreamed of. Thanks again! Just for completion, in case someone is looking at this issue, this is what I get now:
and
|
I discussed your problem with the Score-P maintainer, and he told me that this is a regular problem 😉 . Best, Andreas |
Hi,
GCC-version
and
|
And, my command looks like-
I'm using this for ANUGA project at https://github.com/anuga-community/anuga_core/commits/main |
Hey,
I think this is a different Issue. You are missing libz. As you use Spack, I assume you do work on an HPC-System. Please ask your HPC-Admins to provide this lib in the environment you do use with Score-P. Btw:
I am not sure if the flag Best, Andreas |
I have some code in C++ instrumented with Score-P that is being called from a Python script.
I used
to build and compile the files. When I use
I can only see the execution time for the calls in Python but I have no information about different methods that are called in C++. I use cube to take a look at
profile.cubex
. Am I missing something?The text was updated successfully, but these errors were encountered: