回答済み
Return values in a parfor loop
Fundamentally, you need to "bind" a value in to the function that gets invoked by afterEach. The simplest way to do this is to u...

5ヶ月 前 | 0

| 採用済み

回答済み
SPMD and Asynchronous execution of an optimization routine?
labSend and labReceive are designed for matched communication, and there isn't any built-in facility to receive only the most re...

5ヶ月 前 | 0

| 採用済み

回答済み
How to distinctly assign job and get the result of each worker using "parfor"?
This sounds more like a job for spmd . Read more about that here: https://www.mathworks.com/help/parallel-computing/spmd.html . ...

6ヶ月 前 | 0

| 採用済み

回答済み
nested for inside parfor, writing to shared variable
parfor knows how to handle "reduction" variables like this correctly. (Behind the scenes, each worker process accumulates a part...

6ヶ月 前 | 0

回答済み
Starting a parfor loop
It might be useful to read this introduction to Parallel Computing Toolbox. In essense, you should simply be able to write a par...

6ヶ月 前 | 0

| 採用済み

回答済み
parfor does not uns parallel pool when a parfeval process is still running
Yes, this behaviour is expected - the different parallel language features parfor, parfeval, and spmd do not share the pool. You...

6ヶ月 前 | 0

| 採用済み

回答済み
Perfomance Loss of Matrix-Vector Multilplication on GPU with Array Indexing
Unfortunately, the expression A(8001:18000,:) requires a strided memory copy. Matrices in MATLAB (even on the GPU) are stored in...

6ヶ月 前 | 1

| 採用済み

回答済み
Why is MATLAB gpuArray sparse matrix multiplication so fast despite using double precision?
You should use gputime it to time operations on the GPU (although I'm not certain it will actually make a difference in this cas...

6ヶ月 前 | 1

回答済み
Parfor loop: how to keep the temporary variables ?
Output variables from parfor must be either sliced or reduction variables. So, you could adapt your code like so: parfor i = 1:...

6ヶ月 前 | 0

| 採用済み

回答済み
Efficient use of matfile within parfor
The problem is all to do with your assignment into v.yC. The parfor analysis cannot tell that this is safe and not order-depende...

6ヶ月 前 | 0

回答済み
How to use GPU arrayfun in App Designer: Function passed as first input argument contains unsupported 'MCOS' language feature 'CLASSDEF'
I think you simply need to make your function func3 be a normal (non-method) function. You should be able to place it in either ...

6ヶ月 前 | 0

| 採用済み

回答済み
parallel processing fine balance
You're quite right that in this case, you're always inevitably going to be held up by the slowest worker. It's almost impossible...

6ヶ月 前 | 0

| 採用済み

回答済み
Pass NET-Object to parallel function (parfeval)
I do think parallel.pool.Constant is probably part of the answer here, but you need to make two changes: Make sure you perform ...

6ヶ月 前 | 1

回答済み
Parfor: Unable to perform assignment because the size of the left side is 98-by-50 and the size of the right side is 107-by-50
Unfortunately, error reporting from parfor has some limitations, and specifically it cannot indicate the precise line within the...

6ヶ月 前 | 0

| 採用済み

回答済み
Apply function row-wise on a tall array
You're on the right track with matlab.tall.transform, but you should call your function in that context. The function invoked by...

7ヶ月 前 | 1

| 採用済み

回答済み
Some workers go idle in parfor creating a waste of computation time
The parfor implementation uses a number of different strategies to try to keep the workers busy. However, sometimes these might ...

7ヶ月 前 | 0

| 採用済み

回答済み
Parallel optimization hanging on getCompleteIntervals
A few notes: The deadlock detection is for labSend and labReceive. Your parallel code is using parfor. There is no way that par...

7ヶ月 前 | 1

回答済み
mpiprofile viewer crashes unexpectedly
I suspect the debug breakpoint is interfering with the data transfer from the spmd block back to the client. I suppose the only...

7ヶ月 前 | 0

| 採用済み

回答済み
Issue with writematrix and parfor
You cannot write to the same file simultaneously from mulitple processes. (This is not a limitation specific to parfor - rather,...

7ヶ月 前 | 0

回答済み
interrupt a function when it takes too long
The simplest approach would be to modify the potentially long-running function so that it checks whether it has exceeded its tim...

7ヶ月 前 | 0

回答済み
Can ParallelServer be run from a client behind a NAT (connecting to cluster outside of NAT)
It should work to specify the routable address at the client using pctconfig. Something like pctconfig('hostname', '<routable a...

7ヶ月 前 | 0

| 採用済み

回答済み
Convert code to run on parallel
It's hard to tell exactly what computations you're performing there. It would be better if you could give us a reproducible exam...

7ヶ月 前 | 1

| 採用済み

回答済み
How to close client node when running a parpool job across multiple nodes of a cluster using slurm scheduler integration
You would be better off if you can submitting only a single job to the cluster, have that job be a batch job with the Pool optio...

7ヶ月 前 | 0

| 採用済み

回答済み
-r vs -batch when calling matlab in unix
(I'm not an expert here, just a user of the -batch option) The main advantages for me of the -batch option compared to -r for n...

7ヶ月 前 | 0

| 採用済み

回答済み
Parfor indexing for looping over edges and assigning to adjacent cell indices
I think this can be made to work, but it might be a little tricky. parfor is complaining because your output variables flux and ...

7ヶ月 前 | 1

| 採用済み

回答済み
Parfor solving optimization problems (Cplex) slower than for
Does the performance improve much / not much / not at all if you run the parfor loop a second time without closing the pool? If...

7ヶ月 前 | 1

回答済み
Parfor gives NaN when for does not
I'm not sure if this is the only problem, but the fact that you have a global variable set on the client and used by the workers...

7ヶ月 前 | 0

| 採用済み

回答済み
Error while using dct on gpu. Matrix dimensions must agree.
This appears to be a problem with the gpuArray version of dct. Thanks for reporting this.

8ヶ月 前 | 0

回答済み
SPMD - store all values and return
I tried the following, which worked as expected: spmd(2) if labindex == 1 labSend(magic(4), 2); else ...

8ヶ月 前 | 1

| 採用済み

回答済み
Parfor failure: cannot load object of class 'cSapModeL'. Its class cannot be found.
You need the code for the class cSapModel to be available on the workers. The following might help: addAttachedFiles(gcp(), 'cS...

8ヶ月 前 | 0

Load more