Saurish Chakrabarty
Saurish Chakrabarty

Reputation: 25

How can I run an mpi executable so that top shows one process

Is it possible to run an mpi executable using multiple threads so that on doing "top" one sees only one process with the full cpu usage?

For example, if I run "mpiexec -np 4 ./executable" and do "top", I see 4 processes with different PIDs, each using 100% cpu. I would like to see a single process with a unique PID using 400% cpu.

Upvotes: 0

Views: 323

Answers (1)

Zulan
Zulan

Reputation: 22640

No, that is not possible. MPI is explicitly designed for separate processes. They will inevitably show up as separate processes on top.

Now there may be some esoteric MPI implementations based on threads instead of processes, but I highly doubt these would be conforming and practically usable MPI implementations.

Edit:

1.-2. The program atop in "Accumulated per program" mode (press 'p') might do what you want. 3. usually, if you kill mpiexec / mpirun, it will terminate all ranks. Otherwise, consider killall.

I can see how that may be convenient for a superficial glance about performance, but you should consider investing in learning more sophisticated performance analysis tools for parallel applications.

Upvotes: 0

Related Questions