Réponse apportée
fetchNext idx always returning 1
The first output of fetchNext tells you which of the futures you passed in as an input has just completed. In your case, you are...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Why does performance of functions saturate with number of cores using parfeval but not with parfor?
The main difference between parfor and parfeval is that in the parfeval case, you are responsible for scheduling the work on the...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
The variable newMap in a parfor cannot be classified.
This loop cannot run because the variable newMap is being read from and written to in arbitrary locations as the loop progresses...

plus de 5 ans il y a | 0

Réponse apportée
Progress bar with parfor and nohup
A really simple approach would be just to print out every 1000 iterations. In other words parfor i = 1:N if mod(i, 1000) =...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
share data between workers while retrieving data from handle class within parpool
To get data out of a parfor loop, you must have either a "sliced output" or a "reduction output". Your code example above has ne...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Restart a parpool worker
There's no simple way to do this when using parfor with parpool unfortunately. I can think of a couple of workarounds that might...

plus de 5 ans il y a | 0

Réponse apportée
How to use fetchNext correctly?
It looks like your seeder function depends only on the output of the corresponding call to partial_seeder. It might also be simp...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How do I distribute N 3-dimensional (large) arrays for processing across N workers?
The best approach probably depends on the operations you need to perform on this Nx8xSxP array. Are the operations that you wish...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Is there any issue in using NVIDIA 1060 with MATLAB 2019?
The page detailing the GPUs supported by MATLAB is here. Also of relevance is NVIDIA's page decribing the CUDA capabilities of G...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to speed up huge matrix mldivide?
distributed arrays on a single machine will generally perform worse than normal arrays - this is because the standard MATLAB mld...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to fix my code with parfor-Loops array?
Output variables in parfor must be either sliced or reduction. There's more information in the doc. But basically, you cannot as...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
UndefinedFunction error was thrown on the workers for 'filedata'
I'm a little confused by your example code there - I think there must be more going on. In your code, the piece spmd imgda...

plus de 5 ans il y a | 0

Réponse apportée
Problem with running code on gpu
Your code is not standalone, so I couldn't try it. But the main point is that you need to vectorise your code. This will speed t...

plus de 5 ans il y a | 0

Réponse apportée
Confusing results when measuring time of function on CPU/GPU with tic-toc/(gpu)timeit
Ok, there's a lot going on here. A few observations: Putting scalar values on the GPU is often counter-productive, since the im...

plus de 5 ans il y a | 1

Réponse apportée
How to make sure that function is entirely run on GPU?
Operations on gpuArray data automatically take place on the GPU. When you operate on mixed GPU and CPU data, generally the opera...

plus de 5 ans il y a | 1

Réponse apportée
Memory Parfor Needs more memory than normal
When you transfer data to the workers for a parfor loop, there is a transient increase in memory over and above what you'd expec...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
parfor doesn't continue to run other jobs when only one worker is working
parfor sends loop iterations to workers in groups known as "subranges" for efficiency. Also, recent versions of Parallel Computi...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Use system function with parfor
It looks like your executable expects to read from input.txt and write to output.txt. This will not work in parallel because the...

plus de 5 ans il y a | 1

Réponse apportée
Trying to use gpuArray for graph function
Unfortunately, graph does not support using gpuArray data in this way. Is there some specific algorithm on your graph that you'r...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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 . ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 1

Réponse apportée
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:...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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 ...

presque 6 ans il y a | 0

| A accepté

Charger plus