HPC/Applications/matlab/Parallel: Difference between revisions

From CNM Wiki
< HPC‎ | Applications‎ | matlab
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==
MathWorks offers two components to operate MATLAB in parallel.
MathWorks offers two components to operate MATLAB in parallel.
# [http://www.mathworks.com/help/distcomp/ The Parallel Computing Toolbox] (PCT).  
# The [http://www.mathworks.com/help/distcomp/ '''Parallel Computing Toolbox'''] (PCT).  
#: Provides the language features and capabilities for execution on a ''single machine'', including GPU use.
#: Provides the language features and capabilities for execution on a ''single machine'', including GPU use.
# [http://www.mathworks.com/products/distriben/ The MATLAB Distributed Computing Server] (MDCS, formerly known as MDCE).
#* http://www.mathworks.com/help/distcomp/ (current release)
#* http://www.mathworks.com/help/releases/R2013a/distcomp/ (R2013a)
# The [http://www.mathworks.com/products/distriben/ '''MATLAB Distributed Computing Server'''] (MDCS, formerly known as MDCE).
#: Requires and extends the Toolbox for use across ''multiple machines''.
#: Requires and extends the Toolbox for use across ''multiple machines''.


Line 16: Line 18:


=== Note on MATLAB releases ===
=== Note on MATLAB releases ===
* http://www.mathworks.com/help/distcomp/ (current release)
* http://www.mathworks.com/help/releases/R2013a/distcomp/ (R2013a)
The MATLAB version that is installed on Carbon as of 2014-02 is R2013a, the last release supported under Enterprise Linux 5.x.
The MATLAB version that is installed on Carbon as of 2014-02 is R2013a, the last release supported under Enterprise Linux 5.x.
Keep this in mind when navigating MathWorks documentation.
Keep this in mind when navigating MathWorks documentation.
Line 30: Line 29:
*: Automatic start of a parallel pool when executing code that uses parfor or spmd
*: Automatic start of a parallel pool when executing code that uses parfor or spmd


== Caveats ==
=== Terminology ===
; Batch Job:
: This is a little relation to jobs executed on Carbon under PBS. MATLAB has its own, peculiar, [http://www.mathworks.com/help/releases/R2013a/distcomp/batch-processing.html Batch Processing] engine that allows the user to run code in the background of a MATLAB interactive session, while having full use of that session (command prompt etc.).
; Cluster Profile:
: A definition for a parallel environment, typically either for running on a local machine or on Carbon compute nodes.
 
== Getting started ==
; TODO:
* http://www.mathworks.com/help/releases/R2013a/distcomp/getting-started-with-parallel-computing-toolbox.html
* http://www.mathworks.com/help/releases/R2013a/distcomp/introduction-to-parallel-solutions.html
* http://www.mathworks.com/help/releases/R2013a/distcomp/parallel-configurations-for-cluster-access.html
 
== Caveats using MDCS ==
* At the close of an MDCS <code>matlabpool</code>, Carbon will send a job completion mail like this:
  An error has occurred processing your job, see below.
  An error has occurred processing your job, see below.
  Post job file processing error; job 435379.sched1.carboncluster on host n189/7+n189/6+…+n187/0
  Post job file processing error; job 435379.sched1.carboncluster on host n189/7+n189/6+…+n187/0
Line 39: Line 51:
  *** end error output
  *** end error output
  Output retained on that host in: /var/spool/torque/undelivered/''435379''.sched1.carboncluster.OU
  Output retained on that host in: /var/spool/torque/undelivered/''435379''.sched1.carboncluster.OU
: This mail can be ignored.

Latest revision as of 22:40, February 18, 2014

Introduction

MathWorks offers two components to operate MATLAB in parallel.

  1. The Parallel Computing Toolbox (PCT).
    Provides the language features and capabilities for execution on a single machine, including GPU use.
  2. The MATLAB Distributed Computing Server (MDCS, formerly known as MDCE).
    Requires and extends the Toolbox for use across multiple machines.

The Parallel Computing Toolbox:

  • provides high-level constructs (such as parallel for-loops, special array types, and parallelized numerical algorithms) to parallelize applications without CUDA or MPI programming,
  • supports CUDA-enabled NVIDIA GPUs (available on Carbon login nodes and gen3 nodes),
  • supports up to twelve workers (computational engines) to execute applications locally on a multicore machine,
  • can run parallel applications interactively or in batch.

Adding MDCS,

  • applications using PCT can run on a cluster (across multiple nodes) without changing the code.

Note on MATLAB releases

The MATLAB version that is installed on Carbon as of 2014-02 is R2013a, the last release supported under Enterprise Linux 5.x. Keep this in mind when navigating MathWorks documentation. There have been some changes from R2013b onward, but R2013a code constructs will continue to run for now.

For the record, the changes are:

Terminology

Batch Job
This is a little relation to jobs executed on Carbon under PBS. MATLAB has its own, peculiar, Batch Processing engine that allows the user to run code in the background of a MATLAB interactive session, while having full use of that session (command prompt etc.).
Cluster Profile
A definition for a parallel environment, typically either for running on a local machine or on Carbon compute nodes.

Getting started

TODO

Caveats using MDCS

  • At the close of an MDCS matlabpool, Carbon will send a job completion mail like this:
An error has occurred processing your job, see below.
Post job file processing error; job 435379.sched1.carboncluster on host n189/7+n189/6+…+n187/0

Unable to copy file /var/spool/torque/spool/435379.sched1.carboncluster.OU to /home/stern/somedir/Job1/Job1.log
*** error from copy
/bin/cp: cannot create regular file `/home/stern/somedir/Job1/Job1.log': No such file or directory
*** end error output
Output retained on that host in: /var/spool/torque/undelivered/435379.sched1.carboncluster.OU
This mail can be ignored.