Unable to use pgcollect

I trying to profile on of the Fortran application i’m working. I use OpenMP with it.

when i use
pgcollect -allcache

i get this message
pgcollect-Fatal-Unable to find executable pgcollect in path

I run this command from the directory where the executable is present.

I couldn’t get solution to this online .

I compiled and linked my code with -Minfo=ccff option.

when i use pgcollect it works but the pgprof only gives the time based profiling. I want to get the cache misses. For this I found that oprofile has to be running.

I tried to configure it by opcontrol --no-vmlinux(as the machine is running centos 5.8 i dont have the vmlinux but vmlinuz which its not accepting.) then opcontrol --start but even then i’m not able to get any even based profiling.

The error message looks incorrect: it is coming from pgcollect, so there is no need to find pgcollect on the path. However with just a few quick tests I was unable to reproduce the behavior you are seeing. We want to get you up and running and we want to fix any bug that you have uncovered.

There are a few things to check:

(1) Are you using 64-bit pgcollect for a 64-bit application, or 32-bit pgcollect for a 32-bit application? Set the PATH to your PGI software to change this.

(2) Is your executable “myprog” accessible and on your PATH? Do you need to refer to it as “./myprog”?

(3) Are “opcontrol” and “opreport” on your PATH?

(4) Is the program “pgoprun” on your PATH?

Let us know if any of this helps, so we can either dive deeper into the problem or fix it so you don’t run into it again in six months.


Hi Don,
Thanks for you prompt reply. I’m using 64 bit versions (both pgi and application)
I have all of the above in the PATH. I think i was executing the command in a wrong way.
I used this now
pgcollect -allcache ./myprog [myprog args]
Now i get this message.
Couldn’t allocate hardware counters for the selected events.
pgprof: could not set oprofile event profiling mode

is it because, i used opcontrol --no-vmlinux
Since the machine has Centos 5.8 i dont have vmlinux but vmlinuz and when i use
sudo opcontrol --vmlinux=/boot/vmlinuz-2.6.18-238.19.1.el5

i get this message.
The specified file /boot/vmlinuz-2.6.18-238.19.1.el5 does not seem to be valid
Make sure you are using the non-compressed image file (e.g. vmlinux not vmlinuz)

Any suggestions ?

Thanks in advance.

Hi Don,
I could get the vmlinux and configured the oprofile with opcontrol --vmlinux option and
when i use
pgcollect -allcache ./myprog [myprog arguments]

i still get this message :
Couldn’t allocate hardware counters for the selected events.
pgprof: could not set oprofile event profiling mode

Am I doing any thing wrong here.


My apologies for the delay in responding.

First, I think the --vmlinux option is unnecessary. It is only needed if you want a profile of the Linux kernel that uses kernel symbols. Pgcollect overrides that internally and uses --no-vmlinux before launching the profile run.

I don’t know why you are getting that error message. What does the first line of output from the command “pgcollect -list-events” contain?