qprofile is a LRZ wapper script. OpenMP programs cannot be analyzed with qprofile. The option -E switches the sampling to performance counter. MPI sampling is possible, however results are only concatenated but not aggregated into one single result.  


-l perform profiling on line level. For this to be instructive, you should use -g for building  your executable. By default, profiling is performed on function level.
-E Event. See pfmon -l for a selection or use the appropriate entry in the table of performance counters.
By default, sample counts are accumulated.
-t  Sample interval or number of events for one profiling tick. Default value 10000 (microseconds).
If this parameter is too low, postprocessing is very slow. (Be aware that there might be several millions events per second for some counters).
-o  Write profiling output to name.res and sorted output to name.srt. By default, qprofile is used as name.


# Need to load module once
module load qprofile
qprofile -l -t 1000000 -E CPU_CYCLES myprog.exe
mpirun -np 4 qprofile  -l -t 1000000 -E CPU_CYCLES mympiprog.exe
cat qprofile.srt