Highlights from
Batch Job

  • batch_job(varargin)
    BATCH_JOB Run a batch job across several instances of MATLAB on the same PC
  • batch_job_collect(s, vara...
    BATCH_JOB_COLLECT Output data computed by a batch job
  • batch_job_distrib(varargin)
    BATCH_JOB_DISTRIB Distribute a MATLAB for loop across several PCs
  • batch_job_submit(job_dir,...
    BATCH_JOB_SUBMIT Submit a batch job to workers
  • batch_job_test
  • batch_job_worker(job)
    BATCH_JOB_WORKER Create a batch_job worker
  • chunk_name(work_dir, ind)
  • construct_function(s)
    Get the global data
  • do_chunk(func, mi, s, a)
    Get the chunk filename
  • do_job(job, kill)
  • getComputerName()
    GETCOMPUTERNAME returns the name of the computer (hostname)
  • get_chunk_indices(a, s)
  • get_file_lock(fname, force)
    GET_FILE_LOCK Grab a file lock for exclusive access to a file
  • kill_signal(s)
    Signalled if the params file is deleted
  • matrify(output)
    Convert the output to a matrix or array
  • num_bytes(A)
  • open_mmap(mmap)
  • preallocate_file(name, nb...
    Allocate the right amount of space
  • quiet_delete(varargin)
  • set_chunk_time(job)
    Do the job initializations
  • setup_job(job)
    Load the job parameters
  • start_workers(s, workers)
    Start the workers
  • timestr(t)
    Time string function
  • tmpname()
  • write_bin(A, fname)
  • View all files

5.0

5.0 | 1 rating Rate this file 12 Downloads (last 30 days) File Size: 10.6 KB File ID: #44077
image thumbnail

Batch Job

by

 

24 Oct 2013 (Updated )

Toolbox to spread batch work over multiple MATLAB instances, even on other PCs

| Watch this File

File Information
Description

This toolbox consists of several functions for spreading work over multiple MATLAB instances.
If you have a for loop which can be written something like:

   for a = 1:size(input, 2)
       output(:,a) = func(input(:,a), global_data);
   end

then the functions in this toolbox can be used to split the for loop iterations across multiple MATLAB instances, including across multiple computing nodes/computers. This is a replacement for parfor in this use case, if you don't have the Parallel Computing Toolbox.

See the README at:
https://github.com/ojwoodford/batch_job/blob/master/README.md
for more information.

These functions are in beta testing. If you have any bug reports or fixes, please raise a github issue.

Acknowledgements

Multicore Parallel Processing On Multiple Cores inspired this file.

Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
24 Jul 2014 Matthew

(This looks like a great piece of work! Thanks!)

It appears that this does not support non-numeric input and output, despite the markdown file stating that cell arrays can be used. I am ideally hoping to pass structs in and out (though cell arrays would also be sufficient) -- is this possible?

16 Feb 2014 almog shalom

Very nice.
I would add to the command that invokes Matlab the option "-nosplash", and maybe also "-nodisplay".

25 Oct 2013 Andreas

Please add an example in the comment section.

Updates
29 Oct 2013

Add example. Improve code.

30 Oct 2013

Add the logo

11 Dec 2013

Bug fix

16 May 2014

Move to github

03 Jul 2014

Update description

Contact us