<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.ccn.ucla.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Parrallelizing_on_Hoffman</id>
	<title>Parrallelizing on Hoffman - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.ccn.ucla.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Parrallelizing_on_Hoffman"/>
	<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Parrallelizing_on_Hoffman&amp;action=history"/>
	<updated>2026-05-09T05:40:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Parrallelizing_on_Hoffman&amp;diff=1718&amp;oldid=prev</id>
		<title>Ccn admin: 3 revisions</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Parrallelizing_on_Hoffman&amp;diff=1718&amp;oldid=prev"/>
		<updated>2014-01-16T03:44:37Z</updated>

		<summary type="html">&lt;p&gt;3 revisions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This assumes you understands the SGE Commands [ [[Hoffman_Queues]] ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[ https://sites.google.com/site/parallelcomputingtutorials/slides Hoffman2 Programming Classes]&lt;br /&gt;
&lt;br /&gt;
==Job Arrays==&lt;br /&gt;
Stolen from [http://www.ats.ucla.edu/clusters/common/computing/batch/job_arrays.htm Job Arrays]&lt;br /&gt;
&lt;br /&gt;
The Sun Grid Engine (SGE) has a job array option, which lets you submit multiple jobs with a single command file.&lt;br /&gt;
Syntax for this magical wizard is:&lt;br /&gt;
 #$ -t lower-upper:interval&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; example &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Command:&lt;br /&gt;
 qsub -cwd -V -t 1-2:1 hellotask.sh&lt;br /&gt;
&lt;br /&gt;
File: hellotask.sh&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Task id is $SGE_TASK_ID&amp;quot;&lt;br /&gt;
if [ -e $HOME/JOBARRAY/data$SGE_TASK_ID.in ]; then&lt;br /&gt;
    while read file&lt;br /&gt;
    do&lt;br /&gt;
        echo &amp;quot;hello $file&amp;quot;&lt;br /&gt;
    done &amp;lt; $HOME/JOBARRAY/data$SGE_TASK_ID.in&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: data1.in&lt;br /&gt;
 first&lt;br /&gt;
 second&lt;br /&gt;
&lt;br /&gt;
File: data2.in&lt;br /&gt;
 third&lt;br /&gt;
 fourth&lt;br /&gt;
&lt;br /&gt;
When the value of $SGE_TASK_ID is 1, the hellotask.sh script will output:&lt;br /&gt;
 Task id is 1&lt;br /&gt;
 hello first&lt;br /&gt;
 hello second&lt;br /&gt;
&lt;br /&gt;
When it is 2, the output will look like:&lt;br /&gt;
 Task id is 2&lt;br /&gt;
 hello third&lt;br /&gt;
 hello fourth&lt;/div&gt;</summary>
		<author><name>Ccn admin</name></author>
	</entry>
</feed>