Answered
How can I improve my code by using logical indexing instead of "find" function.
I would try something along these lines: parfor sidx = 1:numel(SS) sigma = SS(sidx); for i = 1:trialSize e...

11 years ago | 0

Answered
Running scripts in parallel on the GPU
I think how you approach this depends on what is in |myfun|. Your best bet is to try to adapt |myfun| to be fully vectorised. Bu...

11 years ago | 0

Answered
I want my 200 jobs to wait in a queue so that they occupy only 40 workers out of 100 workers in our cluster
If you're using an MJS cluster, then |NumWorkersRange| on a single independent job is the way to do this. You'll need multiple |...

11 years ago | 1

| accepted

Answered
Reference a matrix which changes in size throughout parfor loop
Unfortunately, in this case |parfor| has not correctly understood the way you are using a |struct|. To work around this problem,...

11 years ago | 0

| accepted

Answered
Output file names with [conflict]
The best way really is to have each worker write a separate file, especially if you're on Windows. The simplest way is to use th...

11 years ago | 0

Answered
Difference in output of find when using gpuArray
I tried this in R2015a using a Tesla C2070 GPU and found no difference. a1 = gpuArray.zeros(12,12,12); a2 = zeros(12,12,...

11 years ago | 0

Answered
Bisection Method in parallel
This loop cannot run in |parfor| for two reasons - firstly, the iterations are not order-independent (this is a fundamental requ...

11 years ago | 0

Answered
Direct GPU-to-GPU Communication with Parallel Computing Toolbox / SPMD
Unfortunately, as you observe, Parallel Computing Toolbox currently has no means by which to achieve this. I believe you can use...

11 years ago | 0

Answered
Help with using parfor (possible indexing problem)
I would suggest making a few changes to your code that should eliminate all the code analyzer warnings / variable classification...

11 years ago | 0

Answered
Using Parfor for two separate matrix multiplication
I think the problem here is that your |parfor| syntax explicitly asks the loop to run on only one worker: parfor (t=1:1000,...

11 years ago | 0

Answered
Why parfor is slower than for in my algorithm?
|parfor| is only faster than |for| when the overheads are lower than the computation time. In this case, there is a relatively l...

11 years ago | 0

| accepted

Answered
significant increase of memory when moving part of the code to GPU
When you move the code to the GPU, MATLAB loads a suite of supporting CUDA libraries to provide implementations of |fft| etc. I ...

11 years ago | 1

| accepted

Answered
linear least squares/mldivide for large matrices in parallel?
If you have access to a cluster of machines, you could use |distributed| arrays to solve the large system in parallel using the ...

11 years ago | 0

| accepted

Answered
How to Pin Workers to Specific Cores
What OS are you using? If Windows, you could adapt the code from <http://stackoverflow.com/questions/9778287/set-processor-affin...

11 years ago | 1

| accepted

Answered
Fast subarray access when using GPU matrices
I think the best way to proceed is to concoct a single indexing expression that you can use with |smaller_array| to result in a ...

11 years ago | 0

Answered
User input during parallel computing
As you have discovered, workers cannot read user input. You need to gather user input at the MATLAB client. I would suggest usin...

11 years ago | 0

| accepted

Answered
parallel processing on one (several) GPUs
See this answer <http://www.mathworks.com/matlabcentral/answers/184493-how-can-i-get-multiple-gpu-workers-in-only-cpu-session>.

11 years ago | 0

| accepted

Answered
Persist data on GPU between parfor Calls
Normally I would recommend the <http://www.mathworks.com/matlabcentral/fileexchange/31972-worker-object-wrapper Worker Object Wr...

11 years ago | 0

| accepted

Answered
Run parfor as for loop
Unfortunately there is no programmatic way to change the preference. What you can do is use the optional argument to |parfor| th...

11 years ago | 4

| accepted

Answered
GPU gather command clarification and GPU memory usage
# In this case, |x| still exists on the GPU - in general, input arguments to functions are not modified in MATLAB (some exceptio...

11 years ago | 0

| accepted

Answered
Sharing Information Between Client and Workers with the Parallel Computing Toolbox
If you want to perform interactive parallel computing, you might be better off investigating the capabilities of the <http://www...

11 years ago | 0

Answered
About PARFOR using 2d array
To make |SR|, |SG|, and |SB| be "sliced" output variables from the |parfor| loop, you need to follow the rules <http://www.mathw...

11 years ago | 0

Answered
Suitability of parallel computing?
You could use the |gpuArray| support from PCT to perform this calculation. On my machine, this runs about 15x faster. (I have a ...

11 years ago | 0

Answered
Parallel Computing Toolbox: Client/Server Compatibility?
The compatibility matrix is the identity matrix - i.e. PCT version must match MDCE version. This is mentioned in the <http://www...

11 years ago | 0

| accepted

Answered
Convert Composite to array?
Yes, you can use |Composite| indexing (which behaves pretty much like |cell| array indexing), like this: spmd x = labi...

11 years ago | 1

| accepted

Answered
How can i run 2 functions in parallel with MATLAB parallel Computing Toolbox? looking for an easy example code!
In R2010b, your options are to use either |parfor| or |spmd|. (In R2013b and later, there's |parfeval| which gives more flexibil...

11 years ago | 1

| accepted

Answered
Diagonal matrix size reduction
In R2015a, sparse support was added to |gpuArray| - perhaps this might help you? |mtimes| is one of the methods that is implemen...

11 years ago | 0

| accepted

Answered
How to pass class method handle to createTask
Remember that MATLAB class methods can always be invoked in the "functional" form, like so: e = MException('some:identifier...

11 years ago | 0

| accepted

Answered
How can i get multiple GPU workers in only CPU session?
You need to do something <http://blogs.mathworks.com/loren/2013/06/24/running-monte-carlo-simulations-on-multiple-gpus/ a bit li...

11 years ago | 1

| accepted

Answered
Writing video in a parfor fails
Firstly, when the |VideoWriter| object is passed to the workers, each worker gets a separate _copy_ of that object (as if it has...

11 years ago | 0

| accepted

Load more