<div dir="ltr">You could do it that way, if you told MPI to bind each task (MPI task, or non-MPI task in your case) to a processor. By default, most MPI's don't bind to a specific processor unless the scheduler (you don't have one) or something else tells it to. OpenMPI, for example, I think, has something like --bind-to-cpu, or --bind-to-socket. Often a scheduler or c-groups via a scheduler will pass-in a list of cpu's to bind to, but you could do it manually with the appropriate flags and files for your MPI distro.<div>
<br><div>You could also probably get away with just raw c-groups depending on your distro. You would probably touch a few files and echo a few lines to files to make the right groups then "cgrun <app>" to get things in to those groups. That works pretty well for binding, found decent results with that, I recommend it.</div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 12:09 PM, Chair GPFS UG <span dir="ltr"><<a href="mailto:chair@gpfsug.org" target="_blank">chair@gpfsug.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
<br>_______________________________________________<br>
gpfsug-discuss mailing list<br>
gpfsug-discuss at <a href="http://gpfsug.org" target="_blank">gpfsug.org</a><br>
<a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" target="_blank">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Zach Giles<br><a href="mailto:zgiles@gmail.com">zgiles@gmail.com</a>
</div>