<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">If you want every job (OpenMP job?) to consume all the CPUs, then forcing all nodes to have a slot of 1 would work.<br><div><br></div><div>But if you have a mix of serial and threaded workloads, then the correct way of ensuring exclusive execution is still via SGE's built-in mechanism.<br></div><div><br><span></span></div><div><span>Rayson</span></div><div><span><br></span></div><div><span>=================================<br>Open Grid Scheduler / Grid Engine<br>http://gridscheduler.sourceforge.net/<br><br>Scalable Grid Engine Support Program<br>http://www.scalablelogic.com/<br><br></span></div><div><br></div>  <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">
  <b><span style="font-weight: bold;">From:</span></b> Don MacMillen &lt;macd@nimbic.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> David Erickson &lt;derickso@stanford.edu&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> starcluster@mit.edu <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, February 23, 2012 8:43 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [StarCluster] SGE have a job consume all slots?<br> </font> </div> <br>
<div id="yiv2124357482">Hmm, the docs don't seem to be all that enlightening. &nbsp;Here is another way.<div>init_node is called for every node in the run method of a starcluster plugin</div><div>as well as in the on_add_node method of the plugin. HTH.</div>
<div><br></div><div>Regards,</div><div><br></div><div>Don</div><div><br><div><br></div><div><div>&nbsp; &nbsp; def init_node(self, node, master):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ...</div><div>&nbsp; &nbsp; &nbsp; &nbsp; # Set the number of slots to 1. &nbsp;We do this so that only one job is</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; # is submitted per machine, since we will use all of its available</div><div>&nbsp; &nbsp; &nbsp; &nbsp; # threads in multi-threaded mode.</div><div>&nbsp; &nbsp; &nbsp; &nbsp; cmd_strg = 'source /opt/sge6/default/common/settings.sh;' \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'qconf -mattr exechost complex_values slots=1 %s' % node.alias</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; self.logger.debug("Executing: |%s|" % cmd_strg)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; output = master.ssh.execute(cmd_strg)</div>
</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ...</div><div><br></div><div><br></div><div><br><br><div class="yiv2124357482gmail_quote">On Thu, Feb 23, 2012 at 3:56 PM, David Erickson <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:derickso@stanford.edu" target="_blank" href="mailto:derickso@stanford.edu">derickso@stanford.edu</a>&gt;</span> wrote:<br>
<blockquote class="yiv2124357482gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi-<br>
I've been digging through SGE/OGS docs for the last hour or so trying to<br>
sort out the easiest way to enforce a one job per host restriction, does<br>
anyone have a suggestion on how to do this? &nbsp;My hosts are coming up with<br>
8 slots, so I tried launching with -l slots=8 but it complained about<br>
wanting me to use parallel environments which looks even more complicated..<br>
<br>
Thanks,<br>
David<br>
_______________________________________________<br>
StarCluster mailing list<br>
<a rel="nofollow" ymailto="mailto:StarCluster@mit.edu" target="_blank" href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
http://mailman.mit.edu/mailman/listinfo/starcluster<br>
</blockquote></div><br></div></div>
</div><br>_______________________________________________<br>StarCluster mailing list<br><a ymailto="mailto:StarCluster@mit.edu" href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br><a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br><br><br> </div> </div>  </div></body></html>