I'm having issues using Oprofile to profile a parallel program that I call via mpirun
. The command I'd like to use is:
$ operf mpirun -n 4 [program and arguments]
Unfortunately, when I do this, operf starts logging, but something funny happens when the MPI program is finished - operf
seems to not recognize that it's returned (MPI-spawned processes no longer appear in htop
, but operf
still does), and things just hang waiting for me to interrupt them.
Is there an option I can pass to operf
or mpirun
which will make the two play nicely together? Failing that, is there a bash trick I can use to automatically kill operf
when my MPI program is finished?
Edit: Previously thought that it Oprofile wasn't always generating results, but it turns out that I was just confused and looking in the wrong location. The only problem is that operf doesn't recognize that the MPI program has terminated.