This is an old revision of the document!
Ever since Matlab R2008a, I've been copying the “lsf” files forward from release to release to get parallel job submissions working for Lava (v1.x). Every upgrade I ask for Lava integration files instead of having to use generic integration files.
Well, that era came to an end with R2015a. Got it to work but there are some changes.
First the admin side of things: (there has to a better way)
cd /share/apps/CENTOS6/matlab/2015a/toolbox/distcomp/examples/ # read the READMEs on the way down cd integration/ cd lsf/ cd shared/ cp -p * /share/apps/CENTOS6/matlab/2015a/toolbox/local/
You can of course write a submit script and submit it to the scheduler, but with the Distributed Computational Server (or whatever it is called) you can also do it from within Matlab.
# put this in a script myJob.m, then call it from within Matlab or type it all in, or set up a profile % distributed matlab jobs % start 'matlab -nodisplay', issue the command 'myJob' % set up the scheduler and matlab worker environment cluster = parallel.cluster.Generic('JobStorageLocation', '/home/hmeij/matlab'); set(cluster, 'HasSharedFilesystem', true); set(cluster, 'ClusterMatlabRoot', '/share/apps/CENTOS6/matlab/2015a'); set(cluster, 'OperatingSystem', 'unix'); set(cluster, 'IndependentSubmitFcn', @independentSubmitFcn); % If you want to run communicating jobs (including parallel pools), you must specify a CommunicatingSubmitFcn set(cluster, 'CommunicatingSubmitFcn', @communicatingSubmitFcn); set(cluster, 'GetJobStateFcn', @getJobStateFcn); set(cluster, 'DeleteJobFcn', @deleteJobFcn); % create job and assign tasks to be done j = createJob(cluster); createTask(j, @tenfunction, 1, {'log.job1',1,2}) createTask(j, @tenfunction, 1, {'log.job2',3,4}) createTask(j, @tenfunction, 1, {'log.job3',5,6}) % submit job and gather scheduled info submit(j) get(cluster) % you can now exit matlab % at system prompt type 'bjobs'
[hmeij@swallowtail matlab]$ matlab -nodisplay < M A T L A B (R) > Copyright 1984-2015 The MathWorks, Inc. R2015a (8.5.0.197613) 64-bit (glnxa64) February 12, 2015 To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com. Academic License >> myJob ans = Task with properties: ID: 1 State: pending Function: @tenfunction Parent: Job 1 StartTime: Running Duration: 0 days 0h 0m 0s ErrorIdentifier: ErrorMessage: ans = Task with properties: ID: 2 State: pending Function: @tenfunction Parent: Job 1 StartTime: Running Duration: 0 days 0h 0m 0s ErrorIdentifier: ErrorMessage: ans = ...snip... ans = IndependentSubmitFcn: @independentSubmitFcn CommunicatingSubmitFcn: @communicatingSubmitFcn GetJobStateFcn: @getJobStateFcn CancelJobFcn: [] CancelTaskFcn: [] DeleteJobFcn: @deleteJobFcn DeleteTaskFcn: [] Host: 'swallowtail' HasSharedFilesystem: 1 RequiresMathWorksHostedLicensing: 0 JobStorageLocation: '/home/hmeij/matlab' ClusterMatlabRoot: '/share/apps/CENTOS6/matlab/2015a' LicenseNumber: '' OperatingSystem: 'unix' NumWorkers: Inf Type: 'Generic' Profile: '' UserData: [] Jobs: [1x1 parallel.job.CJSIndependentJob] Modified: 1 >> >> quit @swallowtail matlab]$ bjobs JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME 352355 hmeij RUN bss24 swallowtail b49 Job1.1 Mar 13 15:09 352356 hmeij RUN bss24 swallowtail b49 Job1.2 Mar 13 15:09 352357 hmeij RUN bss24 swallowtail b48 Job1.3 Mar 13 15:09
Old pages, might be helpful…