MATLAB Answers

Parallel Computing Toolbox requirements, GPU usage

6 views (last 30 days)
Do I need more than one Matlab/Simulink license in order to run parallel simulations in several cores/GPU/computer clusters?
How is the GPU used by this toolbox? Does it always help or it depends on the kind of simulations I am running?
I usually run simulations of large and complex models and with small step sizes

  0 Comments

Sign in to comment.

Accepted Answer

Jason Ross
Jason Ross on 17 Jan 2020
I'll answer your question in a few parts.
License questions
  • In addition to other products and toolboxes, the Parallel Computing Toolbox license is all that you need to access resources local to your machine -- you can make a pool of workers that will use your machine's CPU, and you will be able to access the GPU.
  • To access compute clusters, your client host needs the Parallel Computing Toolbox. The compute cluster will need to have Parallel Server installed on it, and licensed appropriately for the number of worker processes that will run on the cluster. You can also access GPUs in the cluster if you have them. Parallel Server can be set up as its own job scheduler, or can be integrated with a number of popular job schedulers if you have an existing compute cluster.
Functionality questions
  • Parallel Computing Toolbox will give you the ability to run certain functions on the GPU. The functions that support GPU differ by toolbox, so you will need to check the toolbox documentation to see if the functions you are using can use the GPU. As an example, see this documentation page, but do also check the documentation for all of your toolboxes to see what's supported. There are also new features added with each release, so the release notes will also let you know if support is added.
  • Support for parallelization is also dependent on the toolbox/product in question. You will need to check the documentation for the products that you use to see if it can take advantage of a parpool. For running Simulink models in parallel, there is documentation here

  1 Comment

Walter Roberson
Walter Roberson on 17 Jan 2020
The GPU does not always help. There are situations in which the GPU is slower even when it is available -- especially if the computation involves indexing arrays.
Using explicit parallell processing (parfor and related tools) does not always help. It is common when you start developing parallel code for the parallel version to be notably slower than the original. There are some kinds of problems that can use parallel processes well, but a lot of the time, vectorization and automatic internal parallel operations has more benefits than using explicitly parallel operations.

Sign in to comment.

More Answers (1)

Javier Saumell
Javier Saumell on 20 Jan 2020
Thanks for the answers, they were very helpful!

  0 Comments

Sign in to comment.

Sign in to answer this question.