runtime of functions

runtime of functions


I've got a question concerning the Comand Line Interface of Intel trace Analyzer. I want to evaluate the total-runtime of one function of a mpi-program. I know how to do this using the GUI, but I want to get the average runtime of about 20 runs of the MPI-program. So how can I "ungroup" (as it is called in the GUI-version) the functions in the CLI? At the moment I can only find out how long the programm in total was running...

Thank you in advance for an answer


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

Hi Bernard,

Looks like stftool (a part of ITAC package) could help you. You can use:
   stftool trace_name.stf --print-statistics  >trace_name.stats

This command generates summary information about all commands.
But, you need to get information about one tick duration and it means that you need to convert a trace and get CLKPERIOD value. You may use:
   xstftool trace_name.stf --print-statistics | grep CLKPERIOD

To get function index you may need to use:
   xstftool trace_name.stf --print-statistics | grep MPI_Alltoall

After that just try this out:
   grep " N:" trace_name.stats
where N is the index you got by the previous command (number after DEFSTATE)

Sure, you can use `xstftool trace_name.stf`which genereates human readable text file and you can easily parse it but be prepared that it may take a lot of time to generate output file and it may be huge.



Well, Bernard, you haven't mentioned that this is a non-mpi function. It doesn't have statistics information in the trace.

So, you should generate a text representation of the trace `xstftool sofi3D.stf > sofi3D.avt`
After that `grep exchange_s sofi3d.avt`.

I'm not familiar with user code investigation by ITAC but I hope that looking at the AVT file may give you a clue - just open it in a text viewer.

Yeah, 3e-5 is rather rounding error because each event has precision worse than 1e-6.



BTW, Bernhard,
Intel MPI has internal statistics. Just set I_MPI_STATS to a value from 1 to 10 and you can get some information (might be very difficult to ananlyze automatically). And there is 'ipm' value to produce an output in IPM-like format. Just give it a try and might you'll find it useful.


Leave a Comment

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