Answered
Accessing gpuDevice WITHOUT resetting it, and without carrying around a gpuDevice handle, or declaring a global
You can simply use gpuDevice() with no input arguments to access the currently selected GPU device without resetting it.

7 years ago | 1

| accepted

Answered
After uninstalling CUDA toolkit still MATLAB responds for gpuDevice() !!
MATLAB and Parallel Computing Toolbox need the CUDA driver to be installed on your system, not the CUDA toolkit. I admit it is...

7 years ago | 1

Answered
How to reset job numbering in MATLAB Distributed Computing Server?
Unfortunately, there is indeed no way to do that (using the MATLAB Job Scheduler) without shutting down the jobmanager, and star...

7 years ago | 1

Answered
How to measure parfeval() execution time?
A parallel.Future instance has StartDateTime and FinishDateTime properties - you can subtract these to get an idea of the execut...

7 years ago | 0

Answered
Advantages of parpool vs. job/tasks vs. multiple batches?
If you want to be able to quit the client machine while the process is running, then either |batch| or |createJob| & |createTask...

7 years ago | 0

| accepted

Answered
Why does batch generate a different sequence of random numbers even when seeding the rng?
The problem here is that desktop MATLAB has a different default random number generator type than a Parallel Computing Toolbox w...

7 years ago | 1

| accepted

Answered
Parfeval - Memory consumption piling up - Clear output data?
It would be really helpful if you could come up with an <https://stackoverflow.com/help/mcve mvce> to demonstrate the problem, a...

7 years ago | 0

| accepted

Answered
How can I send data on the fly to a worker when using parfeval?
I think it's possible to do this sort of thing by getting the workers to create a <https://uk.mathworks.com/help/distcomp/parall...

7 years ago | 1

| accepted

Answered
Can parfor be used in my case?
The problem here turns out to be quite simple to work around. You're assigning to elements of |TCP_m| in the loop over |m|, but ...

7 years ago | 0

| accepted

Answered
How can I run this parfor loop?
One of the primary requirements of a |parfor| loop is that the iterations must be <https://uk.mathworks.com/help/distcomp/ensure...

7 years ago | 1

Answered
R2018b release notes has "batchsim"... how is this different than Parallel Computing Toolbox?
<https://uk.mathworks.com/help/simulink/slref/batchsim.html |batchsim|> is new in R2018b, and is designed to work with Parallel ...

7 years ago | 1

Answered
multiple cprintf in parallel loop problem
To stop the output being interleaved, you need to send all the stuff to be printed as a single message. Here's one way: q...

7 years ago | 0

| accepted

Answered
cprintf not working in parallel situation
The way |cprintf| is implemented relies on manipulating the command window in a way that simply cannot be done for a parallel wo...

7 years ago | 1

| accepted

Answered
How to send files from worker to client in MDSC?
There's no facility to transfer files from the workers back to the client. If you can, I would suggest reading the files into me...

7 years ago | 0

| accepted

Answered
How to use ImageDataStore together with tall array?
The output of the |imageDatastore| is a |tall| |cell| array, so you'll almost certainly want to use |cell2mat| to convert this t...

7 years ago | 2

| accepted

Answered
Matlab MDCS with loadlibrary, Module not found...
I _suspect_ that even if the actual |.dll| file is correctly available on the workers, perhaps some dependent libraries are not ...

7 years ago | 0

| accepted

Answered
sim command in try/catch, in parfor results in error
I'm not 100% sure what's going on there, but it might work simply to say: simout = cell(1,2); parfor ii=1:2 try ...

7 years ago | 0

| accepted

Answered
Parallel computing for images processing
Rather than using |labSend| and |labReceive| inside an |spmd| block, I would suggest simply re-writing this as a |parfor| loop w...

7 years ago | 0

| accepted

Answered
Disable automatic conversion to reals
MATLAB's behaviour has always been to drop the imaginary part on indexing operations (where it is all zero!). |gpuArray| is some...

7 years ago | 0

| accepted

Answered
Can I modify random positions of a logical vector inside a parfor?
You can recast this as a |parfor| <https://uk.mathworks.com/help/distcomp/reduction-variable.html reduction>, like so: Vect...

7 years ago | 0

Answered
Parcluster issue Matlab 2018a
The version of MATLAB used as your client must match exactly the version on the cluster. This is mentioned in the <https://uk.ma...

7 years ago | 0

| accepted

Answered
Matlab parfor saves and loads temporary variables during execution!
The workers executing the body of any |parfor| loop are separate MATLAB processes, so the only reliable way that variables exist...

7 years ago | 2

Answered
Is there a way to skip serializing for specific objects in a parfor loop
Recent versions of MATLAB (R2015b and later if my memory serves correctly) are usually pretty good at only sending stuff to the ...

7 years ago | 0

Answered
Parfor or parfeval, what is better?
At least some of the trade-offs are: * |parfor| is generally easier to use, and the code probably looks much more like your s...

7 years ago | 4

| accepted

Answered
Is there a way to avoid writing every variable name when using gather?
You could use date_and_time = gather(tt); or [date, time] = gather(tt.(1), tt.(2)); or if you end up with more v...

7 years ago | 0

| accepted

Answered
how to storage output data from a nested parfor loop?
In this case, |x| is a 3-element vector. You can store each of these vectors in a 4-D array like so: for i = 1:5 ... ...

7 years ago | 0

| accepted

Answered
How do I convert the following matlab code loops to batched form?
|pagefun| expects to operate over "pages" of your multi-dimensional array. These pages are slices taking in only the first two d...

7 years ago | 0

| accepted

Answered
Flattening of gpuArray - row major or column major order?
|gpuArray| data is stored in column-major format, just like CPU data in MATLAB.

7 years ago | 0

| accepted

Answered
ho to change cell array elemen value to Nan, when using gpuarray?
Instead of a 1x499 cell array of 5x5 |gpuArray| matrices, why not consider a 5x5x499 array. You can convert your existing |cell|...

7 years ago | 0

| accepted

Answered
I get a warning in parfor (line 4) which might be unnecessary. Can I ignore it?
That warning is telling you that |A| is a <https://uk.mathworks.com/help/distcomp/broadcast-variable.html _broadcast_> variable....

7 years ago | 0

| accepted

Load more