<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.ccn.ucla.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dmargolis</id>
	<title>Center for Cognitive Neuroscience - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.ccn.ucla.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dmargolis"/>
	<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php/Special:Contributions/Dmargolis"/>
	<updated>2026-05-06T06:57:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=MR&amp;diff=3587</id>
		<title>MR</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=MR&amp;diff=3587"/>
		<updated>2018-05-11T19:01:50Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* Transfer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of information about MR data from collection to processing/analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Collection==&lt;br /&gt;
How does one collect MR data?&lt;br /&gt;
&lt;br /&gt;
===Staglin===&lt;br /&gt;
The [http://www.semel.ucla.edu/staglin Staglin IMHRO Center for Cognitive Neuroscience] is one of our main data collection facilities.&lt;br /&gt;
*[[StaglinCenter:MR]]&lt;br /&gt;
&lt;br /&gt;
===EEG/FMRI===&lt;br /&gt;
Concurrent data collection of EEG and FMRI is possible at the Staglin Center.&lt;br /&gt;
*[[StaglinCenter:EEG-FMRI]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--===Transfer===&lt;br /&gt;
Data is automatically transferred from a DICOM server to our processing server ([[Hoffman2]]) nightly.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Directory Structure==&lt;br /&gt;
Standards are important.  And we&#039;ve got standards about how our MR data should be kept.&lt;br /&gt;
*[[MR:DirectoryStructure]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Processing==&lt;br /&gt;
How to process MR data.&lt;br /&gt;
&lt;br /&gt;
===Tutorials===&lt;br /&gt;
Some helpful tutorials about how to process MR data.&lt;br /&gt;
&lt;br /&gt;
*[http://fsl.fmrib.ox.ac.uk/fslcourse/ FSL and FreeSurfer Course]&lt;br /&gt;
&lt;br /&gt;
===Preprocessing===&lt;br /&gt;
Certain preprocessing steps are done to all data.  This is facilitated by an automated script.&lt;br /&gt;
*[[MR:Processing:Preprocessing]]&lt;br /&gt;
&lt;br /&gt;
===DTI===&lt;br /&gt;
*[[MR:Processing:DTI]]&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Interactive_Sessions&amp;diff=3586</id>
		<title>Hoffman2:Interactive Sessions</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Interactive_Sessions&amp;diff=3586"/>
		<updated>2018-04-18T15:29:52Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* Tips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
Interactive sessions on Hoffman2 let you have access to a computing node for up to 24 hours.  This is ideal for:&lt;br /&gt;
* running a intensive program like MATLAB (in fact that&#039;s how it [[Hoffman2:MATLAB|works]]), [[Hoffman2:WEKA|WEKA]], [[Hoffman2:R|R]] or FSLView&lt;br /&gt;
* debugging a script you will be submitting to the queue later&lt;br /&gt;
* moving/tar&#039;ing/untar&#039;ing lots of files&lt;br /&gt;
* any other computing or graphics intensive operations&lt;br /&gt;
since you aren&#039;t supposed to use the login nodes for such heavy lifting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Command==&lt;br /&gt;
To get one, you need to use the &amp;lt;code&amp;gt;qrsh&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
 $ qrsh &lt;br /&gt;
will try to get you an interactive node.&lt;br /&gt;
&lt;br /&gt;
Because you didn&#039;t specify a time limit this session will only last two hours after which you will be kicked off of the interactive node back to a login node.&lt;br /&gt;
&lt;br /&gt;
And because you didn&#039;t specify a memory limit, the default is 1GB.&lt;br /&gt;
&lt;br /&gt;
If you successfully get a node, your prompt will change from something like&lt;br /&gt;
 [joebruin@login4 ~] $&lt;br /&gt;
to something like&lt;br /&gt;
 [joebruin@n1234 ~] $&lt;br /&gt;
indicating you are on node 1234.&lt;br /&gt;
&lt;br /&gt;
==Longer Time==&lt;br /&gt;
If you wanted to specify a a time limit for your interactive session (anything less than 24 hours), use the resource flag again and specify time in the HH:MM:SS format.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
 $ qrsh -l h_rt=4:00:00&lt;br /&gt;
will try securing an interactive node for four hours with the default amount of RAM, but if they are all taken you will be kindly told you are out of luck.&lt;br /&gt;
&lt;br /&gt;
==More Memory==&lt;br /&gt;
Doing something memory intensive? Like working with a lot of visualizations or multiple datasets? Use the resource flag again and specify a data request.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
 $ qrsh -l h_rt=4:00:00,h_data=4G&lt;br /&gt;
will try securing an interactive node for four hours with four gigabytes of RAM, but if no such node is available the cluster will deny your request.&lt;br /&gt;
&amp;lt;!--==Now!==&lt;br /&gt;
If you absolutely need an interactive session now and can&#039;t take no for an answer, use a special flag &amp;lt;code&amp;gt;-now no&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
 $ qrsh -l h_rt=4:00:00 -now no&lt;br /&gt;
will try securing an interactive node for four hours with the default amount of RAM.  But if all of the interactive nodes are used up, it will put you in a queue waiting for one until you get it.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
Sometimes inactivity on your computer will result in Hoffman2 connection break [ Broken Pipe ] (even while computing).&lt;br /&gt;
&lt;br /&gt;
To prevent this from happening:&lt;br /&gt;
For Macs - in your /etc/ssh/ssh_config -add this line to the bottom &lt;br /&gt;
 ServerAliveInterval 180&lt;br /&gt;
&lt;br /&gt;
This will tell your ssh to ping the server every 180 seconds to prevent it from timing out.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://www.ats.ucla.edu/clusters/hoffman2/computing/sge_qrsh.htm Getting an interactive node]&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Modules&amp;diff=3585</id>
		<title>Hoffman2:Modules</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Modules&amp;diff=3585"/>
		<updated>2018-03-02T23:18:29Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* Enabling the CCN Hoffman2 modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
[https://www.hoffman2.idre.ucla.edu/computing/modules/ Environmental Modules] allow users to dynamically modify their shell environment (e.g., $PATH, $LD_LIBRARY_PATH, etc.) in order to support a number of applications installed on the Hoffman2 Cluster.  CCN supports several modules on Hoffman2 including: AFNI, ANTs, Caret,FSL, FreeSurfer, ITKGray, ITK-SNAP, and MRIcron.&lt;br /&gt;
&lt;br /&gt;
==Enabling the CCN Hoffman2 modules==&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Use &amp;lt;code&amp;gt;gedit&amp;lt;/code&amp;gt; or your favorite [[Text Editors|text editor]] (e.g. nano or vim) to edit the file &amp;lt;code&amp;gt;~/.bashrc&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ gedit ~/.bashrc&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Insert these lines at the &#039;&#039;&#039;bottom&#039;&#039;&#039; of the file&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;module use /u/project/CCN/apps/modulefiles&amp;amp;#10;umask 007&amp;lt;/pre&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Important:&#039;&#039;&#039; remove or comment out these lines (if present):&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Remove or comment out this line!&amp;amp;#10;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;source /u/project/FMRI/apps/etc/profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Remove or comment out this line!&amp;amp;#10;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;umask 0022&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Save the file&lt;br /&gt;
# Log out of Hoffman2 and the next time you log in, everything will be set for you to start working.&lt;br /&gt;
&lt;br /&gt;
==CCN Hoffman2 modules==&lt;br /&gt;
===AFNI===&lt;br /&gt;
[https://afni.nimh.nih.gov/ AFNI] (Analysis of Functional NeuroImages) is a set of C programs for processing, analyzing, and displaying functional MRI (FMRI) data - a technique for mapping human brain activity.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load afni&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run AFNI, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;afni&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ANTs===&lt;br /&gt;
&lt;br /&gt;
[http://stnava.github.io/ANTs/ ANTs] (Advanced Normalization Tools) computes high-dimensional mappings to capture the statistics of brain structure and function.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load ants&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Please see the [http://stnava.github.io/ANTs/ ANTs website] for usage examples.&lt;br /&gt;
&lt;br /&gt;
===Caret===&lt;br /&gt;
&lt;br /&gt;
[http://brainvis.wustl.edu/wiki/index.php/Caret:About Caret] is a free, open-source, software package for structuraland functional analyses of the cerebral and cerebellar cortex.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load caret&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run Caret, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;caret5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DCMTK===&lt;br /&gt;
&lt;br /&gt;
[http://www.dcmtk.org/dcmtk.php.en DCMTK] is a collection of libraries and applications implementing large parts the DICOM standard. It includes software for examining, constructing and converting DICOM image files, handling offline media, sending and receiving images over a network connection, as well as demonstrative image storage and worklist servers. &lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load dcmtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run (for example) dcmdump, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;dcmdump [options] dcmfile(s)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FSL===&lt;br /&gt;
&lt;br /&gt;
[https://fsl.fmrib.ox.ac.uk/ FSL] is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data..&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load fsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run FSL, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;fsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of FSL on Hoffman2.  To see the list of available FSL versions, enter:&lt;br /&gt;
 module av fsl&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of FSL, enter (for example):&lt;br /&gt;
 module load fsl/5.0.7&lt;br /&gt;
&lt;br /&gt;
===FreeSurfer===&lt;br /&gt;
&lt;br /&gt;
[https://surfer.nmr.mgh.harvard.edu/ FreeSurfer] is an open source software suite for processing and analyzing (human) brain MRI images.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load freesurfer&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run (for example) freeview, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;freeview&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of FreeSurfer on Hoffman2.  To see the list of available FreeSurfer versions, enter:&lt;br /&gt;
 module av freesurfer&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of FreeSurfer, enter (for example):&lt;br /&gt;
 module load freesurfer/5.1.0&lt;br /&gt;
&lt;br /&gt;
===ITKGray===&lt;br /&gt;
&lt;br /&gt;
[https://web.stanford.edu/group/vista/cgi-bin/wiki/index.php/ItkGray ITKGray] is a segmentation tool adapted and developed from ITKSnap by Bob Dougherty. ITKGray is a branch of the ITKSnap project. Bob added functionality from  MrGray-Retired, including topology checking/fixing and a new flood-fill paintbrush that is similar to the MrGray-Retired auto-segmentation methods, but is run on small sections of an image rather than the entire image at once.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load itkgray&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run ITKGray, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;itkgray&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of ITKGray on Hoffman2.  To see the list of available ITKGray versions, enter:&lt;br /&gt;
 module av itkgray&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of ITKGray, enter (for example):&lt;br /&gt;
 module load itkgray/080128&lt;br /&gt;
&lt;br /&gt;
===ITK-SNAP===&lt;br /&gt;
&lt;br /&gt;
[http://www.itksnap.org/pmwiki/pmwiki.php ITK-SNAP] is a software application used to segment structures in 3D medical images.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load itksnap&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run ITK-SNAP, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;itksnap&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of ITK-SNAP on Hoffman2.  To see the list of available ITK-SNAP versions, enter:&lt;br /&gt;
 module av itksnap&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of ITK-SNAP, enter (for example):&lt;br /&gt;
 module load itksnap/3.4.0.QT4&lt;br /&gt;
&lt;br /&gt;
===MRIcron===&lt;br /&gt;
&lt;br /&gt;
[http://people.cas.sc.edu/rorden/mricron/MRIcron MRIcron] is a cross-platform NIfTI format image viewer. It can load multiple layers of images, generate volume renderings and draw volumes of interest. It also provides dcm2nii for converting DICOM images to NIfTI format and NPM for statistics.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load mricron&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run MRIcron, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mricron&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of MRIcron on Hoffman2.  To see the list of available MRIcron versions, enter:&lt;br /&gt;
 module av mricron&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of MRIcron, enter (for example):&lt;br /&gt;
 module load mricron/20150622&lt;br /&gt;
&lt;br /&gt;
===CCN Scripts===&lt;br /&gt;
Load the &#039;&#039;ccnscripts&#039;&#039; module to run CCN-supported scripts on Hoffman2: setup_subject, setup_subject_2, [[Hoffman2:Scripts:fix_perms.sh|fix_perms.sh]], etc.&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load ccnscripts&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3584</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3584"/>
		<updated>2017-12-04T23:28:40Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* To work with these example scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job|Submit job]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_(tcsh)|Submit job (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray|Submit jobarray]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_(readarray)|Submit jobarray (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Copy the contents of the script template into a new script, e.g. &amp;lt;code&amp;gt;myscript.sh&amp;lt;/code&amp;gt;.  &#039;&#039;Watch out for line ending errors caused by copying/pasting from a Mac or PC.&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix myscript.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*For jobs longer than 24 hours, you must specify the &#039;highp&#039; option, e.g. &amp;lt;code&amp;gt;-l h_rt=36:00:00,h_data=4G,highp&amp;lt;/code&amp;gt;&lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#*Edit the mail notification options: &#039;-m bea&#039; means you want to receive a message when your job Begins, Ends, or Aborts (quits due to an error).  You may use any combination of &#039;b&#039;, &#039;e&#039;, and &#039;a&#039; for this setting.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3583</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3583"/>
		<updated>2017-12-04T23:27:40Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* To work with these example scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job|Submit job]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_(tcsh)|Submit job (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray|Submit jobarray]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_(readarray)|Submit jobarray (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Copy the contents of the script template into a new script, e.g. &amp;lt;code&amp;gt;myscript.sh&amp;lt;/code&amp;gt;.  &#039;&#039;Watch out for line ending errors caused by copying/pasting from a Mac or PC.&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix myscript.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*For jobs longer than 24 hours, you must specify the &#039;highp&#039; option, e.g. &amp;lt;code&amp;gt;-l h_rt=8:00:00,h_data=4G,highp&amp;lt;/code&amp;gt;&lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#*Edit the mail notification options: &#039;-m bea&#039; means you want to receive a message when your job Begins, Ends, or Aborts (quits due to an error).  You may use any combination of &#039;b&#039;, &#039;e&#039;, and &#039;a&#039; for this setting.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Modules&amp;diff=3582</id>
		<title>Hoffman2:Modules</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Modules&amp;diff=3582"/>
		<updated>2017-11-30T22:16:09Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
[https://www.hoffman2.idre.ucla.edu/computing/modules/ Environmental Modules] allow users to dynamically modify their shell environment (e.g., $PATH, $LD_LIBRARY_PATH, etc.) in order to support a number of applications installed on the Hoffman2 Cluster.  CCN supports several modules on Hoffman2 including: AFNI, ANTs, Caret,FSL, FreeSurfer, ITKGray, ITK-SNAP, and MRIcron.&lt;br /&gt;
&lt;br /&gt;
==Enabling the CCN Hoffman2 modules==&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Use &amp;lt;code&amp;gt;gedit&amp;lt;/code&amp;gt; or your favorite [[Text Editors|text editor]] (e.g. nano or vim) to edit the file &amp;lt;code&amp;gt;~/.bashrc&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ gedit ~/.bashrc&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Insert these lines at the &#039;&#039;&#039;bottom&#039;&#039;&#039; of the file&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;module use /u/project/CCN/apps/modulefiles&amp;amp;#10;umask 007&amp;lt;/pre&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Important:&#039;&#039;&#039; remove or comment out this line (if present):&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Remove or comment out this line!&amp;amp;#10;&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;source /u/project/FMRI/apps/etc/profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Save the file&lt;br /&gt;
# Log out of Hoffman2 and the next time you log in, everything will be set for you to start working.&lt;br /&gt;
&lt;br /&gt;
==CCN Hoffman2 modules==&lt;br /&gt;
===AFNI===&lt;br /&gt;
[https://afni.nimh.nih.gov/ AFNI] (Analysis of Functional NeuroImages) is a set of C programs for processing, analyzing, and displaying functional MRI (FMRI) data - a technique for mapping human brain activity.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load afni&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run AFNI, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;afni&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ANTs===&lt;br /&gt;
&lt;br /&gt;
[http://stnava.github.io/ANTs/ ANTs] (Advanced Normalization Tools) computes high-dimensional mappings to capture the statistics of brain structure and function.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load ants&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Please see the [http://stnava.github.io/ANTs/ ANTs website] for usage examples.&lt;br /&gt;
&lt;br /&gt;
===Caret===&lt;br /&gt;
&lt;br /&gt;
[http://brainvis.wustl.edu/wiki/index.php/Caret:About Caret] is a free, open-source, software package for structuraland functional analyses of the cerebral and cerebellar cortex.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load caret&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run Caret, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;caret5&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DCMTK===&lt;br /&gt;
&lt;br /&gt;
[http://www.dcmtk.org/dcmtk.php.en DCMTK] is a collection of libraries and applications implementing large parts the DICOM standard. It includes software for examining, constructing and converting DICOM image files, handling offline media, sending and receiving images over a network connection, as well as demonstrative image storage and worklist servers. &lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load dcmtk&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run (for example) dcmdump, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;dcmdump [options] dcmfile(s)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FSL===&lt;br /&gt;
&lt;br /&gt;
[https://fsl.fmrib.ox.ac.uk/ FSL] is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data..&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load fsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run FSL, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;fsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of FSL on Hoffman2.  To see the list of available FSL versions, enter:&lt;br /&gt;
 module av fsl&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of FSL, enter (for example):&lt;br /&gt;
 module load fsl/5.0.7&lt;br /&gt;
&lt;br /&gt;
===FreeSurfer===&lt;br /&gt;
&lt;br /&gt;
[https://surfer.nmr.mgh.harvard.edu/ FreeSurfer] is an open source software suite for processing and analyzing (human) brain MRI images.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load freesurfer&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run (for example) freeview, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;freeview&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of FreeSurfer on Hoffman2.  To see the list of available FreeSurfer versions, enter:&lt;br /&gt;
 module av freesurfer&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of FreeSurfer, enter (for example):&lt;br /&gt;
 module load freesurfer/5.1.0&lt;br /&gt;
&lt;br /&gt;
===ITKGray===&lt;br /&gt;
&lt;br /&gt;
[https://web.stanford.edu/group/vista/cgi-bin/wiki/index.php/ItkGray ITKGray] is a segmentation tool adapted and developed from ITKSnap by Bob Dougherty. ITKGray is a branch of the ITKSnap project. Bob added functionality from  MrGray-Retired, including topology checking/fixing and a new flood-fill paintbrush that is similar to the MrGray-Retired auto-segmentation methods, but is run on small sections of an image rather than the entire image at once.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load itkgray&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run ITKGray, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;itkgray&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of ITKGray on Hoffman2.  To see the list of available ITKGray versions, enter:&lt;br /&gt;
 module av itkgray&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of ITKGray, enter (for example):&lt;br /&gt;
 module load itkgray/080128&lt;br /&gt;
&lt;br /&gt;
===ITK-SNAP===&lt;br /&gt;
&lt;br /&gt;
[http://www.itksnap.org/pmwiki/pmwiki.php ITK-SNAP] is a software application used to segment structures in 3D medical images.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load itksnap&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run ITK-SNAP, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;itksnap&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of ITK-SNAP on Hoffman2.  To see the list of available ITK-SNAP versions, enter:&lt;br /&gt;
 module av itksnap&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of ITK-SNAP, enter (for example):&lt;br /&gt;
 module load itksnap/3.4.0.QT4&lt;br /&gt;
&lt;br /&gt;
===MRIcron===&lt;br /&gt;
&lt;br /&gt;
[http://people.cas.sc.edu/rorden/mricron/MRIcron MRIcron] is a cross-platform NIfTI format image viewer. It can load multiple layers of images, generate volume renderings and draw volumes of interest. It also provides dcm2nii for converting DICOM images to NIfTI format and NPM for statistics.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load mricron&amp;lt;/pre&amp;gt;&lt;br /&gt;
#To run MRIcron, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mricron&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CCN supports several versions of MRIcron on Hoffman2.  To see the list of available MRIcron versions, enter:&lt;br /&gt;
 module av mricron&lt;br /&gt;
&lt;br /&gt;
To load a non-default version of MRIcron, enter (for example):&lt;br /&gt;
 module load mricron/20150622&lt;br /&gt;
&lt;br /&gt;
===CCN Scripts===&lt;br /&gt;
Load the &#039;&#039;ccnscripts&#039;&#039; module to run CCN-supported scripts on Hoffman2: setup_subject, setup_subject_2, [[Hoffman2:Scripts:fix_perms.sh|fix_perms.sh]], etc.&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Start an [https://www.hoffman2.idre.ucla.edu/computing/interactive-session/ interactive session] on a compute node with qrsh. Then at the compute node shell prompt, enter:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;module load ccnscripts&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3581</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3581"/>
		<updated>2017-11-29T19:36:42Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job|Submit job]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_(tcsh)|Submit job (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray|Submit jobarray]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_(readarray)|Submit jobarray (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Copy the contents of the script template into a new script, e.g. &amp;lt;code&amp;gt;myscript.sh&amp;lt;/code&amp;gt;.  &#039;&#039;Watch out for line ending errors caused by copying/pasting from a Mac or PC.&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix myscript.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#*Edit the mail notification options: &#039;-m bea&#039; means you want to receive a message when your job Begins, Ends, or Aborts (quits due to an error).  You may use any combination of &#039;b&#039;, &#039;e&#039;, and &#039;a&#039; for this setting.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Software_Tools&amp;diff=3580</id>
		<title>Hoffman2:Software Tools</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Software_Tools&amp;diff=3580"/>
		<updated>2017-11-29T19:36:25Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
There is a CCN usergroup on Hoffman2 which is maintained for groups doing Neuroimaging work at UCLA.  Tools like FSL, FreeSurfer, AFNI and Nibabel are maintained for this group separate from normal Hoffman2 programs.  In order to take advantage of these tools, you need to setup your bash profile [[Hoffman2:Profile|properly]].&lt;br /&gt;
&lt;br /&gt;
Below is a list of the available software tools.  We will do our best to update it as changes are made.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==AFNI==&lt;br /&gt;
[http://afni.nimh.nih.gov/afni/ Official Webste]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 2016.10.18-16.3.11 || 2016.11.20 || Current&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==BrainSuite==&lt;br /&gt;
[http://brainsuite.org/ Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 15c || 2016.02.18 || Current&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Caret==&lt;br /&gt;
[http://brainvis.wustl.edu/wiki/index.php/Caret:About Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 5.65 (2012.01.27) || 2013.07.15 || Current, not folded into the main profile&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Chronux==&lt;br /&gt;
[http://www.chronux.org Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 2.10 || 2013.02.26 || Current&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==dcm2nii==&lt;br /&gt;
[http://www.mccauslandcenter.sc.edu/mricro/mricron/dcm2nii.html Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 2013.06.06 || 2014.03.06 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 2011.11.11 || circa 2011 || Current&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==EEGLAB==&lt;br /&gt;
[http://sccn.ucsd.edu/eeglab/ Official Website]&lt;br /&gt;
 &lt;br /&gt;
[http://sccn.ucsd.edu/wiki/EEGLAB_revision_history Release Notes]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 13.1.1b || 2014.01.29 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 12.0.2.5b || 2013.11.14 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 11.0.5.4b || 2013.11.14 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 12.0.0.0b || 2012.12.10 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 11.0.0.0b || 2012.02.21 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 10.2.5.8b || 2012.02.21 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FreeSurfer==&lt;br /&gt;
[http://surfer.nmr.mgh.harvard.edu/ Official Website]&lt;br /&gt;
 &lt;br /&gt;
[http://freesurfer.net/fswiki/ReleaseNotes Release Notes]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot; &lt;br /&gt;
| 5.3.0 || 2013.06.18 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot; &lt;br /&gt;
| 5.2.0 || 2013.03.27 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot; &lt;br /&gt;
| 5.1.0 || 2011.11.14 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot; &lt;br /&gt;
| 5.0.0 || circa 2010 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot; &lt;br /&gt;
| 4.4.0 || circa 2009 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot; &lt;br /&gt;
| 4.0.5 || circa 2008 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FSL==&lt;br /&gt;
[http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/ Official Website]&lt;br /&gt;
 &lt;br /&gt;
[http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/WhatsNew Revision History]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 5.0.7 || 2013.10.17 || Current (2014.10.10-)&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 5.0.6 || 2013.12.18 || (2013.12.18-2014.10.10)&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 5.0.5 || 2013.10.17 || (2013.10.17-2013.12.17)&lt;br /&gt;
|-class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 5.0.4 || 2013.06.18 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 5.0.2 || 2013.02.19 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 5.0.1 || 2012.10.01 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 5.0.0 || 2012.09.14 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 4.1.9 || 2011.12.01 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 4.1.8 || circa 2011.06 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot; &lt;br /&gt;
| 4.1.7 || circa 2011.11 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 4.1.4 || circa 2009 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 4.1.3 || circa 2009 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 4.1.1 || circa 2008 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 4.1.0 || circa 2008 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 4.0.4 || circa 2008 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ITKGray==&lt;br /&gt;
[http://vistalab.stanford.edu/newlm/index.php/ItkGray Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 080803 || 2009.11.19 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 080128 || 2009.11.13 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SPM==&lt;br /&gt;
[http://www.fil.ion.ucl.ac.uk/spm/ Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Last Patch Applied&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Last Checked Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| SPM8 || 5236 || 2014.01 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| SPM5 || Unknown || N/A || No longer supported&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==TrackVis/Diffusion Toolkit==&lt;br /&gt;
[http://trackvis.org/ Official Website 1]&lt;br /&gt;
 &lt;br /&gt;
[http://trackvis.org/dtk/ Official Website 2]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Tool&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Last Checked Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| TrackVis || 0.5.2.2 || 2014.03.06 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| Diffusion Toolkit || 0.6.2.2 || 204.03.06 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==WEKA==&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/ Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 3.7.10 || 2014.03.03 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 3.6.5 || circa 2011.08 ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Python2.7==&lt;br /&gt;
Gentoo Prefix version of Python 2.7.  Site packages listed below were installed using pip unless otherwise noted.&lt;br /&gt;
Installed by pip unless otherwise noted&lt;br /&gt;
===CVXOPT===&lt;br /&gt;
===Cython===&lt;br /&gt;
===Gnuplot===&lt;br /&gt;
===IPython===&lt;br /&gt;
===matplotlib===&lt;br /&gt;
:Installed by Gentoo prefix&lt;br /&gt;
===nibabel===&lt;br /&gt;
===nifti===&lt;br /&gt;
===nimfa===&lt;br /&gt;
:Non-negative Matrix Factorization&lt;br /&gt;
:&lt;br /&gt;
:[http://nimfa.biolab.si/ http://nimfa.biolab.si/]&lt;br /&gt;
===nipype===&lt;br /&gt;
===nose===&lt;br /&gt;
===numpy===&lt;br /&gt;
===(p)lsa===&lt;br /&gt;
:(probabilistic) Latent Semantic Analysis.  Failed its tests.py though.&lt;br /&gt;
&lt;br /&gt;
:[http://www.mblondel.org/journal/2010/06/13/lsa-and-plsa-in-python/ http://www.mblondel.org/journal/2010/06/13/lsa-and-plsa-in-python/]&lt;br /&gt;
===pydicom===&lt;br /&gt;
===pygments===&lt;br /&gt;
===PyMF===&lt;br /&gt;
:python Matrix Factorization Module.  Failed its tests though.&lt;br /&gt;
&lt;br /&gt;
:[http://pymf.googlecode.com http://pymf.googlecode.com]&lt;br /&gt;
===pypr===&lt;br /&gt;
===PyQt4===&lt;br /&gt;
===pytz===&lt;br /&gt;
===pywt===&lt;br /&gt;
===pyximport===&lt;br /&gt;
===scikits===&lt;br /&gt;
===scipy===&lt;br /&gt;
===sklearn===&lt;br /&gt;
===sparsesvd===&lt;br /&gt;
:Singular Value Decomposition.  Passed both tests.&lt;br /&gt;
&lt;br /&gt;
:[http://pypi.python.org/pypi/sparsesvd http://pypi.python.org/pypi/sparsesvd]&lt;br /&gt;
===sphinx===&lt;br /&gt;
===sympy===&lt;br /&gt;
===traits===&lt;br /&gt;
===virtualenv===&lt;br /&gt;
===xcbgen===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GCC==&lt;br /&gt;
==LAPACK==&lt;br /&gt;
==BLAS==&lt;br /&gt;
==GLIB==&lt;br /&gt;
==C++==&lt;br /&gt;
==CMake==&lt;br /&gt;
==CPACK==&lt;br /&gt;
==MPI Kmeans==&lt;br /&gt;
See this website for how to cite using the MPI Kmeans tool.&lt;br /&gt;
[http://mloss.org/software/view/48/]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Software_Tools&amp;diff=3579</id>
		<title>Hoffman2:Software Tools</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Software_Tools&amp;diff=3579"/>
		<updated>2017-11-29T19:36:13Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
There is an CCN usergroup on Hoffman2 which is maintained for groups doing Neuroimaging work at UCLA.  Tools like FSL, FreeSurfer, AFNI and Nibabel are maintained for this group separate from normal Hoffman2 programs.  In order to take advantage of these tools, you need to setup your bash profile [[Hoffman2:Profile|properly]].&lt;br /&gt;
&lt;br /&gt;
Below is a list of the available software tools.  We will do our best to update it as changes are made.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==AFNI==&lt;br /&gt;
[http://afni.nimh.nih.gov/afni/ Official Webste]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 2016.10.18-16.3.11 || 2016.11.20 || Current&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==BrainSuite==&lt;br /&gt;
[http://brainsuite.org/ Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 15c || 2016.02.18 || Current&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Caret==&lt;br /&gt;
[http://brainvis.wustl.edu/wiki/index.php/Caret:About Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 5.65 (2012.01.27) || 2013.07.15 || Current, not folded into the main profile&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Chronux==&lt;br /&gt;
[http://www.chronux.org Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 2.10 || 2013.02.26 || Current&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==dcm2nii==&lt;br /&gt;
[http://www.mccauslandcenter.sc.edu/mricro/mricron/dcm2nii.html Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 2013.06.06 || 2014.03.06 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 2011.11.11 || circa 2011 || Current&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==EEGLAB==&lt;br /&gt;
[http://sccn.ucsd.edu/eeglab/ Official Website]&lt;br /&gt;
 &lt;br /&gt;
[http://sccn.ucsd.edu/wiki/EEGLAB_revision_history Release Notes]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 13.1.1b || 2014.01.29 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 12.0.2.5b || 2013.11.14 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 11.0.5.4b || 2013.11.14 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 12.0.0.0b || 2012.12.10 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 11.0.0.0b || 2012.02.21 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 10.2.5.8b || 2012.02.21 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FreeSurfer==&lt;br /&gt;
[http://surfer.nmr.mgh.harvard.edu/ Official Website]&lt;br /&gt;
 &lt;br /&gt;
[http://freesurfer.net/fswiki/ReleaseNotes Release Notes]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot; | Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot; &lt;br /&gt;
| 5.3.0 || 2013.06.18 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot; &lt;br /&gt;
| 5.2.0 || 2013.03.27 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot; &lt;br /&gt;
| 5.1.0 || 2011.11.14 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot; &lt;br /&gt;
| 5.0.0 || circa 2010 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot; &lt;br /&gt;
| 4.4.0 || circa 2009 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot; &lt;br /&gt;
| 4.0.5 || circa 2008 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FSL==&lt;br /&gt;
[http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/ Official Website]&lt;br /&gt;
 &lt;br /&gt;
[http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/WhatsNew Revision History]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 5.0.7 || 2013.10.17 || Current (2014.10.10-)&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 5.0.6 || 2013.12.18 || (2013.12.18-2014.10.10)&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 5.0.5 || 2013.10.17 || (2013.10.17-2013.12.17)&lt;br /&gt;
|-class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 5.0.4 || 2013.06.18 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 5.0.2 || 2013.02.19 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 5.0.1 || 2012.10.01 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 5.0.0 || 2012.09.14 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 4.1.9 || 2011.12.01 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 4.1.8 || circa 2011.06 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot; &lt;br /&gt;
| 4.1.7 || circa 2011.11 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 4.1.4 || circa 2009 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 4.1.3 || circa 2009 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 4.1.1 || circa 2008 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 4.1.0 || circa 2008 ||&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 4.0.4 || circa 2008 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ITKGray==&lt;br /&gt;
[http://vistalab.stanford.edu/newlm/index.php/ItkGray Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 080803 || 2009.11.19 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 080128 || 2009.11.13 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SPM==&lt;br /&gt;
[http://www.fil.ion.ucl.ac.uk/spm/ Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Last Patch Applied&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Last Checked Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| SPM8 || 5236 || 2014.01 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| SPM5 || Unknown || N/A || No longer supported&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==TrackVis/Diffusion Toolkit==&lt;br /&gt;
[http://trackvis.org/ Official Website 1]&lt;br /&gt;
 &lt;br /&gt;
[http://trackvis.org/dtk/ Official Website 2]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Tool&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Last Checked Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| TrackVis || 0.5.2.2 || 2014.03.06 || &lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| Diffusion Toolkit || 0.6.2.2 || 204.03.06 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==WEKA==&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/ Official Website]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Version Number&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Install Date&lt;br /&gt;
! class=&amp;quot;ccn-table-header&amp;quot;| Notes&lt;br /&gt;
|- class=&amp;quot;ccn-table-odd&amp;quot;&lt;br /&gt;
| 3.7.10 || 2014.03.03 || Current&lt;br /&gt;
|- class=&amp;quot;ccn-table-even&amp;quot;&lt;br /&gt;
| 3.6.5 || circa 2011.08 ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==Python2.7==&lt;br /&gt;
Gentoo Prefix version of Python 2.7.  Site packages listed below were installed using pip unless otherwise noted.&lt;br /&gt;
Installed by pip unless otherwise noted&lt;br /&gt;
===CVXOPT===&lt;br /&gt;
===Cython===&lt;br /&gt;
===Gnuplot===&lt;br /&gt;
===IPython===&lt;br /&gt;
===matplotlib===&lt;br /&gt;
:Installed by Gentoo prefix&lt;br /&gt;
===nibabel===&lt;br /&gt;
===nifti===&lt;br /&gt;
===nimfa===&lt;br /&gt;
:Non-negative Matrix Factorization&lt;br /&gt;
:&lt;br /&gt;
:[http://nimfa.biolab.si/ http://nimfa.biolab.si/]&lt;br /&gt;
===nipype===&lt;br /&gt;
===nose===&lt;br /&gt;
===numpy===&lt;br /&gt;
===(p)lsa===&lt;br /&gt;
:(probabilistic) Latent Semantic Analysis.  Failed its tests.py though.&lt;br /&gt;
&lt;br /&gt;
:[http://www.mblondel.org/journal/2010/06/13/lsa-and-plsa-in-python/ http://www.mblondel.org/journal/2010/06/13/lsa-and-plsa-in-python/]&lt;br /&gt;
===pydicom===&lt;br /&gt;
===pygments===&lt;br /&gt;
===PyMF===&lt;br /&gt;
:python Matrix Factorization Module.  Failed its tests though.&lt;br /&gt;
&lt;br /&gt;
:[http://pymf.googlecode.com http://pymf.googlecode.com]&lt;br /&gt;
===pypr===&lt;br /&gt;
===PyQt4===&lt;br /&gt;
===pytz===&lt;br /&gt;
===pywt===&lt;br /&gt;
===pyximport===&lt;br /&gt;
===scikits===&lt;br /&gt;
===scipy===&lt;br /&gt;
===sklearn===&lt;br /&gt;
===sparsesvd===&lt;br /&gt;
:Singular Value Decomposition.  Passed both tests.&lt;br /&gt;
&lt;br /&gt;
:[http://pypi.python.org/pypi/sparsesvd http://pypi.python.org/pypi/sparsesvd]&lt;br /&gt;
===sphinx===&lt;br /&gt;
===sympy===&lt;br /&gt;
===traits===&lt;br /&gt;
===virtualenv===&lt;br /&gt;
===xcbgen===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GCC==&lt;br /&gt;
==LAPACK==&lt;br /&gt;
==BLAS==&lt;br /&gt;
==GLIB==&lt;br /&gt;
==C++==&lt;br /&gt;
==CMake==&lt;br /&gt;
==CPACK==&lt;br /&gt;
==MPI Kmeans==&lt;br /&gt;
See this website for how to cite using the MPI Kmeans tool.&lt;br /&gt;
[http://mloss.org/software/view/48/]&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3578</id>
		<title>Hoffman2:Submit jobarray (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3578"/>
		<updated>2017-11-29T19:33:35Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In this example, subjects are read in from a subjects.txt file. subjects.txt is a text file with a single subject ID on each line.  &#039;&#039;Watch out for line ending errors caused by copying/pasting from a Mac or PC.&#039;&#039;   Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix subjects.txt&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-16:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
&lt;br /&gt;
# Load the FSL module&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
readarray -t subjects &amp;lt; subjects.txt&lt;br /&gt;
(( i=$SGE_TASK_ID - 1 ))&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$i]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submitting_Jobs&amp;diff=3577</id>
		<title>Hoffman2:Submitting Jobs</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submitting_Jobs&amp;diff=3577"/>
		<updated>2017-11-29T19:28:46Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
If you remember from [[Hoffman2:Introduction#Sun Grid Engine|Anatomy of the Computing Cluster]], the Univa Grid Engine on Hoffman2 is the scheduler for all computing jobs.  It takes your computing job request, considers what resources you are asking for and then puts your job in a line waiting for those resources to become available.&lt;br /&gt;
&lt;br /&gt;
Ask for a simple 1GB of memory and a single computing core with a short time window, and your job will likely get placed at the front of the line and start running soon if not immediately. &lt;br /&gt;
&lt;br /&gt;
Ask for a lot of memory or many computing cores, and your job will get put further back in the line because it will have to wait for more things to become available. Ask for too little RAM or too little time and your job will be killed or end prematurely leaving you with no results to examine.&lt;br /&gt;
&lt;br /&gt;
= Job Submission Templates =&lt;br /&gt;
Please use these [[Hoffman2:Job_Submission_Templates|job submission template scripts]] to simplify job submission.&lt;br /&gt;
&lt;br /&gt;
=Job Submission Types=&lt;br /&gt;
&lt;br /&gt;
So how does one submit a computing job request?  You&#039;ve got some options:&lt;br /&gt;
# &#039;&#039;&#039;job.q&#039;&#039;&#039;&lt;br /&gt;
#: Use a simple tool that IDRE wrote.  It has a menu and walks you through submitting things.&lt;br /&gt;
# &#039;&#039;&#039;qsub&#039;&#039;&#039;&lt;br /&gt;
#: Get under the hood and do it yourself.  It can get messy but it can also be faster and you have more flexibility with options.&lt;br /&gt;
# &#039;&#039;&#039;command files&#039;&#039;&#039;&lt;br /&gt;
#: You&#039;ve graduated to a higher level of operations, but we can help you get there with examples of our own command files.&lt;br /&gt;
# &#039;&#039;&#039;job arrays&#039;&#039;&#039;&lt;br /&gt;
#: You&#039;ve got a lot of repetitive tasks to run, these will be your friend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--==Aggregating Output Files==&lt;br /&gt;
By default, whenever you submit a job, the standard output and error files get created in whichever directory you submitted the job from unless you tell qsub differently with the &amp;quot;-o&amp;quot; and &amp;quot;-e&amp;quot; arguments.  &#039;&#039;&#039;This can be very annoying when trying to reduce your file count as output files can be everywhere.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is how you can avoid running around looking for these files:&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Use your favorite [[Text Editors|text editor]] to edit the file &amp;lt;code&amp;gt;~/.sge_request&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ vim ~/.sge_request&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ emacs ~/.sge_request&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Insert this line into the file&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;-o $HOME/job-output-files/&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; - capital A - to go to the end of the line and enter insert mode&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#: [[Text Editors#Emacs (H2)(OSX)|Emacs]]&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
# Save the file&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;ESC + &amp;quot;:wq&amp;quot; + ENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs command line]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs GUI]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c, y&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* or use the menu system&lt;br /&gt;
# Now use the following command to create the special directory that will receive all of the output and error files for the jobs you run.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mkdir ~/job-output-files&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make an edit to your ~/.bash_profile so that you can run [[Hoffman2:Interactive Sessions]] without a problem&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ vim ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ emacs ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Insert this line at the &#039;&#039;&#039;bottom&#039;&#039;&#039; of the file&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;alias qrsh=&#039;qrsh -o /dev/null&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;G&amp;lt;/code&amp;gt; - capital G - to go to the end of the file&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; - capital A - to go to the end of the line and enter insert mode&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt; - to insert a newline&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#: [[Text Editors#Emacs (H2)(OSX)|Emacs]]&lt;br /&gt;
#:* Use the arrow keys to scroll the cursor down to the bottom of the document and add a newline.&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
# Save the file&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;ESC + &amp;quot;:wq&amp;quot; + ENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs command line]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs GUI]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c, y&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* or use the menu system --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==job.q==&lt;br /&gt;
Once you&#039;ve identified or written a script you&#039;d like to run, [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]] and enter &amp;lt;code&amp;gt;job.q&amp;lt;/code&amp;gt;.  Then it is just a matter of following its step-by-step instructions.&lt;br /&gt;
&lt;br /&gt;
From the tool&#039;s main menu, you can type &#039;&#039;Info&#039;&#039; to read up about how to use it and we highly encourage you to do so.&lt;br /&gt;
&lt;br /&gt;
But we know patience is a virtue that most of us aren&#039;t blessed with.  So we&#039;ll walk you through submitting a basic job so you can hit the ground running.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
# Once on Hoffman2, you&#039;ll need to edit one file so pull out your favorite [[Text Editors|text editor]] and edit the file&lt;br /&gt;
#: &amp;lt;pre&amp;gt;~/.queuerc&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Add the line&lt;br /&gt;
#: &amp;lt;pre&amp;gt;set qqodir = ~/job-output&amp;lt;/pre&amp;gt;&lt;br /&gt;
# You&#039;ve just set the default directory where your job command files will be created. Save the configuration file and close your text editor.&lt;br /&gt;
# Make that directory using the command&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ mkdir ~/job-output&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now execute&lt;br /&gt;
#:&amp;lt;pre&amp;gt;$ job.q&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Press enter to acknowledge the message about some files that get created (READ IT FIRST THOUGH).&lt;br /&gt;
# Type &#039;&#039;Build &amp;lt;ENTER&amp;gt;&#039;&#039; to begin creating an SGE command file.&lt;br /&gt;
# The program now asks you which script you&#039;d like to run, enter the following text to use our example script&lt;br /&gt;
#: &amp;lt;pre&amp;gt;/u/project/CCN/apps/examples/qsub/gather.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
# The program now asks how much memory the job will need (in [http://en.wikipedia.org/wiki/Megabyte Megabytes]).  This script is really simple, so let&#039;s go with the minimum and enter &#039;&#039;64&#039;&#039;.&lt;br /&gt;
# The program now asks how long will the job take (in hours). Go with the minimum 1 hour; it will complete in much less than this.&lt;br /&gt;
# The program now asks if your job should be limited to only your resource group&#039;s cores. Answer &#039;&#039;n&#039;&#039; because you do not need to be limiting yourself here and the job is not going to be running for more than 24 hours.&lt;br /&gt;
# Soon, the program will tell you that &#039;&#039;gather.sh.cmd&#039;&#039; has been built and saved.&lt;br /&gt;
# When it asks you if you would like to submit your job, say no.  Then type &#039;&#039;Quit &amp;lt;ENTER&amp;gt;&#039;&#039; to leave the program.&lt;br /&gt;
# Now you should be able to run&lt;br /&gt;
#: &amp;lt;pre&amp;gt;ls ~/job-output&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: and see &#039;&#039;gather.sh.cmd&#039;&#039;.  This file will stay there until you delete it and can be run over and over again.  Making a command file like this is especially useful if there is a task you&#039;ll be running repeatedly on Hoffman2.  But if this is something you only need to run once, you should delete the file so you don&#039;t needlessly approach your [[Hoffman2:Quotas|quota]].&lt;br /&gt;
# The time has come to actually run the program (thought we&#039;d never get to that, didn&#039;t you?). Type&lt;br /&gt;
#: &amp;lt;pre&amp;gt;qsub job-output/gather.sh.cmd&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: and after hitting enter, a message similar to this will pop up:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;Your job 1882940 (&amp;quot;gather.sh.cmd&amp;quot;) has been submitted&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where the number is your JobID, a unique numerical identifier for the computer job you have submitted to the queue.&lt;br /&gt;
# Now you can check if the job has finished running by doing&lt;br /&gt;
#: &amp;lt;pre&amp;gt;ls ~/job-output&amp;lt;/pre&amp;gt;&lt;br /&gt;
# When two files named &#039;&#039;gather.sh.output.[JOBID]&#039;&#039; and &#039;&#039;gather.sh.joblog.[JOBID]&#039;&#039; (where JOBID is your job&#039;s unique identifier) appear, your job has run.&lt;br /&gt;
#: &#039;&#039;gather.sh.output.[JOBID]&#039;&#039;&lt;br /&gt;
#:: This file has all the standard output generated by your script.  In this case it will just have the line&lt;br /&gt;
#::: &#039;&#039;Standard output would appear here.&#039;&#039;&lt;br /&gt;
#: &#039;&#039;gather.sh.joblog.[JOBID]&#039;&#039;&lt;br /&gt;
#:: This file has all the details about when, where, and how your job was processed. Useful information if you are going to be running this job over and over and need to fine tune the resources it uses.&lt;br /&gt;
# Better ways of checking on your job can be found [[Hoffman2:Monitoring Jobs|here]].&lt;br /&gt;
# The script you ran is an aggregator.  It looks in a list of directories, each assumed to contain a specifically named file, and gathers the contents of each of those files into one central file in your home directory.  This file is named &#039;&#039;gather-[TIMESTAMP].txt&#039;&#039; where TIMESTAMP is when the script was run and follows [http://en.wikipedia.org/wiki/ISO_8601 ISO 8601] style encoding. You are encouraged to type&lt;br /&gt;
#: &amp;lt;pre&amp;gt;/u/project/CCN/apps/examples/qsub/gather.sh -h&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: or&lt;br /&gt;
#: &amp;lt;pre&amp;gt;/u/project/CCN/apps/examples/qsub/gather.sh --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to see how this script works.&lt;br /&gt;
# Finally, go check the inbox of the email you used to sign up for your Hoffman2 account.  There will be two emails from &amp;quot;root@mail.hoffman2.idre.ucla.edu&amp;quot; that indicate when the job was started and when the job was completed.  This is one of the neat features of the queue so that you can be alerted about the progress of your job without having to stay logged into Hoffman2 and checking on it constantly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==qsub==&lt;br /&gt;
Everything that job.q did can be done on the command line.  And it can be done better.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Run the command:&lt;br /&gt;
 $ qsub -cwd -V -N J1 -l h_data=64M,h_rt=00:05:00 -M $USER -m bea /u/project/CCN/apps/examples/qsub/gather.sh&lt;br /&gt;
&lt;br /&gt;
And something like the following will be printed out:&lt;br /&gt;
 Your job 1875395 (&amp;quot;J1&amp;quot;) has been submitted&lt;br /&gt;
&lt;br /&gt;
Where the number is your JOBID, a unique numerical identifier for your job.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s break down the arguments in that command.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-cwd&amp;lt;/code&amp;gt;&lt;br /&gt;
: Change working directory&lt;br /&gt;
: When your script runs, change the working directory to where you currently are in the filesystem.&lt;br /&gt;
:: e.g. If you were in the director /u/home/mscohen/data/ when you ran the command, the queue will change directories to that location and then execute the script you gave it.  This means output and error directories will be placed here for that job.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-V&amp;lt;/code&amp;gt;&lt;br /&gt;
: Export environment variables&lt;br /&gt;
: Exports all the environment variables to the context of the job.  Useful if you have extra environment variables that are needed in your script.&lt;br /&gt;
:: e.g. If you had defined the variable SUBJECT_ID in your session on Hoffman2 (&amp;lt;code&amp;gt;export SUBJECT_ID=42&amp;lt;/code&amp;gt;) before submitting a job and that variable was called on by your script, then you would need to use this flag.  Tools like FreeSurfer look for certain environment variables to be set.&lt;br /&gt;
 &lt;br /&gt;
;&amp;lt;code&amp;gt;-N J1&amp;lt;/code&amp;gt;&lt;br /&gt;
: Name my job&lt;br /&gt;
: Names your job &amp;quot;J1.&amp;quot;  When you [[Hoffman2:Monitoring Jobs#qstat|look at the queue]], this will be the text that shows up in the &amp;quot;name&amp;quot; column.  This will also be the beginning of the output (&amp;lt;code&amp;gt;J1.o[JOBID]&amp;lt;/code&amp;gt;) and error (&amp;lt;code&amp;gt;J1.e[JOBID]&amp;lt;/code&amp;gt;) files for your job.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-l h_data=64M,time=00:05:00&amp;lt;/code&amp;gt;&lt;br /&gt;
: Resource allocation (that&#039;s a lower case &amp;quot;elle&amp;quot;)&lt;br /&gt;
: This is the resources flag meaning that the text immediately after it will ask for things like:&lt;br /&gt;
:* certain amount of memory, in [http://en.wikipedia.org/wiki/Megabyte Megabytes], or [http://en.wikipedia.org/wiki/Gigabyte Gigabytes]&lt;br /&gt;
:** h_data=64M (64 MB RAM) or h_data=1G (1 GB RAM)&lt;br /&gt;
&amp;lt;!-- :** &amp;quot;mem&amp;quot; no longer works --&amp;gt;&lt;br /&gt;
: If your job uses more RAM than it requested, your job WILL be killed in order to avoid it hurting other jobs running on the same node. It is imperative that you set this RAM request properly.&lt;br /&gt;
:* certain length of computing time, in the form HH:MM:SS&lt;br /&gt;
:** h_rt=00:05:00&amp;lt;!--    or&lt;br /&gt;
:** time=00:05:00 --&amp;gt;&lt;br /&gt;
: In this case the script will complete its task rapidly, hence we are only asking for 5 minutes of computing time.&lt;br /&gt;
&amp;lt;!--:* queue type, only a few options here&lt;br /&gt;
:** [http://www.ats.ucla.edu/clusters/hoffman2/computing/batch/policies.htm#express express]&lt;br /&gt;
:**: Time limit of 2 hours, and it tends to be overloaded so it isn&#039;t recommended--&amp;gt;&lt;br /&gt;
:* [http://www.ats.ucla.edu/clusters/hoffman2/computing/batch/policies.htm#highp highp]&lt;br /&gt;
:**: Job length maximum of 14 days but can only be run on nodes belonging to your resource group (type &amp;lt;code&amp;gt;mygroup&amp;lt;/code&amp;gt; to see what type of resources you have available). If you are in the ccn group on Hoffman2, you have access to some of these highp nodes.&lt;br /&gt;
&amp;lt;!--:** [blank] (nothing, nada, zilch)&lt;br /&gt;
:**: [http://www.ats.ucla.edu/clusters/hoffman2/computing/batch/policies.htm#day Standard queue], which has a maximum job length of 24 hours--&amp;gt;&lt;br /&gt;
&amp;lt;!--: In this case, we are asking to be put on the express queue since this is such a short job, but the standard queue would have worked just as well if not better.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-M $USER&amp;lt;/code&amp;gt;&lt;br /&gt;
: Define mailing list&lt;br /&gt;
: This defines the user that will be mailed if email updates are requested.  The default address is that of the job-owner.&lt;br /&gt;
:: e.g. In this case, the email will be sent to the address on file for the user.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-m bea&amp;lt;/code&amp;gt;&lt;br /&gt;
: Define mailing rules&lt;br /&gt;
: This defines when Hoffman2 should email you about your job.  There are five options here&lt;br /&gt;
:* b - when the job begins&lt;br /&gt;
:* e - when the job ends&lt;br /&gt;
:* a - when the job is aborted (ends in an error state)&lt;br /&gt;
&amp;lt;!--:* s - when the job is suspended&lt;br /&gt;
:* n - never&lt;br /&gt;
: The first four can be used in any combination, but the last obviously nullifies the others.&lt;br /&gt;
&lt;br /&gt;
There are many other flags that you could use, but these are the basics that will get you through most of your computing.  Feel free to explore the others in the [http://www.ats.ucla.edu/clusters/common/computing/batch/man_submit.htm qsub Man page].--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command Files==&lt;br /&gt;
Typing accurately can be difficult at times, so why put yourself through the trouble of having to retype the same arguments over and over if you will always be using about the same values?  Enter command files.&lt;br /&gt;
&lt;br /&gt;
You already have experience making a command file (~/job-output/gather.sh.cmd) from when you used the tool &amp;lt;code&amp;gt;job.q&amp;lt;/code&amp;gt;.  But did you know that you can edit that command file to make changes to how it runs, or write your own?&lt;br /&gt;
&lt;br /&gt;
The command files generated by &amp;lt;code&amp;gt;job.q&amp;lt;/code&amp;gt; are fairly well commented, so if you take a look at them with your favorite [Text Editors|text editor] you should be able to change their behavior.  For instance, if you go into the command file from the job.q example, find the lines that say&lt;br /&gt;
 #  Notify at beginning and end of job&lt;br /&gt;
 #$ -m bea&lt;br /&gt;
You recognize that this is the flag about when to send email messages.  Go ahead and change this to&lt;br /&gt;
 # Notify at the end and on abort&lt;br /&gt;
 #$ -m ae&lt;br /&gt;
And you should only receive one email when your job finishes.&lt;br /&gt;
&amp;lt;!--===q.sh===&lt;br /&gt;
You could make a generic command file that contains all the basic flags that you care about.  We&#039;ve even got an example ready and available for you at&lt;br /&gt;
/u/project/CCN/apps/examples/qsub/q.sh&lt;br /&gt;
The script contents are shown below:&lt;br /&gt;
 qsub &amp;lt;&amp;lt;CMD&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # Use current working directory&lt;br /&gt;
 #$ -cwd&lt;br /&gt;
 # Error stream is merged with the standard output&lt;br /&gt;
 #$ -j y&lt;br /&gt;
 # Use the bash shell for job execution&lt;br /&gt;
 #$ -S /bin/bash&lt;br /&gt;
 # Use your normal environment variables in the job&lt;br /&gt;
 #$ -V&lt;br /&gt;
 # Use 1GB of RAM and the main queue, with a maximum of 2 hours computing time&lt;br /&gt;
 #$ -l h_data=1024M,h_rt=2:00:00&lt;br /&gt;
 $@&lt;br /&gt;
 CMD&lt;br /&gt;
To use this command file to submit the &#039;&#039;gather.sh&#039;&#039; example script, you would execute the command:&lt;br /&gt;
 $ q.sh gather.sh&lt;br /&gt;
You can do this because if you have [[Hoffman2:Software Tools#Setting Up Your Account to Access the Tools|set up your Bash profile correctly]], they are in your [[Hoffman2:UNIX Tutorial#PATH|Unix PATH variable]].  You can replace &#039;&#039;gather.sh&#039;&#039; with any script you want executed and it will be submitted as a job on the cluster.  We recommend that you make your own copy of &#039;&#039;q.sh&#039;&#039; and keep it in your local &#039;&#039;bin&#039;&#039; directory (~/bin) so that you can edit it to suit your needs.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Job Arrays==&lt;br /&gt;
There is an SGE qsub argument that allows you to submit multiple jobs in parallel that use the same script.  It is&lt;br /&gt;
 -t lower-upper:interval&lt;br /&gt;
where&lt;br /&gt;
;&amp;lt;code&amp;gt;lower&amp;lt;/code&amp;gt;&lt;br /&gt;
: is replaced with the starting number&lt;br /&gt;
;&amp;lt;code&amp;gt;upper&amp;lt;/code&amp;gt;&lt;br /&gt;
: is replaced with the ending number&lt;br /&gt;
;&amp;lt;code&amp;gt;interval&amp;lt;/code&amp;gt;&lt;br /&gt;
: is replaced with the step interval&lt;br /&gt;
So adding the argument&lt;br /&gt;
 -t 10-100:5&lt;br /&gt;
will step through the numbers 10, 15, 20, 25, ..., 100 submitting a job for each one.&lt;br /&gt;
&lt;br /&gt;
In jobs that are called with this flag, there will be an [[Hoffman2:UNIX Tutorial#Environment Variables|environment variable]] called &amp;lt;code&amp;gt;SGE_TASK_ID&amp;lt;/code&amp;gt; whose value will be incremented over the range you specified.  Each possible value of SGE_TASK_ID will be submitted as its own job, so your work will be parallelized.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;!--Why would anyone use this?  Here are some examples&lt;br /&gt;
&lt;br /&gt;
====Lots of numbers====--&amp;gt;&lt;br /&gt;
Let&#039;s say you have a script, &#039;&#039;&#039;myFunc.sh&#039;&#039;&#039;, that takes one numerical input and computes a bunch of values based on that input.  But you need to run &amp;lt;code&amp;gt;myFunc.sh&amp;lt;/code&amp;gt; for input values 1 to 100.  One solution would be to write a wrapper script &#039;&#039;&#039;myFuncSlowWrapper.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFuncSlowWrapper.sh&lt;br /&gt;
 for i in {1..100};&lt;br /&gt;
 do&lt;br /&gt;
     myFunc.sh $i;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
The only drawback is that this will take quite a while since all 100 iterations will be done on a single processor.  With job arrays, the computations will be split among many processors and can finish much more quickly.  You would instead write a wrapper script called &#039;&#039;&#039;myFuncFastWrapper.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFuncFastWrapper.sh&lt;br /&gt;
 echo $SGE_TASK_ID&lt;br /&gt;
 myFunc.sh $SGE_TASK_ID&lt;br /&gt;
&lt;br /&gt;
And submit it with&lt;br /&gt;
 qsub -cwd -V -N PJ -l h_data=1024M,h_rt=01:00:00 -M $HOME -m bea -t 1-100:1 myFuncWrapper.sh&lt;br /&gt;
 &amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
====Lots of files====&lt;br /&gt;
Let&#039;s say you have a script, &#039;&#039;&#039;myFunc2.sh&#039;&#039;&#039;, that takes the name of a file as input and opens that file and runs a bunch of computations on its contents.  But you have 100 such files to process.  One solution would be to write a wrapper script &#039;&#039;&#039;myFunc2SlowWrapper.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFunc2SlowWrapper.sh&lt;br /&gt;
 for FILE in `ls dir/of/files`;&lt;br /&gt;
 do&lt;br /&gt;
     myFunc2.sh $FILE&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
But this will take quite a while since all 100 iterations will be done on a single processor. With job arrays, the computations will be split among many processors since they are submitted as their own jobs and can finish much more quickly.  You could instead create a file that contains a list of all 100 files that need to be processed and call it &#039;&#039;&#039;filesToProcess&#039;&#039;&#039;. Then write a wrapper script called &#039;&#039;&#039;myFunc2FastWrapper.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFunc2FastWrapper.sh&lt;br /&gt;
 echo $SGE_TASK_ID&lt;br /&gt;
 myFunc2.sh `sed -n ${SGE_TASK_ID}p /path/to/list/of/files`&lt;br /&gt;
&lt;br /&gt;
where you replace &#039;&#039;/path/to/list/of/file&#039;&#039; with the path to &#039;&#039;&#039;fileToProcess&#039;&#039;&#039;.  The code&lt;br /&gt;
 `sed -n ${SGE_TASK_ID}p /path/to/list/of/files`&lt;br /&gt;
uses &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt; to grab the ${SGE_TASK_ID}&#039;th line from the file &#039;&#039;&#039;/path/to/list/of/files&#039;&#039;&#039; and returns it (thanks to the tick marks, &amp;lt;code&amp;gt;SHIFT + ~&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you&#039;d submit it with&lt;br /&gt;
 qsub -cwd -V -N PJ -l h_data=1024M,h_rt=01:00:00 -M $USER -m bea -t 1-100:1 myFunc2Wrapper.sh&lt;br /&gt;
&lt;br /&gt;
If your files were named regularly with a &#039;-number&#039; at the end (e.g. &#039;file-1&#039;, &#039;file-2&#039;, &#039;file-3&#039;, ... &#039;file-n&#039;), you could just make &#039;&#039;&#039;myFunc2FastWrapperB.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFunc2FastWrapperB.sh&lt;br /&gt;
 echo $SGE_TASK_ID&lt;br /&gt;
 myFunc2.sh file-${SGE_TASK_ID}&lt;br /&gt;
and submit it the same way. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ==External Links==&lt;br /&gt;
*[http://www.ats.ucla.edu/clusters/common/computing/batch/man_submit.htm qsub Man page]&lt;br /&gt;
*[http://www.ats.ucla.edu/clusters/hoffman2/computing/batch/policies.htm Hoffman2 Types of Queues] --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3576</id>
		<title>Hoffman2:Submit jobarray (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3576"/>
		<updated>2017-11-29T19:27:38Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In this example, subjects are read in from a subjects.txt file. subjects.txt is a text file with a single subject ID on each line.  &#039;&#039;Watch out for line ending errors caused by copying/pasting from a Mac or PC.&#039;&#039;   Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix myscript.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-16:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
&lt;br /&gt;
# Load the FSL module&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
readarray -t subjects &amp;lt; subjects.txt&lt;br /&gt;
(( i=$SGE_TASK_ID - 1 ))&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$i]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3575</id>
		<title>Hoffman2:Submit jobarray (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3575"/>
		<updated>2017-11-29T19:27:26Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In this example, subjects are read in from a subjects.txt file. subjects.txt is a text file with a single subject ID on each line.  &#039;&#039;&#039;Watch out for line ending errors caused by copying/pasting from a Mac or PC.&#039;&#039;   Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix myscript.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-16:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
&lt;br /&gt;
# Load the FSL module&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
readarray -t subjects &amp;lt; subjects.txt&lt;br /&gt;
(( i=$SGE_TASK_ID - 1 ))&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$i]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3574</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3574"/>
		<updated>2017-11-29T19:26:49Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job|Submit job]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_(tcsh)|Submit job (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray|Submit jobarray]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_(readarray)|Submit jobarray (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Copy the contents of the script template into a new script, e.g. &amp;lt;code&amp;gt;myscript.sh&amp;lt;/code&amp;gt;.  &#039;&#039;Watch out for line ending errors caused by copying/pasting from a Mac or PC.&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix myscript.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#*Edit the mail notification options: &#039;-m bea&#039; means you want to receive a message when your job Begins, Ends, or Aborts (quits due to an error).  You may use any combination of &#039;b&#039;, &#039;e&#039;, and &#039;a&#039; for this setting.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3573</id>
		<title>Hoffman2:Submit jobarray (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3573"/>
		<updated>2017-11-29T19:25:32Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In this example, subjects are read in from a subjects.txt file. subjects.txt is a text file with a single subject ID on each line.  &#039;&#039;&#039;Watch out for non-Linux (Mac or PC) line endings.&#039;&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix myscript.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-16:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
&lt;br /&gt;
# Load the FSL module&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
readarray -t subjects &amp;lt; subjects.txt&lt;br /&gt;
(( i=$SGE_TASK_ID - 1 ))&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$i]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3572</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3572"/>
		<updated>2017-11-29T19:25:23Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* To work with these example scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job|Submit job]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_(tcsh)|Submit job (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray|Submit jobarray]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_(readarray)|Submit jobarray (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Copy the contents of the script template into a new script, e.g. &amp;lt;code&amp;gt;myscript.sh&amp;lt;/code&amp;gt;.  &#039;&#039;&#039;Watch out for non-Linux (Mac or PC) line endings.&#039;&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix myscript.sh&amp;lt;/code&amp;gt;.&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#*Edit the mail notification options: &#039;-m bea&#039; means you want to receive a message when your job Begins, Ends, or Aborts (quits due to an error).  You may use any combination of &#039;b&#039;, &#039;e&#039;, and &#039;a&#039; for this setting.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3571</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3571"/>
		<updated>2017-11-29T19:25:01Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* To work with these example scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job|Submit job]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_(tcsh)|Submit job (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray|Submit jobarray]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_(readarray)|Submit jobarray (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Copy the contents of the script template into a new script, e.g. &amp;lt;code&amp;gt;myscript.sh&amp;lt;/code&amp;gt;.  &#039;&#039;&#039;Watch out for non-Linux (Mac or PC) line endings.&#039;&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix&amp;lt;/code&amp;gt;.&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#*Edit the mail notification options: &#039;-m bea&#039; means you want to receive a message when your job Begins, Ends, or Aborts (quits due to an error).  You may use any combination of &#039;b&#039;, &#039;e&#039;, and &#039;a&#039; for this setting.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3570</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3570"/>
		<updated>2017-11-29T19:23:34Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* To work with these example scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job|Submit job]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_(tcsh)|Submit job (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray|Submit jobarray]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_(readarray)|Submit jobarray (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#*Edit the mail notification options: &#039;-m bea&#039; means you want to receive a message when your job Begins, Ends, or Aborts (quits due to an error).  You may use any combination of &#039;b&#039;, &#039;e&#039;, and &#039;a&#039; for this setting.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3569</id>
		<title>Hoffman2:Submit job</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3569"/>
		<updated>2017-11-29T19:21:06Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
&lt;br /&gt;
# Load the FSL module&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3568</id>
		<title>Hoffman2:Submit jobarray (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3568"/>
		<updated>2017-11-29T19:20:49Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In this example, subjects are read in from a subjects.txt file. subjects.txt is a text file with a single subject ID on each line.  &#039;&#039;&#039;Watch out for non-Linux (Mac or PC) line endings.&#039;&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-16:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
&lt;br /&gt;
# Load the FSL module&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
readarray -t subjects &amp;lt; subjects.txt&lt;br /&gt;
(( i=$SGE_TASK_ID - 1 ))&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$i]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray&amp;diff=3567</id>
		<title>Hoffman2:Submit jobarray</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray&amp;diff=3567"/>
		<updated>2017-11-29T19:20:33Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-5:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
&lt;br /&gt;
# Load the FSL module&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
declare -a subjects&lt;br /&gt;
&lt;br /&gt;
subjects[1]=&amp;quot;su3v3hkaykw2&amp;quot;&lt;br /&gt;
subjects[2]=&amp;quot;wxg5mk5u5xbz&amp;quot;&lt;br /&gt;
subjects[3]=&amp;quot;6q2bgkqu5grp&amp;quot;&lt;br /&gt;
subjects[4]=&amp;quot;whjue68jmwyh&amp;quot;&lt;br /&gt;
subjects[5]=&amp;quot;pfx3ju9wz8rr&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$SGE_TASK_ID]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3566</id>
		<title>Hoffman2:Submit job (tcsh)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3566"/>
		<updated>2017-11-29T19:20:25Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/tcsh&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
source /u/local/Modules/default/init/modules.csh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
&lt;br /&gt;
# Load the FSL module&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
setenv NO_FSL_JOBS true&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3565</id>
		<title>Hoffman2:Submit job (tcsh)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3565"/>
		<updated>2017-11-29T19:20:09Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/tcsh&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
source /u/local/Modules/default/init/modules.csh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
&lt;br /&gt;
# Load fsl module&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
setenv NO_FSL_JOBS true&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3564</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3564"/>
		<updated>2017-11-29T19:16:42Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* Job submission templates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job|Submit job]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_(tcsh)|Submit job (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray|Submit jobarray]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_(readarray)|Submit jobarray (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_example&amp;diff=3563</id>
		<title>Hoffman2:Submit job example</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_example&amp;diff=3563"/>
		<updated>2017-11-29T19:16:08Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: Dmargolis moved page Hoffman2:Submit job example to Hoffman2:Submit job&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Hoffman2:Submit job]]&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3562</id>
		<title>Hoffman2:Submit job</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3562"/>
		<updated>2017-11-29T19:16:08Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: Dmargolis moved page Hoffman2:Submit job example to Hoffman2:Submit job&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_example_(readarray)&amp;diff=3561</id>
		<title>Hoffman2:Submit jobarray example (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_example_(readarray)&amp;diff=3561"/>
		<updated>2017-11-29T19:15:51Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: Dmargolis moved page Hoffman2:Submit jobarray example (readarray) to Hoffman2:Submit jobarray (readarray)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Hoffman2:Submit jobarray (readarray)]]&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3560</id>
		<title>Hoffman2:Submit jobarray (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3560"/>
		<updated>2017-11-29T19:15:51Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: Dmargolis moved page Hoffman2:Submit jobarray example (readarray) to Hoffman2:Submit jobarray (readarray)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In this example, subjects are read in from a subjects.txt file. subjects.txt is a text file with a single subject ID on each line.  &#039;&#039;&#039;Watch out for non-Linux (Mac or PC) line endings.&#039;&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-16:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
readarray -t subjects &amp;lt; subjects.txt&lt;br /&gt;
(( i=$SGE_TASK_ID - 1 ))&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$i]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_example&amp;diff=3559</id>
		<title>Hoffman2:Submit jobarray example</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_example&amp;diff=3559"/>
		<updated>2017-11-29T19:15:42Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: Dmargolis moved page Hoffman2:Submit jobarray example to Hoffman2:Submit jobarray&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Hoffman2:Submit jobarray]]&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray&amp;diff=3558</id>
		<title>Hoffman2:Submit jobarray</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray&amp;diff=3558"/>
		<updated>2017-11-29T19:15:42Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: Dmargolis moved page Hoffman2:Submit jobarray example to Hoffman2:Submit jobarray&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-5:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
declare -a subjects&lt;br /&gt;
&lt;br /&gt;
subjects[1]=&amp;quot;su3v3hkaykw2&amp;quot;&lt;br /&gt;
subjects[2]=&amp;quot;wxg5mk5u5xbz&amp;quot;&lt;br /&gt;
subjects[3]=&amp;quot;6q2bgkqu5grp&amp;quot;&lt;br /&gt;
subjects[4]=&amp;quot;whjue68jmwyh&amp;quot;&lt;br /&gt;
subjects[5]=&amp;quot;pfx3ju9wz8rr&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$SGE_TASK_ID]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_example_(tcsh)&amp;diff=3557</id>
		<title>Hoffman2:Submit job example (tcsh)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_example_(tcsh)&amp;diff=3557"/>
		<updated>2017-11-29T19:15:24Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: Dmargolis moved page Hoffman2:Submit job example (tcsh) to Hoffman2:Submit job (tcsh)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Hoffman2:Submit job (tcsh)]]&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3556</id>
		<title>Hoffman2:Submit job (tcsh)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3556"/>
		<updated>2017-11-29T19:15:24Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: Dmargolis moved page Hoffman2:Submit job example (tcsh) to Hoffman2:Submit job (tcsh)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/tcsh&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# load the job environment:&lt;br /&gt;
source /u/local/Modules/default/init/modules.csh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
setenv NO_FSL_JOBS true&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3555</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3555"/>
		<updated>2017-11-29T19:14:45Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: /* Job submission templates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_example|Submit job]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_example_(tcsh)|Submit job (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example|Submit jobarray]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example_(readarray)|Submit jobarray (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submitting_Jobs&amp;diff=3554</id>
		<title>Hoffman2:Submitting Jobs</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submitting_Jobs&amp;diff=3554"/>
		<updated>2017-11-29T19:13:36Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
If you remember from [[Hoffman2:Introduction#Sun Grid Engine|Anatomy of the Computing Cluster]], the Univa Grid Engine on Hoffman2 is the scheduler for all computing jobs.  It takes your computing job request, considers what resources you are asking for and then puts your job in a line waiting for those resources to become available.&lt;br /&gt;
&lt;br /&gt;
Ask for a simple 1GB of memory and a single computing core with a short time window, and your job will likely get placed at the front of the line and start running soon if not immediately. &lt;br /&gt;
&lt;br /&gt;
Ask for a lot of memory or many computing cores, and your job will get put further back in the line because it will have to wait for more things to become available. Ask for too little RAM or too little time and your job will be killed or end prematurely leaving you with no results to examine.&lt;br /&gt;
&lt;br /&gt;
=Job Submission Types=&lt;br /&gt;
&lt;br /&gt;
So how does one submit a computing job request?  You&#039;ve got some options:&lt;br /&gt;
# &#039;&#039;&#039;job.q&#039;&#039;&#039;&lt;br /&gt;
#: Use a simple tool that IDRE wrote.  It has a menu and walks you through submitting things.&lt;br /&gt;
# &#039;&#039;&#039;qsub&#039;&#039;&#039;&lt;br /&gt;
#: Get under the hood and do it yourself.  It can get messy but it can also be faster and you have more flexibility with options.&lt;br /&gt;
# &#039;&#039;&#039;command files&#039;&#039;&#039;&lt;br /&gt;
#: You&#039;ve graduated to a higher level of operations, but we can help you get there with examples of our own command files.&lt;br /&gt;
# &#039;&#039;&#039;job arrays&#039;&#039;&#039;&lt;br /&gt;
#: You&#039;ve got a lot of repetitive tasks to run, these will be your friend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--==Aggregating Output Files==&lt;br /&gt;
By default, whenever you submit a job, the standard output and error files get created in whichever directory you submitted the job from unless you tell qsub differently with the &amp;quot;-o&amp;quot; and &amp;quot;-e&amp;quot; arguments.  &#039;&#039;&#039;This can be very annoying when trying to reduce your file count as output files can be everywhere.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is how you can avoid running around looking for these files:&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Use your favorite [[Text Editors|text editor]] to edit the file &amp;lt;code&amp;gt;~/.sge_request&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ vim ~/.sge_request&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ emacs ~/.sge_request&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Insert this line into the file&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;-o $HOME/job-output-files/&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; - capital A - to go to the end of the line and enter insert mode&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#: [[Text Editors#Emacs (H2)(OSX)|Emacs]]&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
# Save the file&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;ESC + &amp;quot;:wq&amp;quot; + ENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs command line]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs GUI]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c, y&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* or use the menu system&lt;br /&gt;
# Now use the following command to create the special directory that will receive all of the output and error files for the jobs you run.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;mkdir ~/job-output-files&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make an edit to your ~/.bash_profile so that you can run [[Hoffman2:Interactive Sessions]] without a problem&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ vim ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ emacs ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Insert this line at the &#039;&#039;&#039;bottom&#039;&#039;&#039; of the file&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;alias qrsh=&#039;qrsh -o /dev/null&#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;G&amp;lt;/code&amp;gt; - capital G - to go to the end of the file&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; - capital A - to go to the end of the line and enter insert mode&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt; - to insert a newline&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#: [[Text Editors#Emacs (H2)(OSX)|Emacs]]&lt;br /&gt;
#:* Use the arrow keys to scroll the cursor down to the bottom of the document and add a newline.&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
# Save the file&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;ESC + &amp;quot;:wq&amp;quot; + ENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs command line]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs GUI]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c, y&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* or use the menu system --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==job.q==&lt;br /&gt;
Once you&#039;ve identified or written a script you&#039;d like to run, [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]] and enter &amp;lt;code&amp;gt;job.q&amp;lt;/code&amp;gt;.  Then it is just a matter of following its step-by-step instructions.&lt;br /&gt;
&lt;br /&gt;
From the tool&#039;s main menu, you can type &#039;&#039;Info&#039;&#039; to read up about how to use it and we highly encourage you to do so.&lt;br /&gt;
&lt;br /&gt;
But we know patience is a virtue that most of us aren&#039;t blessed with.  So we&#039;ll walk you through submitting a basic job so you can hit the ground running.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
# Once on Hoffman2, you&#039;ll need to edit one file so pull out your favorite [[Text Editors|text editor]] and edit the file&lt;br /&gt;
#: &amp;lt;pre&amp;gt;~/.queuerc&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Add the line&lt;br /&gt;
#: &amp;lt;pre&amp;gt;set qqodir = ~/job-output&amp;lt;/pre&amp;gt;&lt;br /&gt;
# You&#039;ve just set the default directory where your job command files will be created. Save the configuration file and close your text editor.&lt;br /&gt;
# Make that directory using the command&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ mkdir ~/job-output&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now execute&lt;br /&gt;
#:&amp;lt;pre&amp;gt;$ job.q&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Press enter to acknowledge the message about some files that get created (READ IT FIRST THOUGH).&lt;br /&gt;
# Type &#039;&#039;Build &amp;lt;ENTER&amp;gt;&#039;&#039; to begin creating an SGE command file.&lt;br /&gt;
# The program now asks you which script you&#039;d like to run, enter the following text to use our example script&lt;br /&gt;
#: &amp;lt;pre&amp;gt;/u/project/CCN/apps/examples/qsub/gather.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
# The program now asks how much memory the job will need (in [http://en.wikipedia.org/wiki/Megabyte Megabytes]).  This script is really simple, so let&#039;s go with the minimum and enter &#039;&#039;64&#039;&#039;.&lt;br /&gt;
# The program now asks how long will the job take (in hours). Go with the minimum 1 hour; it will complete in much less than this.&lt;br /&gt;
# The program now asks if your job should be limited to only your resource group&#039;s cores. Answer &#039;&#039;n&#039;&#039; because you do not need to be limiting yourself here and the job is not going to be running for more than 24 hours.&lt;br /&gt;
# Soon, the program will tell you that &#039;&#039;gather.sh.cmd&#039;&#039; has been built and saved.&lt;br /&gt;
# When it asks you if you would like to submit your job, say no.  Then type &#039;&#039;Quit &amp;lt;ENTER&amp;gt;&#039;&#039; to leave the program.&lt;br /&gt;
# Now you should be able to run&lt;br /&gt;
#: &amp;lt;pre&amp;gt;ls ~/job-output&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: and see &#039;&#039;gather.sh.cmd&#039;&#039;.  This file will stay there until you delete it and can be run over and over again.  Making a command file like this is especially useful if there is a task you&#039;ll be running repeatedly on Hoffman2.  But if this is something you only need to run once, you should delete the file so you don&#039;t needlessly approach your [[Hoffman2:Quotas|quota]].&lt;br /&gt;
# The time has come to actually run the program (thought we&#039;d never get to that, didn&#039;t you?). Type&lt;br /&gt;
#: &amp;lt;pre&amp;gt;qsub job-output/gather.sh.cmd&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: and after hitting enter, a message similar to this will pop up:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;Your job 1882940 (&amp;quot;gather.sh.cmd&amp;quot;) has been submitted&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: where the number is your JobID, a unique numerical identifier for the computer job you have submitted to the queue.&lt;br /&gt;
# Now you can check if the job has finished running by doing&lt;br /&gt;
#: &amp;lt;pre&amp;gt;ls ~/job-output&amp;lt;/pre&amp;gt;&lt;br /&gt;
# When two files named &#039;&#039;gather.sh.output.[JOBID]&#039;&#039; and &#039;&#039;gather.sh.joblog.[JOBID]&#039;&#039; (where JOBID is your job&#039;s unique identifier) appear, your job has run.&lt;br /&gt;
#: &#039;&#039;gather.sh.output.[JOBID]&#039;&#039;&lt;br /&gt;
#:: This file has all the standard output generated by your script.  In this case it will just have the line&lt;br /&gt;
#::: &#039;&#039;Standard output would appear here.&#039;&#039;&lt;br /&gt;
#: &#039;&#039;gather.sh.joblog.[JOBID]&#039;&#039;&lt;br /&gt;
#:: This file has all the details about when, where, and how your job was processed. Useful information if you are going to be running this job over and over and need to fine tune the resources it uses.&lt;br /&gt;
# Better ways of checking on your job can be found [[Hoffman2:Monitoring Jobs|here]].&lt;br /&gt;
# The script you ran is an aggregator.  It looks in a list of directories, each assumed to contain a specifically named file, and gathers the contents of each of those files into one central file in your home directory.  This file is named &#039;&#039;gather-[TIMESTAMP].txt&#039;&#039; where TIMESTAMP is when the script was run and follows [http://en.wikipedia.org/wiki/ISO_8601 ISO 8601] style encoding. You are encouraged to type&lt;br /&gt;
#: &amp;lt;pre&amp;gt;/u/project/CCN/apps/examples/qsub/gather.sh -h&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: or&lt;br /&gt;
#: &amp;lt;pre&amp;gt;/u/project/CCN/apps/examples/qsub/gather.sh --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: to see how this script works.&lt;br /&gt;
# Finally, go check the inbox of the email you used to sign up for your Hoffman2 account.  There will be two emails from &amp;quot;root@mail.hoffman2.idre.ucla.edu&amp;quot; that indicate when the job was started and when the job was completed.  This is one of the neat features of the queue so that you can be alerted about the progress of your job without having to stay logged into Hoffman2 and checking on it constantly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==qsub==&lt;br /&gt;
Everything that job.q did can be done on the command line.  And it can be done better.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Run the command:&lt;br /&gt;
 $ qsub -cwd -V -N J1 -l h_data=64M,h_rt=00:05:00 -M $USER -m bea /u/project/CCN/apps/examples/qsub/gather.sh&lt;br /&gt;
&lt;br /&gt;
And something like the following will be printed out:&lt;br /&gt;
 Your job 1875395 (&amp;quot;J1&amp;quot;) has been submitted&lt;br /&gt;
&lt;br /&gt;
Where the number is your JOBID, a unique numerical identifier for your job.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s break down the arguments in that command.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-cwd&amp;lt;/code&amp;gt;&lt;br /&gt;
: Change working directory&lt;br /&gt;
: When your script runs, change the working directory to where you currently are in the filesystem.&lt;br /&gt;
:: e.g. If you were in the director /u/home/mscohen/data/ when you ran the command, the queue will change directories to that location and then execute the script you gave it.  This means output and error directories will be placed here for that job.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-V&amp;lt;/code&amp;gt;&lt;br /&gt;
: Export environment variables&lt;br /&gt;
: Exports all the environment variables to the context of the job.  Useful if you have extra environment variables that are needed in your script.&lt;br /&gt;
:: e.g. If you had defined the variable SUBJECT_ID in your session on Hoffman2 (&amp;lt;code&amp;gt;export SUBJECT_ID=42&amp;lt;/code&amp;gt;) before submitting a job and that variable was called on by your script, then you would need to use this flag.  Tools like FreeSurfer look for certain environment variables to be set.&lt;br /&gt;
 &lt;br /&gt;
;&amp;lt;code&amp;gt;-N J1&amp;lt;/code&amp;gt;&lt;br /&gt;
: Name my job&lt;br /&gt;
: Names your job &amp;quot;J1.&amp;quot;  When you [[Hoffman2:Monitoring Jobs#qstat|look at the queue]], this will be the text that shows up in the &amp;quot;name&amp;quot; column.  This will also be the beginning of the output (&amp;lt;code&amp;gt;J1.o[JOBID]&amp;lt;/code&amp;gt;) and error (&amp;lt;code&amp;gt;J1.e[JOBID]&amp;lt;/code&amp;gt;) files for your job.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-l h_data=64M,time=00:05:00&amp;lt;/code&amp;gt;&lt;br /&gt;
: Resource allocation (that&#039;s a lower case &amp;quot;elle&amp;quot;)&lt;br /&gt;
: This is the resources flag meaning that the text immediately after it will ask for things like:&lt;br /&gt;
:* certain amount of memory, in [http://en.wikipedia.org/wiki/Megabyte Megabytes], or [http://en.wikipedia.org/wiki/Gigabyte Gigabytes]&lt;br /&gt;
:** h_data=64M (64 MB RAM) or h_data=1G (1 GB RAM)&lt;br /&gt;
&amp;lt;!-- :** &amp;quot;mem&amp;quot; no longer works --&amp;gt;&lt;br /&gt;
: If your job uses more RAM than it requested, your job WILL be killed in order to avoid it hurting other jobs running on the same node. It is imperative that you set this RAM request properly.&lt;br /&gt;
:* certain length of computing time, in the form HH:MM:SS&lt;br /&gt;
:** h_rt=00:05:00&amp;lt;!--    or&lt;br /&gt;
:** time=00:05:00 --&amp;gt;&lt;br /&gt;
: In this case the script will complete its task rapidly, hence we are only asking for 5 minutes of computing time.&lt;br /&gt;
&amp;lt;!--:* queue type, only a few options here&lt;br /&gt;
:** [http://www.ats.ucla.edu/clusters/hoffman2/computing/batch/policies.htm#express express]&lt;br /&gt;
:**: Time limit of 2 hours, and it tends to be overloaded so it isn&#039;t recommended--&amp;gt;&lt;br /&gt;
:* [http://www.ats.ucla.edu/clusters/hoffman2/computing/batch/policies.htm#highp highp]&lt;br /&gt;
:**: Job length maximum of 14 days but can only be run on nodes belonging to your resource group (type &amp;lt;code&amp;gt;mygroup&amp;lt;/code&amp;gt; to see what type of resources you have available). If you are in the ccn group on Hoffman2, you have access to some of these highp nodes.&lt;br /&gt;
&amp;lt;!--:** [blank] (nothing, nada, zilch)&lt;br /&gt;
:**: [http://www.ats.ucla.edu/clusters/hoffman2/computing/batch/policies.htm#day Standard queue], which has a maximum job length of 24 hours--&amp;gt;&lt;br /&gt;
&amp;lt;!--: In this case, we are asking to be put on the express queue since this is such a short job, but the standard queue would have worked just as well if not better.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-M $USER&amp;lt;/code&amp;gt;&lt;br /&gt;
: Define mailing list&lt;br /&gt;
: This defines the user that will be mailed if email updates are requested.  The default address is that of the job-owner.&lt;br /&gt;
:: e.g. In this case, the email will be sent to the address on file for the user.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;-m bea&amp;lt;/code&amp;gt;&lt;br /&gt;
: Define mailing rules&lt;br /&gt;
: This defines when Hoffman2 should email you about your job.  There are five options here&lt;br /&gt;
:* b - when the job begins&lt;br /&gt;
:* e - when the job ends&lt;br /&gt;
:* a - when the job is aborted (ends in an error state)&lt;br /&gt;
&amp;lt;!--:* s - when the job is suspended&lt;br /&gt;
:* n - never&lt;br /&gt;
: The first four can be used in any combination, but the last obviously nullifies the others.&lt;br /&gt;
&lt;br /&gt;
There are many other flags that you could use, but these are the basics that will get you through most of your computing.  Feel free to explore the others in the [http://www.ats.ucla.edu/clusters/common/computing/batch/man_submit.htm qsub Man page].--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Command Files==&lt;br /&gt;
Typing accurately can be difficult at times, so why put yourself through the trouble of having to retype the same arguments over and over if you will always be using about the same values?  Enter command files.&lt;br /&gt;
&lt;br /&gt;
You already have experience making a command file (~/job-output/gather.sh.cmd) from when you used the tool &amp;lt;code&amp;gt;job.q&amp;lt;/code&amp;gt;.  But did you know that you can edit that command file to make changes to how it runs, or write your own?&lt;br /&gt;
&lt;br /&gt;
The command files generated by &amp;lt;code&amp;gt;job.q&amp;lt;/code&amp;gt; are fairly well commented, so if you take a look at them with your favorite [Text Editors|text editor] you should be able to change their behavior.  For instance, if you go into the command file from the job.q example, find the lines that say&lt;br /&gt;
 #  Notify at beginning and end of job&lt;br /&gt;
 #$ -m bea&lt;br /&gt;
You recognize that this is the flag about when to send email messages.  Go ahead and change this to&lt;br /&gt;
 # Notify at the end and on abort&lt;br /&gt;
 #$ -m ae&lt;br /&gt;
And you should only receive one email when your job finishes.&lt;br /&gt;
&amp;lt;!--===q.sh===&lt;br /&gt;
You could make a generic command file that contains all the basic flags that you care about.  We&#039;ve even got an example ready and available for you at&lt;br /&gt;
/u/project/CCN/apps/examples/qsub/q.sh&lt;br /&gt;
The script contents are shown below:&lt;br /&gt;
 qsub &amp;lt;&amp;lt;CMD&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # Use current working directory&lt;br /&gt;
 #$ -cwd&lt;br /&gt;
 # Error stream is merged with the standard output&lt;br /&gt;
 #$ -j y&lt;br /&gt;
 # Use the bash shell for job execution&lt;br /&gt;
 #$ -S /bin/bash&lt;br /&gt;
 # Use your normal environment variables in the job&lt;br /&gt;
 #$ -V&lt;br /&gt;
 # Use 1GB of RAM and the main queue, with a maximum of 2 hours computing time&lt;br /&gt;
 #$ -l h_data=1024M,h_rt=2:00:00&lt;br /&gt;
 $@&lt;br /&gt;
 CMD&lt;br /&gt;
To use this command file to submit the &#039;&#039;gather.sh&#039;&#039; example script, you would execute the command:&lt;br /&gt;
 $ q.sh gather.sh&lt;br /&gt;
You can do this because if you have [[Hoffman2:Software Tools#Setting Up Your Account to Access the Tools|set up your Bash profile correctly]], they are in your [[Hoffman2:UNIX Tutorial#PATH|Unix PATH variable]].  You can replace &#039;&#039;gather.sh&#039;&#039; with any script you want executed and it will be submitted as a job on the cluster.  We recommend that you make your own copy of &#039;&#039;q.sh&#039;&#039; and keep it in your local &#039;&#039;bin&#039;&#039; directory (~/bin) so that you can edit it to suit your needs.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Job Arrays==&lt;br /&gt;
There is an SGE qsub argument that allows you to submit multiple jobs in parallel that use the same script.  It is&lt;br /&gt;
 -t lower-upper:interval&lt;br /&gt;
where&lt;br /&gt;
;&amp;lt;code&amp;gt;lower&amp;lt;/code&amp;gt;&lt;br /&gt;
: is replaced with the starting number&lt;br /&gt;
;&amp;lt;code&amp;gt;upper&amp;lt;/code&amp;gt;&lt;br /&gt;
: is replaced with the ending number&lt;br /&gt;
;&amp;lt;code&amp;gt;interval&amp;lt;/code&amp;gt;&lt;br /&gt;
: is replaced with the step interval&lt;br /&gt;
So adding the argument&lt;br /&gt;
 -t 10-100:5&lt;br /&gt;
will step through the numbers 10, 15, 20, 25, ..., 100 submitting a job for each one.&lt;br /&gt;
&lt;br /&gt;
In jobs that are called with this flag, there will be an [[Hoffman2:UNIX Tutorial#Environment Variables|environment variable]] called &amp;lt;code&amp;gt;SGE_TASK_ID&amp;lt;/code&amp;gt; whose value will be incremented over the range you specified.  Each possible value of SGE_TASK_ID will be submitted as its own job, so your work will be parallelized.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;!--Why would anyone use this?  Here are some examples&lt;br /&gt;
&lt;br /&gt;
====Lots of numbers====--&amp;gt;&lt;br /&gt;
Let&#039;s say you have a script, &#039;&#039;&#039;myFunc.sh&#039;&#039;&#039;, that takes one numerical input and computes a bunch of values based on that input.  But you need to run &amp;lt;code&amp;gt;myFunc.sh&amp;lt;/code&amp;gt; for input values 1 to 100.  One solution would be to write a wrapper script &#039;&#039;&#039;myFuncSlowWrapper.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFuncSlowWrapper.sh&lt;br /&gt;
 for i in {1..100};&lt;br /&gt;
 do&lt;br /&gt;
     myFunc.sh $i;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
The only drawback is that this will take quite a while since all 100 iterations will be done on a single processor.  With job arrays, the computations will be split among many processors and can finish much more quickly.  You would instead write a wrapper script called &#039;&#039;&#039;myFuncFastWrapper.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFuncFastWrapper.sh&lt;br /&gt;
 echo $SGE_TASK_ID&lt;br /&gt;
 myFunc.sh $SGE_TASK_ID&lt;br /&gt;
&lt;br /&gt;
And submit it with&lt;br /&gt;
 qsub -cwd -V -N PJ -l h_data=1024M,h_rt=01:00:00 -M $HOME -m bea -t 1-100:1 myFuncWrapper.sh&lt;br /&gt;
 &amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
====Lots of files====&lt;br /&gt;
Let&#039;s say you have a script, &#039;&#039;&#039;myFunc2.sh&#039;&#039;&#039;, that takes the name of a file as input and opens that file and runs a bunch of computations on its contents.  But you have 100 such files to process.  One solution would be to write a wrapper script &#039;&#039;&#039;myFunc2SlowWrapper.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFunc2SlowWrapper.sh&lt;br /&gt;
 for FILE in `ls dir/of/files`;&lt;br /&gt;
 do&lt;br /&gt;
     myFunc2.sh $FILE&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
But this will take quite a while since all 100 iterations will be done on a single processor. With job arrays, the computations will be split among many processors since they are submitted as their own jobs and can finish much more quickly.  You could instead create a file that contains a list of all 100 files that need to be processed and call it &#039;&#039;&#039;filesToProcess&#039;&#039;&#039;. Then write a wrapper script called &#039;&#039;&#039;myFunc2FastWrapper.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFunc2FastWrapper.sh&lt;br /&gt;
 echo $SGE_TASK_ID&lt;br /&gt;
 myFunc2.sh `sed -n ${SGE_TASK_ID}p /path/to/list/of/files`&lt;br /&gt;
&lt;br /&gt;
where you replace &#039;&#039;/path/to/list/of/file&#039;&#039; with the path to &#039;&#039;&#039;fileToProcess&#039;&#039;&#039;.  The code&lt;br /&gt;
 `sed -n ${SGE_TASK_ID}p /path/to/list/of/files`&lt;br /&gt;
uses &amp;lt;code&amp;gt;sed&amp;lt;/code&amp;gt; to grab the ${SGE_TASK_ID}&#039;th line from the file &#039;&#039;&#039;/path/to/list/of/files&#039;&#039;&#039; and returns it (thanks to the tick marks, &amp;lt;code&amp;gt;SHIFT + ~&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Then you&#039;d submit it with&lt;br /&gt;
 qsub -cwd -V -N PJ -l h_data=1024M,h_rt=01:00:00 -M $USER -m bea -t 1-100:1 myFunc2Wrapper.sh&lt;br /&gt;
&lt;br /&gt;
If your files were named regularly with a &#039;-number&#039; at the end (e.g. &#039;file-1&#039;, &#039;file-2&#039;, &#039;file-3&#039;, ... &#039;file-n&#039;), you could just make &#039;&#039;&#039;myFunc2FastWrapperB.sh&#039;&#039;&#039; as&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # myFunc2FastWrapperB.sh&lt;br /&gt;
 echo $SGE_TASK_ID&lt;br /&gt;
 myFunc2.sh file-${SGE_TASK_ID}&lt;br /&gt;
and submit it the same way. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ==External Links==&lt;br /&gt;
*[http://www.ats.ucla.edu/clusters/common/computing/batch/man_submit.htm qsub Man page]&lt;br /&gt;
*[http://www.ats.ucla.edu/clusters/hoffman2/computing/batch/policies.htm Hoffman2 Types of Queues] --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3553</id>
		<title>Hoffman2:Submit jobarray (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3553"/>
		<updated>2017-11-29T02:49:39Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In this example, subjects are read in from a subjects.txt file. subjects.txt is a text file with a single subject ID on each line.  &#039;&#039;&#039;Watch out for non-Linux (Mac or PC) line endings.&#039;&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-16:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
readarray -t subjects &amp;lt; subjects.txt&lt;br /&gt;
(( i=$SGE_TASK_ID - 1 ))&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$i]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray&amp;diff=3552</id>
		<title>Hoffman2:Submit jobarray</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray&amp;diff=3552"/>
		<updated>2017-11-29T02:49:28Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-5:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
declare -a subjects&lt;br /&gt;
&lt;br /&gt;
subjects[1]=&amp;quot;su3v3hkaykw2&amp;quot;&lt;br /&gt;
subjects[2]=&amp;quot;wxg5mk5u5xbz&amp;quot;&lt;br /&gt;
subjects[3]=&amp;quot;6q2bgkqu5grp&amp;quot;&lt;br /&gt;
subjects[4]=&amp;quot;whjue68jmwyh&amp;quot;&lt;br /&gt;
subjects[5]=&amp;quot;pfx3ju9wz8rr&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$SGE_TASK_ID]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3551</id>
		<title>Hoffman2:Submit job (tcsh)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3551"/>
		<updated>2017-11-29T02:49:15Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/tcsh&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# load the job environment:&lt;br /&gt;
source /u/local/Modules/default/init/modules.csh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
setenv NO_FSL_JOBS true&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3550</id>
		<title>Hoffman2:Submit job</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3550"/>
		<updated>2017-11-29T02:49:00Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3549</id>
		<title>Hoffman2:Submit job (tcsh)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job_(tcsh)&amp;diff=3549"/>
		<updated>2017-11-29T02:48:42Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/tcsh&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# load the job environment:&lt;br /&gt;
source /u/local/Modules/default/init/modules.csh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
setenv NO_FSL_JOBS true&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3548</id>
		<title>Hoffman2:Submit job</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3548"/>
		<updated>2017-11-29T02:48:33Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Your script content goes here...&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3547</id>
		<title>Hoffman2:Submit jobarray (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3547"/>
		<updated>2017-11-15T00:26:53Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In this example, subjects are read in from a subjects.txt file. subjects.txt is a text file with a single subject ID on each line.  &#039;&#039;&#039;Watch out for non-Linux (Mac or PC) line endings.&#039;&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-16:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
readarray -t subjects &amp;lt; subjects.txt&lt;br /&gt;
(( i=$SGE_TASK_ID - 1 ))&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$i]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Now do something with fsl, feat, etc.&lt;br /&gt;
sleep 600&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3546</id>
		<title>Hoffman2:Submit jobarray (readarray)</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_jobarray_(readarray)&amp;diff=3546"/>
		<updated>2017-11-15T00:26:24Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In this example, subjects are read in from a subjects.txt file. subjects.txt is a text file with a single subject ID listed on each line.  &#039;&#039;&#039;Watch out for non-Linux (Mac or PC) line endings.&#039;&#039;&#039;  Line ending issues can be fixed with &amp;lt;code&amp;gt;dos2unix&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID.$TASK_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m a&lt;br /&gt;
#  Job array indexes&lt;br /&gt;
#$ -t 1-16:1&lt;br /&gt;
&lt;br /&gt;
# Load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Set up the subjects list&lt;br /&gt;
readarray -t subjects &amp;lt; subjects.txt&lt;br /&gt;
(( i=$SGE_TASK_ID - 1 ))&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;This is sub-job $SGE_TASK_ID&amp;quot;&lt;br /&gt;
echo &amp;quot;This is subject ${subjects[$i]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Now do something with fsl, feat, etc.&lt;br /&gt;
sleep 600&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3545</id>
		<title>Hoffman2:Submit job</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Submit_job&amp;diff=3545"/>
		<updated>2017-11-15T00:25:06Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
#$ -cwd&lt;br /&gt;
# error = Merged with joblog&lt;br /&gt;
#$ -o joblog.$JOB_ID&lt;br /&gt;
#$ -j y&lt;br /&gt;
#$ -pe shared 2&lt;br /&gt;
#$ -l h_rt=8:00:00,h_data=4G&lt;br /&gt;
# Email address to notify&lt;br /&gt;
#$ -M $USER@mail&lt;br /&gt;
# Notify when&lt;br /&gt;
#$ -m bea&lt;br /&gt;
&lt;br /&gt;
# load the job environment:&lt;br /&gt;
. /u/local/Modules/default/init/modules.sh&lt;br /&gt;
module use /u/project/CCN/apps/modulefiles&lt;br /&gt;
module load fsl&lt;br /&gt;
&lt;br /&gt;
# This is optional&lt;br /&gt;
# More info here: https://www.ccn.ucla.edu/wiki/index.php/Hoffman2:FSL &lt;br /&gt;
export NO_FSL_JOBS=true&lt;br /&gt;
&lt;br /&gt;
# Now do something with fsl, feat, etc.&lt;br /&gt;
sleep 600&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3544</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3544"/>
		<updated>2017-11-14T22:54:06Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Job submission templates===&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_example|Submit job example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_example_(tcsh)|Submit job example (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example|Submit jobarray example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example_(readarray)|Submit jobarray example (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
===To work with these example scripts===&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3543</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3543"/>
		<updated>2017-11-14T22:53:12Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;[[Hoffman2:Submit_job_example|Submit job example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_example_(tcsh)|Submit job example (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example|Submit jobarray example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example_(readarray)|Submit jobarray example (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
To work with these example scripts:&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
#*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3542</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3542"/>
		<updated>2017-11-14T22:53:03Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;[[Hoffman2:Submit_job_example|Submit job example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_example_(tcsh)|Submit job example (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example|Submit jobarray example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example_(readarray)|Submit jobarray example (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
To work with these example scripts:&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
*You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3541</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3541"/>
		<updated>2017-11-14T22:52:56Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;[[Hoffman2:Submit_job_example|Submit job example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_example_(tcsh)|Submit job example (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example|Submit jobarray example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example_(readarray)|Submit jobarray example (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
To work with these example scripts:&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   &lt;br /&gt;
**You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3540</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3540"/>
		<updated>2017-11-14T22:52:06Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;[[Hoffman2:Submit_job_example|Submit job example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_example_(tcsh)|Submit job example (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
*same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example|Submit jobarray example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example_(readarray)|Submit jobarray example (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
To work with these example scripts:&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3539</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3539"/>
		<updated>2017-11-14T22:51:50Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;[[Hoffman2:Submit_job_example|Submit job example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_job_example_(tcsh)|Submit job example (tcsh)]]&#039;&#039;&#039;&lt;br /&gt;
same as above, written for tcsh&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example|Submit jobarray example]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
&#039;&#039;&#039;[[Hoffman2:Submit_jobarray_example_(readarray)|Submit jobarray example (readarray)]]&#039;&#039;&#039;&lt;br /&gt;
*example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
To work with these example scripts:&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3538</id>
		<title>Hoffman2:Job Submission Templates</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Job_Submission_Templates&amp;diff=3538"/>
		<updated>2017-11-14T22:50:28Z</updated>

		<summary type="html">&lt;p&gt;Dmargolis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===[[Hoffman2:Submit_job_example|Submit job example]]===&lt;br /&gt;
*example script for submitting a single job&lt;br /&gt;
*[[Hoffman2:Submit_job_example_(tcsh)|Submit job example (tcsh)]]&lt;br /&gt;
**same as above, written for tcsh&lt;br /&gt;
*Submit jobarray example &lt;br /&gt;
**example script for submitting a jobarray with hard-coded array values&lt;br /&gt;
*Submit jobarray example (readarray)&lt;br /&gt;
**example script for submitting a jobarray with an array read in from a file, e.g. &#039;subjects.txt&#039;&lt;br /&gt;
&lt;br /&gt;
To work with these example scripts:&lt;br /&gt;
#Edit the &amp;quot;preamble&amp;quot; content at the top to adjust the memory (h_data) and run time (h_rt).   You can also adjust the number of cores: 2 cores is &#039;-pe shared 2&#039;.  I recommend 2, 4, or 8 for this value.  Be aware that the number of cores is a multiplier for the RAM.  h_data=4G and 2 cores is 8G total.&lt;br /&gt;
#Put your script content at the bottom.&lt;br /&gt;
#Submit directly to the job scheduler like this: &amp;lt;code&amp;gt;qsub myscript.sh&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
</feed>