<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.ccn.ucla.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Hoffman2%3AMATLAB%3Aqsubjobarray.m</id>
	<title>Hoffman2:MATLAB:qsubjobarray.m - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.ccn.ucla.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Hoffman2%3AMATLAB%3Aqsubjobarray.m"/>
	<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:MATLAB:qsubjobarray.m&amp;action=history"/>
	<updated>2026-05-08T19:11:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:MATLAB:qsubjobarray.m&amp;diff=4491&amp;oldid=prev</id>
		<title>Jpdiaz: remove reference to amica to provide separate details about running amica via openmpi on hoffman</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:MATLAB:qsubjobarray.m&amp;diff=4491&amp;oldid=prev"/>
		<updated>2021-04-01T09:16:16Z</updated>

		<summary type="html">&lt;p&gt;remove reference to amica to provide separate details about running amica via openmpi on hoffman&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:16, 1 April 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  %    This script uses the Fieldtrip qsub toolbox to submit a job array&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  %    This script uses the Fieldtrip qsub toolbox to submit a job array&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  %    that runs the function &amp;#039;step2_preprocessUpToDipfit&amp;#039; on each individual .set file.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  %    that runs the function &amp;#039;step2_preprocessUpToDipfit&amp;#039; on each individual .set file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; %    The function performs ASR, AMICA, DIPFIT, and ICLabel which can take about&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; %    3000-14000 seconds to run on a single subject.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  %     &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  %     &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jpdiaz</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:MATLAB:qsubjobarray.m&amp;diff=4485&amp;oldid=prev</id>
		<title>Jpdiaz: fieldtrip qsub example</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:MATLAB:qsubjobarray.m&amp;diff=4485&amp;oldid=prev"/>
		<updated>2021-03-30T00:40:46Z</updated>

		<summary type="html">&lt;p&gt;fieldtrip qsub example&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; %% qsubjobarray.m&lt;br /&gt;
 %&lt;br /&gt;
 %    This script uses the Fieldtrip qsub toolbox to submit a job array&lt;br /&gt;
 %    that runs the function &amp;#039;step2_preprocessUpToDipfit&amp;#039; on each individual .set file.&lt;br /&gt;
 %    The function performs ASR, AMICA, DIPFIT, and ICLabel which can take about&lt;br /&gt;
 %    3000-14000 seconds to run on a single subject.&lt;br /&gt;
 %    &lt;br /&gt;
 &lt;br /&gt;
 % add paths, which will be passed to qsub&lt;br /&gt;
 addpath /u/project/CCN/apps/matlab/fieldtrip/qsub/    % qsub toolbox&lt;br /&gt;
 addpath /u/project/CCN/apps/matlab/eeglab/14.1.0b/    % eeglab &lt;br /&gt;
 &lt;br /&gt;
 % generate list of all .set files within specific folder&lt;br /&gt;
 FILELIST=dir(&amp;#039;/u/project/labgroup/EEG/allsubjs/reprocessed/step1/*.set&amp;#039;);&lt;br /&gt;
 &lt;br /&gt;
 % commands to setup env&lt;br /&gt;
 qmem = 2024*2024*2024;       % in bytes (~8GB)&lt;br /&gt;
 qtim = 14400;                % in seconds (4HR)&lt;br /&gt;
 qopt = &amp;#039;-j y -pe shared 4 &amp;#039;; % options (note trailing space)&lt;br /&gt;
 &lt;br /&gt;
 % usual commands to initiate matlab&lt;br /&gt;
 matlabcmd=&amp;#039;. /u/local/Modules/default/init/modules.sh; module load matlab/9.1; matlab&amp;#039;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 %% Submit Job Array &lt;br /&gt;
 jobidarray={};&lt;br /&gt;
 &lt;br /&gt;
 % Enter the main loop&lt;br /&gt;
 for i = 1:size(FILELIST,1) % 500 per user job limit &lt;br /&gt;
   &lt;br /&gt;
   % call to qsubfeval command&lt;br /&gt;
   jobidarray{i}= qsubfeval(@step2_preprocessUpToDipfit, FILELIST(i), ...&lt;br /&gt;
                        &amp;#039;memreq&amp;#039;,    qmem,     ... % bytes&lt;br /&gt;
                        &amp;#039;timreq&amp;#039;,    qtim,     ... % seconds &lt;br /&gt;
                        &amp;#039;backend&amp;#039;,   &amp;#039;sge&amp;#039;,    ... % SGE&lt;br /&gt;
                        &amp;#039;diary&amp;#039;,     &amp;#039;always&amp;#039;, ... % log level&lt;br /&gt;
                        &amp;#039;options&amp;#039;,   qopt,     ...&lt;br /&gt;
                        &amp;#039;matlabcmd&amp;#039;, matlabcmd);&lt;br /&gt;
   &lt;br /&gt;
   pause(10) % 10 seconds (to avoid overload)&lt;br /&gt;
 &lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 % save array to load output at later time&lt;br /&gt;
 save jobarray.mat jobidarray&lt;/div&gt;</summary>
		<author><name>Jpdiaz</name></author>
	</entry>
</feed>