Answered
populating a tall array in a for loop
What I think you should do is something like the following: % Choose a directory to store the files outDir = '/tmp/tall_...

7 years ago | 4

Answered
Indexing Arrays for Loops in a gpuArray/arrayfun-called Function
|gpuArray| does support indexing, but only limited forms are allowed within the context of |arrayfun|. The limitations for the G...

7 years ago | 0

| accepted

Answered
Parallel pool costant doesn't work as expected
You need to pass the |Constant| instances explicitly to the functions invoked on the workers, rather than using |global|. As usu...

7 years ago | 0

| accepted

Answered
How the labindex was assigned for the workers inside a node/machine in MDCS?
You don't specify which cluster type you're using with MDCS, but I'm going to assume MJS for now. (Not all of what follows will ...

7 years ago | 2

| accepted

Answered
GPU for loop parallelization
This can be done on the GPU I think, but you will definitely need to get rid of your |global| variables. <https://uk.mathworks.c...

7 years ago | 0

Answered
How to halt parfor execution from a UI
You might find it simpler to restructure your code to use |parfeval| rather than |parfor|. There's an example in the documentati...

7 years ago | 0

| accepted

Answered
Saving data in background
I fear that handing the data off to another process simply to |save| it will not actually give you any benefit. The reason for t...

7 years ago | 1

Answered
Tall vs distributed array
Both |tall| and |distributed| arrays are designed for processing large amounts of data, but they have somewhat different capabil...

7 years ago | 0

Answered
spmd error: Could not deserialize object: java.io.IOException
The problem here is that you appear to be creating a java object in the MATLAB client process that cannot be transferred to the ...

7 years ago | 1

| accepted

Answered
Making sliced variables persist between multiple PARFOR loops
Hm, interesting problem - unfortunately, there isn't really any sensible way to use |parallel.pool.Constant| here while still us...

7 years ago | 0

| accepted

Answered
why innerjoin does not work in parfor?
(x-post from identical question on stackoverflow) Unfortunately, |innerjoin| uses the |inputname| function, which is causing ...

7 years ago | 2

Answered
Parallel is slower than sequential?
There are a couple of reasons that your |parfor| loop is slower than the |for| loop equivalent. Firstly, there's the data transf...

7 years ago | 0

Answered
Cannot use database cursor object inside a parfor
You need to create the database connection |targetConn| directly on the workers. One way to achieve this is to use a <https://uk...

8 years ago | 2

Answered
How to implement the "tsearchn" algorithm 2 in a parfor loop?
The problem here is that the loop iterations are order-dependent. |parfor| can only operate when the iterations are independent ...

8 years ago | 0

Answered
Using parfor on cluster, changing number of cores per worker
You can set the |NumThreads| property of your cluster object. For example: c = parcluster c.NumThreads = 2; j = batch(c, ...

8 years ago | 0

| accepted

Answered
How to execute multiple spmd blocks in parallel?
You have already discovered |batch|, which I believe does everything you need. The alternative is to use <https://uk.mathworks.c...

8 years ago | 2

Answered
Complex numbers in ifft(fft(x))
The |gpuArray| implementation of the |fft| family of functions always returns complex results. This is described in the help tex...

8 years ago | 0

Answered
parfor load balancing chunksize
|parfor| offers no means of controlling the chunk size. <https://uk.mathworks.com/help/distcomp/parfeval.html |parfeval|> allows...

8 years ago | 1

| accepted

Answered
Disp in background thread
You could use |parallel.pool.DataQueue| together with <https://uk.mathworks.com/help/distcomp/parallel.pool.dataqueue.aftereach....

8 years ago | 0

| accepted

Answered
Method Jacobi . Error: The variable x in a parfor cannot be classified.
|parfor| cannot run in this case because the iterations of your loop are order dependent. That is, to calculate a the value of |...

8 years ago | 0

Answered
How to determine number of workers?
The number of workers in your batch parallel pool should not exceed the number of loop iterations, i.e. it is not useful to make...

8 years ago | 0

| accepted

Answered
getting results after a code with a smpd block
# Yes, each output is the result of an independent run of |myfun| # Be aware that MATLAB intializes the random state in a deter...

8 years ago | 0

Answered
hist within a parfor creates transparency violation error?
|hist| internally uses |inputname| to support additional functionality in the resulting plot. Unfortunately, using |inputname| i...

8 years ago | 0

| accepted

Answered
error in tall array tables due to missing data in end column of end row
It sounds like you haven't got the format quite right for your |datastore|. I suspect you would encounter the same error if you ...

8 years ago | 0

Answered
Parfor Loop Help: Classification of Variables
@Jeff is correct that replacing |j| with |idx| is a necessary change. This is necessary to allow the |parfor| machinery to reali...

8 years ago | 0

Answered
Unable to set NumThreads when creating a job
Thanks for reporting this - it does indeed look like a bug. I'll forward this report to the appropriate team here at MathWorks. ...

8 years ago | 0

| accepted

Answered
Improving parfor tasks distribution
|parfor| scheduling is designed to work best when iterations are *roughly* similar in execution time. There is some considerati...

8 years ago | 0

| accepted

Answered
"Not enough input arguments" in PARFOR and parallel.pool.Constant (line 120)
The way you're trying to work with |parallel.pool.Constant| values is not quite right. To access the contents of a |parallel.poo...

8 years ago | 0

| accepted

Answered
How can I make the pool to parallel? "Error: The variable hj in a parfor cannot be classified." We always get that error
The problem here is that you are not completely overwriting |hj| on each iteration of the |parfor| loop, and so the iterations a...

8 years ago | 0

| accepted

Answered
indexing within parfor loop
The problem here is that |parfor| can't tell whether you're updating all fields of the variable |p|, and therefore it thinks the...

8 years ago | 0

Load more