If you just want to restrict to a single job on each node,<div>you can write a plug in that sets the slots to 1 by using </div><div>a command something like:</div><div><br></div><div> def run(self, nodes, master, user, user_shell, volumes):</div>
<div>       for node in nodes:</div><div><div>            cmd_strg = &#39;qconf -mattr exechost complex_values slots=1 %s&#39; % node.alias</div><div>            output = master.ssh.execute(cmd_strg)</div><div><br></div>You will need to look at the starcluster plugin documentation</div>
<div>to set everything up correctly. hth.</div><div><br></div><div>Don</div><div><br></div><div><div class="gmail_quote">On Mon, Nov 21, 2011 at 10:29 AM, Rayson Ho <span dir="ltr">&lt;<a href="mailto:raysonlogin@yahoo.com">raysonlogin@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="color:#000;background-color:#fff;font-family:times new roman,new york,times,serif;font-size:12pt"><div>
Amir,</div><div><br></div><div>You can use qhost to list all the node and resources that each node has.</div><div><br></div><div>I have an answer to the memory issue, but I have not have time to properly type up a response and test it.<br>
</div><div><br></div><div>Rayson</div><div><br></div><div><br></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">
 <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold">From:</span></b> Amirhossein Kiani &lt;<a href="mailto:amirhkiani@gmail.com" target="_blank">amirhkiani@gmail.com</a>&gt;<br> <b><span style="font-weight:bold">To:</span></b> Justin Riley &lt;<a href="mailto:justin.t.riley@gmail.com" target="_blank">justin.t.riley@gmail.com</a>&gt; <br>
<b><span style="font-weight:bold">Cc:</span></b> Rayson Ho &lt;<a href="mailto:rayrayson@gmail.com" target="_blank">rayrayson@gmail.com</a>&gt;;
 &quot;<a href="mailto:starcluster@mit.edu" target="_blank">starcluster@mit.edu</a>&quot; &lt;<a href="mailto:starcluster@mit.edu" target="_blank">starcluster@mit.edu</a>&gt; <br> <b><span style="font-weight:bold">Sent:</span></b> Monday, November 21, 2011 1:26 PM<br>
 <b><span style="font-weight:bold">Subject:</span></b> Re: [StarCluster] AWS instance runs out of memory and swaps<br> </font> <br>
Hi Justin,<br><br>Many thanks for your reply.<br>I don&#39;t have any issue with multiple jobs running per node if there is enough memory for them. But since I know about the nature of my jobs, I can predict that only one per node should be running.<br>
How can I see how much memory does SGE think each node have? Is there a way to list that?<br><br>Regards,<br>Amir<br><br><br>On Nov 21, 2011, at 8:18 AM, Justin Riley wrote:<br><br>&gt; Hi Amir,<br>&gt; <br>&gt; Sorry to hear you&#39;re still having issues. This is really more of an SGE<br>
&gt; issue more than anything but perhaps Rayson can give a better insight as<br>&gt; to what&#39;s going on. It seems you&#39;re using 23G nodes and 12GB jobs. Just<br>&gt; for drill does &#39;qhost&#39; show each node having 23GB? Definitely seems like<br>
&gt; there&#39;s a boundary issue here given that two of your jobs together<br>&gt; approaches the total memory of the machine (23GB). Is it your goal only<br>&gt; to have one job per
 node?<br>&gt; <br>&gt; ~Justin<br>&gt; <br>&gt; On 11/16/2011 09:00 PM, Amirhossein Kiani wrote:<br>&gt;&gt; Dear all, <br>&gt;&gt; <br>&gt;&gt; I even wrote the queue submission script myself, adding<br>&gt;&gt; the mem_free=MEM_NEEDED,h_vmem=MEM_MAX parameter but sometimes two jobs<br>
&gt;&gt; are randomly sent to one node that does not have enough memory for two<br>&gt;&gt; jobs and they start running. I think the SGE should check on the<br>&gt;&gt; instance memory and not run multiple jobs on a machine when the memory<br>
&gt;&gt; requirement for the jobs in total is above the memory available in the<br>&gt;&gt; node (or maybe there is a bug in the current check)<br>&gt;&gt; <br>&gt;&gt; Amir<br>&gt;&gt; <br>&gt;&gt; On Nov 8, 2011, at 5:37 PM, Amirhossein Kiani wrote:<br>
&gt;&gt; <br>&gt;&gt;&gt; Hi Justin,<br>&gt;&gt;&gt; <br>&gt;&gt;&gt; I&#39;m using a third-party tool to submit the jobs but I am setting the<br>&gt;&gt;&gt; hard
 limit.<br>&gt;&gt;&gt; For all my jobs I have something like this for the job description:<br>&gt;&gt;&gt; <br>&gt;&gt;&gt; [root@master test]# qstat -j 1<br>&gt;&gt;&gt; ==============================================================<br>
&gt;&gt;&gt; job_number:                 1<br>&gt;&gt;&gt; exec_file:                  job_scripts/1<br>&gt;&gt;&gt; submission_time:            Tue Nov  8 17:31:39 2011<br>&gt;&gt;&gt; owner:                      root<br>
&gt;&gt;&gt; uid:                        0<br>&gt;&gt;&gt; group:                      root<br>&gt;&gt;&gt; gid:                        0<br>&gt;&gt;&gt;
 sge_o_home:                 /root<br>&gt;&gt;&gt; sge_o_log_name:             root<br>&gt;&gt;&gt; sge_o_path:                <br>&gt;&gt;&gt; /home/apps/bin:/home/apps/vcftools_0.1.7/bin:/home/apps/tabix-0.2.5:/home/apps/BEDTools-Version-2.14.2/bin:/home/apps/samtools/bcftools:/home/apps/samtools:/home/apps/bwa-0.5.9:/home/apps/Python-2.7.2:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin:/home/apps/sjm-1.0/bin:/home/apps/hugeseq/bin:/usr/lib64/openmpi/1.4-gcc/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/cuda/bin:/usr/local/cuda/computeprof/bin:/usr/local/cuda/open64/bin:/opt/sge6/bin/lx24-amd64:/root/bin<br>
&gt;&gt;&gt; sge_o_shell:                /bin/bash<br>&gt;&gt;&gt; sge_o_workdir:             
 /data/test<br>&gt;&gt;&gt; sge_o_host:                 master<br>&gt;&gt;&gt; account:                    sge<br>&gt;&gt;&gt; stderr_path_list:          <br>&gt;&gt;&gt; NONE:master:/data/log/SAMPLE.bin_aln-chr1_e111108173139.txt<br>
&gt;&gt;&gt; *hard resource_list:         h_vmem=12000M*<br>&gt;&gt;&gt; mail_list:                  root@master<br>&gt;&gt;&gt; notify:                     FALSE<br>&gt;&gt;&gt; job_name:                   SAMPLE.bin_aln-chr1<br>
&gt;&gt;&gt; stdout_path_list:          <br>&gt;&gt;&gt; NONE:master:/data/log/SAMPLE.bin_aln-chr1_o111108173139.txt<br>&gt;&gt;&gt; jobshare:                 
  0<br>&gt;&gt;&gt; hard_queue_list:            all.q<br>&gt;&gt;&gt; env_list:                   <br>&gt;&gt;&gt; job_args:                   -c,/home/apps/hugeseq/bin/hugeseq_mod.sh<br>&gt;&gt;&gt; <a href="http://bin_sam.sh" target="_blank">bin_sam.sh</a> chr1 /data/chr1.bam /data/bwa_small.bam &amp;&amp;<br>
&gt;&gt;&gt; /home/apps/hugeseq/bin/hugeseq_mod.sh <a href="http://sam_index.sh" target="_blank">sam_index.sh</a> /data/chr1.bam <br>&gt;&gt;&gt; script_file:                /bin/sh<br>&gt;&gt;&gt; verify_suitable_queues:     2<br>
&gt;&gt;&gt; scheduling info:            (Collecting of scheduler job information<br>&gt;&gt;&gt; is turned off)<br>&gt;&gt;&gt; <br>&gt;&gt;&gt; And I&#39;m using the Cluster GPU Quadruple Extra Large instances which
 I<br>&gt;&gt;&gt; think has about 23G memory. The issue that I see is too many of the<br>&gt;&gt;&gt; jobs are submitted. I guess I need to set the mem_free too? (the<br>&gt;&gt;&gt; problem is the tool im using does not seem to have a way tot set that...)<br>
&gt;&gt;&gt; <br>&gt;&gt;&gt; Many thanks,<br>&gt;&gt;&gt; Amir<br>&gt;&gt;&gt; <br>&gt;&gt;&gt; On Nov 8, 2011, at 5:47 AM, Justin Riley wrote:<br>&gt;&gt;&gt; <br>&gt;&gt;&gt;&gt; <br>&gt;&gt; Hi Amirhossein,<br>&gt;&gt; <br>
&gt;&gt; Did you specify the memory usage in your job script or at command<br>&gt;&gt; line and what parameters did you use exactly?<br>&gt;&gt; <br>&gt;&gt; Doing a quick search I believe that the following will solve the<br>
&gt;&gt; problem although I haven&#39;t tested myself:<br>&gt;&gt; <br>&gt;&gt; $ qsub -l mem_free=MEM_NEEDED,h_vmem=MEM_MAX <a href="http://yourjob.sh" target="_blank">yourjob.sh</a><br>&gt;&gt; <br>&gt;&gt; Here, MEM_NEEDED and MEM_MAX are the lower and
 upper bounds for your<br>&gt;&gt; job&#39;s memory requirements.<br>&gt;&gt; <br>&gt;&gt; HTH,<br>&gt;&gt; <br>&gt;&gt; ~Justin<br>&gt;&gt; <br>&gt;&gt; On 7/22/64 2:59 PM, Amirhossein Kiani wrote:<br>&gt;&gt;&gt; Dear Star Cluster users,<br>
&gt;&gt; <br>&gt;&gt;&gt; I&#39;m using Star Cluster to set up an SGE and when I ran my job list,<br>&gt;&gt; although I had specified the memory usage for each job, it submitted<br>&gt;&gt; too many jobs on my instance and my instance started going out of<br>
&gt;&gt; memory and swapping.<br>&gt;&gt;&gt; I wonder if anyone knows how I could tell the SGE the max memory to<br>&gt;&gt; consider when submitting jobs to each node so that it doesn&#39;t run the<br>&gt;&gt; jobs if there is not enough memory available on a node.<br>
&gt;&gt; <br>&gt;&gt;&gt; I&#39;m using the Cluster GPU Quadruple Extra Large instances.<br>&gt;&gt; <br>&gt;&gt;&gt; Many thanks,<br>&gt;&gt;&gt; Amirhossein Kiani<br>&gt;&gt; <br>&gt;&gt;&gt;&gt;
 <br>&gt;&gt;&gt; <br>&gt;&gt; <br>&gt;&gt; <br>&gt;&gt; <br>&gt;&gt; _______________________________________________<br>&gt;&gt; StarCluster mailing list<br>&gt;&gt; <a href="mailto:StarCluster@mit.edu" target="_blank">StarCluster@mit.edu</a><br>
&gt;&gt; <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>&gt; <br><br><br>_______________________________________________<br>StarCluster mailing list<br>
<a href="mailto:StarCluster@mit.edu" target="_blank">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></div><br>_______________________________________________<br>
StarCluster mailing list<br>
<a 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></blockquote></div><br></div>