Answered
function with unknown number of outputs within parfor
The trick here is that (unfortunately) you need to assign the outputs of your function to a temporary variable, and convince |pa...

10 years ago | 1

| accepted

Answered
Object Indices in parfor loop
If |ppiUpdater| is an object instance that you're trying to call a method of, you might want to use the "functional" form of met...

10 years ago | 0

Answered
gpuArray sparse memory usage
The first time you start up any of the GPU support within MATLAB, a series of libraries are loaded, and these consume memory on ...

10 years ago | 1

| accepted

Answered
arrayfun on GPU with each call working from common block of data
|arrayfun| on the GPU cannot access the parent workspace of anonymous functions, but it can access the parent workspace for _nes...

10 years ago | 0

Answered
How to save inside parfor loops - Save in external function doesn not work.
I _think_ the problem here is that because of the way you're using |hyp1_count_var|, |parfor| is treating it as a _temporary_ lo...

10 years ago | 0

Answered
How to only use 2 of my 4 cores (intel i5) to train neural network?
I tried the following: N=2; myCluster=parcluster('local'); myCluster.NumWorkers=N; parpool(myCluster,N) [...

10 years ago | 0

Answered
Speeding up a batching process that takes too long
You can use <http://www.mathworks.com/help/distcomp/parfeval.html |parfeval|> on top of a parallel pool to do this. (Note that b...

10 years ago | 1

| accepted

Answered
How to stop all workers simultaneously when an error occurs in one of the workers?
You can do this using <http://www.mathworks.com/help/distcomp/parfeval.html |parfeval|> to send off individual tasks for executi...

10 years ago | 2

Answered
How does parfor divide the input array?
Walter's answer is conceptually correct, but as he observes, misses some of the nuances of the implementation. The current imple...

10 years ago | 1

Answered
Find optmal number of parallel workers (depending on machine memory)
This is a tricky problem to handle automatically - I think your best bet is simply to time and observe the behaviour on your sys...

10 years ago | 0

| accepted

Answered
How can I classify a variable that takes a path and inputs it in a function in parfor
@Jon already gave you an answer that should work, but for the record - the reason |parfor| is upset about |file| is that it _app...

10 years ago | 0

Answered
Parallel Computing Toolbox - Java object transfer from client to workers
When you pass any MATLAB variables (including those that refer to Java objects) into |parfor|, |parfeval|, etc., then the conten...

10 years ago | 2

| accepted

Answered
How to get username in Parallel Computing
You have several options here. First, you could simply compute your username outside the |parfor| loop myusername = getenv(...

10 years ago | 0

Answered
Manipulate mxGPUArrays in conjunction with shared C libraries
Yes, all of this should be possible. You can extract the underlying pointer to the data of a |gpuArray|. I suggest starting with...

10 years ago | 1

| accepted

Answered
Standalone application (Compiler toolobox) of a code using the Parallel computing toolbox
This is a known problem when compiling applications that use |parfor|, and there is a simple workaround documented <http://www.m...

10 years ago | 0

Answered
Parallel Random Number Generator
Yes, I believe your code is correct, and is basically the same initialization that is already carried out by Parallel Computing ...

10 years ago | 0

| accepted

Answered
Issue passing reduction variable by reference with parallel for-loop
Unfortunately, handle class objects get _copied_ to and from the workers, as described <http://www.mathworks.com/help/distcomp/o...

10 years ago | 1

Answered
Commenting Simulink Blocks in Parfor Loop
You should be able to do this by using |set_param|, something like this: set_param('model/path/block', 'Commented', 'on') %...

10 years ago | 0

| accepted

Answered
How to recitfy a serialisation error while using a parfor which large data sets?
The problem here is that |images| is a large broadcast variable - you're going to be much better off with that as a _sliced_ var...

10 years ago | 0

| accepted

Answered
"Index exceeds matrix dimensions" error when using parfor
|parfor| is treating |x| as a <http://www.mathworks.com/help/distcomp/sliced-variables.html sliced variable> because of the form...

10 years ago | 3

| accepted

Answered
How to specify the number of labs in smpd?
You're only allowed to have a single |spmd| _context_ active at any given time. An |spmd| context is created when you open an |s...

10 years ago | 2

| accepted

Answered
Error: The variable in a parfor cannot be classified.
An equivalent problem is the following: parfor i=1:5 data = rand(5, 1); for j = 1:numel(data) ou...

10 years ago | 3

Answered
How to use event listners for notifications sent from parfeval functions?
There currently isn't any support for events from |parfeval| futures. What sort of event support were you hoping for? Just a com...

10 years ago | 0

| accepted

Answered
How can I work with 8 cores on Parallel Computing Toolbox?
See <http://www.mathworks.com/matlabcentral/answers/80129-definitive-answer-for-hyperthreading-and-the-parallel-computing-toolbo...

10 years ago | 0

Answered
How to retrieve error message when running script on cluster
The task within the job object returned by the |batch| command has a property called |Error| which has the error stack. You coul...

11 years ago | 1

| accepted

Answered
How can I fix error in working directory location change when using a parallel cluster?
The message in the diary output there is simply a _warning_ that the worker couldn't |cd| to that location. You can use the |Cur...

11 years ago | 1

| accepted

Answered
saving within SPMD or parfor
The problem with the |save| command is that it needs to inspect the contents of the workspace in which it is running. That's not...

11 years ago | 1

| accepted

Answered
Does matlab create only one worker on each core when you use parallel toolbox?
Yes, that's right - the _default_ is to use the number of physical cores (not hyperthreaded cores). You can override this choice...

11 years ago | 0

| accepted

Answered
Function handle as input argument -> conflict with parfeval queue
There are several ways you could work around this. Perhaps the simplest way is to use |batch| jobs rather than |parfeval|. T...

11 years ago | 1

| accepted

Answered
SPMD in matlab - how to store the returned data?
Each |Composite| contains the values computed on each worker. So, you should be able to index into e.g. |res| to get the values ...

11 years ago | 0

Load more