title: MPI kill unwanted processes
body: <p>I'm using OpenMPI with C bindings.  In my code, there is a required number of processes.  If MPI is executed such that more processes are opened than are required, I wish to kill or terminate the extra processes.  How can I do that?</p>
  
  <p>When I try to do that several ways I can think of, I get the following error:</p>
  
  <pre><code>mpirun has exited due to process rank 3 with PID 24388 on
  node pc15-373 exiting without calling "finalize". This may
  have caused other processes in the application to be
  terminated by signals sent by mpirun (as reported here).
  </code></pre>