1

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.

user1476176
  • 1,045
  • 1
  • 7
  • 15

1 Answers1

0

Try using this line, it works like a charm:

sudo operf mpirun --allow-run-as-root -x LD_LIBRARY_PATH="build/" -np 2 (path_to_the_file)
Paul Roub
  • 36,322
  • 27
  • 84
  • 93