title: How to use mpirun to use different CPU cores for different programs?
body: <p>I have a virtual machine with 32 cores.
  I am running some simulations for which I need to utilize 16 cores at one time. </p>
  
  <p>I use the below command to run a job on 16 cores :</p>
  
  <blockquote>
    <p>mpirun -n 16 <em>program_name</em> <em>args</em> > log.out 2>&amp;1</p>
  </blockquote>
  
  <p>This program runs on 16 cores.</p>
  
  <p>Now if I want to run the same programs on the rest of the cores, with different arguments, I use the same command like </p>
  
  <blockquote>
    <p>mpirun -n 8 <em>program_name</em> <em>diff_args</em> > log_1.out 2>&amp;1</p>
  </blockquote>
  
  <p>The second process utilizes the same 16 cores that were utilized earlier. 
  How can use mpirun to run this process on 8 different cores, not the previous 16 that first job was using.</p>
  
  <p>I am using headless Ubuntu 16.04.</p>