Answered
how to use arrayfun for gpu
In general, arrayfun allows you to speed up cases where you have lots of elementwise operations to perform. You need to look ins...

14 years ago | 0

| accepted

Answered
Segmentation Faults and Thread-Safety in Parfor Loops: Part II
Please note that 'thread safety' really shouldn't be the major concern here. When you open a MATLABPOOL, you are starting severa...

14 years ago | 1

Answered
Parfor on GPU
Yes, you can do this. Whether you get much benefit depends on whether you have multiple GPUs in your system (under some circumst...

14 years ago | 6

| accepted

Answered
fill() in parfor loop
Unfortunately, you cannot use a PARFOR loop in this way. The workers cannot create graphics on your client.

14 years ago | 2

Answered
fprintf output in a parallel computing job
If you use the <http://www.mathworks.com/help/toolbox/distcomp/batch.html batch> function to submit a job, you can use the "diar...

14 years ago | 1

| accepted

Answered
Asynchronous GPU calculations
The asynchronous nature of the kernel invocations should be completely transparent in terms of functionality (if it isn't, then ...

14 years ago | 1

| accepted

Answered
Parallel Code
If you have Parallel Computing Toolbox, you could do this: % first start up 2 local workers matlabpool open local 2 ...

14 years ago | 0

Answered
Use of an anonymous functions with additional parameters within a spmd-block
You need to work around the fact that SPMD blocks cannot call internal functions or define anonymous functions. I would do it li...

14 years ago | 0

| accepted

Answered
Communicating between parfor loop iterations
I don't think there's a reliable way to achieve this with PARFOR. I would be tempted to investigate SPMD which does allow commun...

14 years ago | 0

| accepted

Answered
Parallel Computing Toolbox: Lost Data when Error occur
There's no built-in way to checkpoint your computations. You could either split your PARFOR loop into smaller chunks and save th...

14 years ago | 0

Submitted


Blackjack computational kernel
Simulation of a single hand of blackjack

14 years ago | 1 download |

0.0 / 5

Answered
parfor loop stalls where a for loop does fine, no error
The main difference when running PARFOR are that different iterations of the loop are executed by different processes. So, if yo...

14 years ago | 0

Answered
Memory spike when using previously declared variable in spmd block
One more thing, if you need the same data on each worker, you could also do this: c = Composite(); c{1} = getMyLarge...

14 years ago | 4

| accepted

Answered
Memory spike when using previously declared variable in spmd block
If you need to build data from client-side, you can use the explicit <http://www.mathworks.co.uk/help/toolbox/distcomp/brukctb-1...

14 years ago | 3

Answered
running distributed jobs
You need to give the name of the script to the createTask function, like so: sched = findResource(...); job = create...

14 years ago | 1

| accepted

Answered
Loop on gpu
The nearest equivalent on the GPU is to use arrayfun. This implicitly loops over each element of your input gpuArray, so there's...

14 years ago | 1

| accepted

Answered
Way to save results to a file inside a parfor loop
See <http://www.mathworks.com/matlabcentral/answers/33127-whats-the-best-command-to-write-to-file-inside-parfor-loop this answer...

14 years ago | 0

| accepted

Answered
Mutex for Increment in Matlab Parfor?
It's only the indexing into results that PARFOR doesn't understand. The following should work I think: results = 0; parf...

14 years ago | 1

| accepted

Answered
does parfor support global variables?
There are two restrictions. # You cannot place a GLOBAL declaration directly inside a PARFOR loop # The MATLAB workers execu...

14 years ago | 0

Answered
Error caught during construction of remote parfor code
The error message indicates that perhaps you're trying to send too much data into the body of the PARFOR loop. For example, the ...

14 years ago | 0

Answered
Whats the best command to write to file inside parfor loop?
Inside PARFOR, you can still access the current task, and get its ID - that will be unique. My "Worker Object Wrapper" has an ex...

14 years ago | 4

| accepted

Answered
Parallel computing problem
GLOBAL data is never shared between your desktop MATLAB session and the workers running jobs and tasks. However, you might find ...

14 years ago | 0

Answered
GPU computing with 32bit matlab in 64 bit windows 7 system
Have you tried using the 64bit MATLAB?

14 years ago | 0

Answered
Can I step in .cu file when doing GPU parallel computing in MATLAB
Running MATLAB under a CUDA debugger is possible, but rather difficult. You first need to ensure you can use the debugger on a s...

14 years ago | 0

| accepted

Answered
Matrix Dimension Error with Parfor
You cannot use GLOBAL data together with PARFOR in this way. The MATLAB workers in your pool are separate processes and therefor...

14 years ago | 0

Answered
Parallel Configuration Validation: times out, but job finishes; what to do?
You must use the same version of MATLAB on both the client and the cluster. (Although that may not be the only problem - when jo...

14 years ago | 0

Answered
fread directly to GPU memory
Unfortunately, there's no way to do that. The nearest you can get is to pre-allocate the gpuArray, fread chunks of data, and the...

14 years ago | 2

| accepted

Answered
Identifying lab id within a parfor
As mentioned elsewhere, LABINDEX will not work for this purpose. You could either use t = getCurrentTask(); t.ID to find...

14 years ago | 6

| accepted

Answered
image processing with parallel approach
In PMODE, run some code that does this: switch labindex case 1 runFcn1(); case 2 runFcn2(); .....

14 years ago | 1

Answered
image processing with parallel approach
The other options are: # Non-interactive <http://www.mathworks.co.uk/help/toolbox/distcomp/bqur7dy.html jobs and tasks> # <h...

14 years ago | 1

Load more