Warning: Undefined array key "DOKU_PREFS" in /usr/share/dokuwiki/inc/common.php on line 2082
cluster:96 [DokuWiki]

User Tools

Site Tools


cluster:96

Warning: Undefined array key 7 in /usr/share/dokuwiki/inc/html.php on line 1453

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision Both sides next revision
cluster:96 [2011/02/09 14:53]
hmeij created
cluster:96 [2011/02/09 14:55]
hmeij
Line 13: Line 13:
 In the examples below the code waits for the results.  Don't do that when submitting jobs, it is just for debug purposes. Change the last 3 lines with this 'get(sched)' and then you exit Matlab interactive session. In the examples below the code waits for the results.  Don't do that when submitting jobs, it is just for debug purposes. Change the last 3 lines with this 'get(sched)' and then you exit Matlab interactive session.
  
-This old way still works:+This old way still works for distributed jobs:
 <code> <code>
  
Line 41: Line 41:
 </code> </code>
  
 +This old way for parallel jobs does not, not sure why:
 +<code>
 +% start 'matlab -nodisplay', issue the command 'myPJob'
 +
 +% set up the scheduler and matlab worker environment
 +%2007a sched = findResource('scheduler', 'configuration', 'generic')
 +%2007a set(sched, 'Configuration', 'generic')
 +sched = findResource('scheduler','type','LSF')
 +set(sched, 'SubmitArguments', '-R type==LINUX64')
 +set(sched, 'SubmitArguments', '-q matlab')
 +
 +set(sched, 'HasSharedFilesystem', true);
 +set(sched, 'ClusterMatlabRoot', '/share/apps/matlab/2010b')
 +set(sched, 'SubmitFcn', @lsfParallelSubmitFcn)   
 +
 +% specify location for worker output
 +set(sched, 'DataLocation', '/home/hmeij/hp/matlab')
 +
 +% create job and assign tasks to be done
 +
 +set(pj, 'MaximumNumberOfWorkers', 4)
 +set(pj, 'MinimumNumberOfWorkers', 4)
 +
 +% create job and assign tasks to be done
 +pj = createParallelJob(sched);
 +T = createTask(pj, @rand, 1, {{3,3} {3,3} {3,3} {3,3} {3,3}});
 +
 +
 +% submit job, wait to finish, get status jobs, gather results
 +submit(pj)
 +get(sched)
 +
 +% you can now exit matlab
 +% at system prompt type 'bjobs' 
 +
 +</code>
  
 \\ \\
 **[[cluster:0|Home]]** **[[cluster:0|Home]]**
cluster/96.txt ยท Last modified: 2015/03/13 13:52 by hmeij