Answered
Is there a way to tell if a function is executing inside a parfor?
You could try using isOnWorker = ~isempty(getCurrentTask()); to see if your code is running on a worker.

11 years ago | 2

| accepted

Answered
matlab parfor to evaluate a function in bunch of 4 rather than all at the same time
The number of simultaneous function evaluations will be determined by the size of the parallel pool that you open. So, if you we...

11 years ago | 0

Answered
Solve Poisson Problem with Finite Difference using parallelization
You might consider using <http://www.mathworks.com/help/distcomp/spmd.html SPMD> blocks within MATLAB - these run blocks of code...

11 years ago | 1

| accepted

Answered
Display image inside parfor loop
One option is to use PARFEVAL and display the images back at the host when they're ready. Here's an example: <http://blogs.mathw...

11 years ago | 0

Answered
elapsed time in parfor
You should be able to solve this problem simply by parameterising your function, a bit like this: function dy = simWithTime...

11 years ago | 0

Answered
how can I write a parallel code in Matlab?
Ideally, you should not open and close the pool for timing purposes - it's intended that you keep the pool open.

11 years ago | 0

Answered
Multiplying a 2d matrix with each slice of 3d matrix
With Parallel Computing Toolbox, you can perform this on the GPU using <http://www.mathworks.com/help/distcomp/pagefun.html PAGE...

11 years ago | 1

Answered
CUDA on Windows 8.1 Matlab R2014a student edition
In R2014a, you should use CUDA Toolkit version 5.5. (This is shown in the output from running 'gpuDevice' - look for the field '...

11 years ago | 1

Solved


Text processing - Help Johnny write a letter home from camp
Johnny overuses the word 'great'. Write a script that will help him with this and future letters. If a sentence contains more ...

11 years ago

Answered
Rewrite "randsample" function, but a variable is indexed, but not sliced
It's OK to have variables that are "indexed but not sliced" - that warning is trying to tell you that you might be transferring ...

11 years ago | 1

| accepted

Answered
About parallel computation and inter process communication
What sort of data are you passing into SPMD? Inside SPMD, only _distributed_ arrays are automatically operated on in parallel. F...

11 years ago | 0

Answered
Error thrown in a parlor loop
Have you tried debugging the loop when running it as a PARFOR? You can force the PARFOR to run locally in your desktop MATLAB in...

11 years ago | 0

| accepted

Answered
FOR to PARFOR - cannot make it right
There are several problems here, but I think the biggest problems you need to overcome is that the result of a PARFOR loop needs...

11 years ago | 0

| accepted

Answered
Multi computer parallel simulation
To use MATLABPOOL with more than one computer, you need <http://www.mathworks.com/products/distriben/ MATLAB Distributed Computi...

11 years ago | 0

| accepted

Answered
Enable multi-threading on a parfor loop
You can use the <http://www.mathworks.com/help/matlab/ref/maxnumcompthreads.html maxNumCompThreads> function (from within an SPM...

11 years ago | 0

| accepted

Answered
Why does the parallel mode slow down the speed of each core/task
Parallel workers run in 'single computational thread' mode, and this can mean that using multiple workers is no faster than usin...

11 years ago | 1

Answered
using CUDA kernel of complex variables
Try using 'double2' in your kernel source code, which should be exactly the same as cuDoubleComplex.

11 years ago | 0

Answered
batch arguements 'pool' v 'matlabpool'?
The older 'Matlabpool' parameter is still supported in the newer versions of Parallel Computing Toolbox, but it will be removed ...

11 years ago | 1

| accepted

Answered
Why does my Matlab 2014a only start 12 workers when I ask for more?
I think the problem here is that you either need to explicitly state when calling parpool how many workers you want, like so: ...

11 years ago | 2

| accepted

Answered
How to use Task.Diary
The task "diary" property is updated automatically when your task function would emit text to the command window. For example: ...

11 years ago | 1

| accepted

Answered
Multi-GPU on MATLAB 2013
Why not use <http://www.mathworks.com/help/distcomp/spmd.html SPMD> to do this once after you've opened the pool? matlabpoo...

11 years ago | 0

Answered
Job monitor fails to update and slow down the matlab startup.
You might have some old corrupt jobs in the local cluster. You can delete the old jobs like this (presuming you don't need the d...

12 years ago | 3

| accepted

Answered
global variables - call function - parfor
Global variables are not synchronized between the desktop MATLAB and the workers, as described <http://www.mathworks.com/help/di...

12 years ago | 0

Answered
how do workers in mdce automatically select GPUs if multiple are available?
Workers use the function 'selectGPU' to determine which GPU device to use. Type help selectGPU in MATLAB for more detail...

12 years ago | 0

| accepted

Answered
Where I can find a cluster to use?
There's more information about what you need to do to set up EC2 <http://www.mathworks.com/discovery/matlab-ec2.html here>.

12 years ago | 0

| accepted

Answered
Why does the sum not defined error happen when using mean(table col) inside a parlor loop?
I get the same error when using a FOR loop. Perhaps you're missing a call to TABLE2ARRAY? I.e. parfor ... b(i,1)=mean(...

12 years ago | 0

Answered
how to make a matrix grow inside a parfor loop?
You should be able to do this. For example, the following works correctly: S = []; parfor idx = 1:10 r = rand(); ...

12 years ago | 0

| accepted

Answered
Error using rgb2array and gpuArray
You need to be using at least R2013b for RGB2GRAY to operate on gpuArray data. See the <http://www.mathworks.com/help/images/rel...

12 years ago | 0

Answered
Usage of sturctures inside parfor!!
A simpler reproduction of the problem is shown below: parfor idx = 1:2 a.x = 1; a.y = 2; end Th...

12 years ago | 2

Answered
The variable location in a parfor cannot be classified. parfor
The reason this doesn't work is that you aren't slicing 'location'. PARFOR output values must either be 'sliced' where the outpu...

12 years ago | 0

Load more