<div dir="ltr"><div>Allo all,</div><div><br></div><div>  I'm attempting to cheat.  As per-usual, cheating takes more time than 'Doing It Properly' - but it is vastly more fun.</div><div><br></div><div>So without setting up Grid or Moab etc, I need to pin processes to a cpu.  I.E. on Linux: taskset blah blah.</div>
<div>I could write a small housekeeping script which RR new spawned processes across CPUs using taskset, but I was wondering if OpenMPI could be a good way to go.</div><div><br></div><div>So:</div><div><br></div><div>I have a non-MPI application X.</div>
<div>Which is spawned and forked by a parent process into its own process group.</div><div>This can occur at any time, however there will only ever be a maximium N of appl X.</div><div><br></div><div>Using mpirun it appears that you can set off parallel instances of a non-MPI application:</div>
<div><br></div><div>mpirun -np 4 applicationX</div><div><br></div><div>However, really what I'm requiring to do is say:</div><div>  Max slots = N (which I can define in the mpi hostfile).</div><div><br></div><div>mpirun -np 1 applicationX</div>
<div>mpirun -np 1 applicationX (started at a random future time)</div><div>mpirun -np 1 applicationX (started at a random future time)</div><div>mpirun -np 1 applicationX (started at a random future time)</div><div><br></div>
<div>Each being automatically pinned to a CPU, but I'm fairly convinced this is not the way MPI works.</div><div>Would it do what I'm after?</div><div><br></div><div>Does anyone know of a better way?</div><div><br>
</div><div>Jez</div></div>