Beantwortet
function with unknown number of outputs within parfor
The trick here is that (unfortunately) you need to assign the outputs of your function to a temporary variable, and convince |pa...

fast 11 Jahre vor | 1

| akzeptiert

Beantwortet
Object Indices in parfor loop
If |ppiUpdater| is an object instance that you're trying to call a method of, you might want to use the "functional" form of met...

fast 11 Jahre vor | 0

Beantwortet
gpuArray sparse memory usage
The first time you start up any of the GPU support within MATLAB, a series of libraries are loaded, and these consume memory on ...

fast 11 Jahre vor | 1

| akzeptiert

Beantwortet
arrayfun on GPU with each call working from common block of data
|arrayfun| on the GPU cannot access the parent workspace of anonymous functions, but it can access the parent workspace for _nes...

fast 11 Jahre vor | 0

Beantwortet
How to save inside parfor loops - Save in external function doesn not work.
I _think_ the problem here is that because of the way you're using |hyp1_count_var|, |parfor| is treating it as a _temporary_ lo...

fast 11 Jahre vor | 0

Beantwortet
How to only use 2 of my 4 cores (intel i5) to train neural network?
I tried the following: N=2; myCluster=parcluster('local'); myCluster.NumWorkers=N; parpool(myCluster,N) [...

fast 11 Jahre vor | 0

Beantwortet
Speeding up a batching process that takes too long
You can use <http://www.mathworks.com/help/distcomp/parfeval.html |parfeval|> on top of a parallel pool to do this. (Note that b...

fast 11 Jahre vor | 1

| akzeptiert

Beantwortet
How to stop all workers simultaneously when an error occurs in one of the workers?
You can do this using <http://www.mathworks.com/help/distcomp/parfeval.html |parfeval|> to send off individual tasks for executi...

fast 11 Jahre vor | 2

Beantwortet
How does parfor divide the input array?
Walter's answer is conceptually correct, but as he observes, misses some of the nuances of the implementation. The current imple...

fast 11 Jahre vor | 1

Beantwortet
Find optmal number of parallel workers (depending on machine memory)
This is a tricky problem to handle automatically - I think your best bet is simply to time and observe the behaviour on your sys...

fast 11 Jahre vor | 0

| akzeptiert

Beantwortet
How can I classify a variable that takes a path and inputs it in a function in parfor
@Jon already gave you an answer that should work, but for the record - the reason |parfor| is upset about |file| is that it _app...

etwa 11 Jahre vor | 0

Beantwortet
Parallel Computing Toolbox - Java object transfer from client to workers
When you pass any MATLAB variables (including those that refer to Java objects) into |parfor|, |parfeval|, etc., then the conten...

etwa 11 Jahre vor | 2

| akzeptiert

Beantwortet
How to get username in Parallel Computing
You have several options here. First, you could simply compute your username outside the |parfor| loop myusername = getenv(...

etwa 11 Jahre vor | 0

Beantwortet
Manipulate mxGPUArrays in conjunction with shared C libraries
Yes, all of this should be possible. You can extract the underlying pointer to the data of a |gpuArray|. I suggest starting with...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
Standalone application (Compiler toolobox) of a code using the Parallel computing toolbox
This is a known problem when compiling applications that use |parfor|, and there is a simple workaround documented <http://www.m...

etwa 11 Jahre vor | 0

Beantwortet
Parallel Random Number Generator
Yes, I believe your code is correct, and is basically the same initialization that is already carried out by Parallel Computing ...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Issue passing reduction variable by reference with parallel for-loop
Unfortunately, handle class objects get _copied_ to and from the workers, as described <http://www.mathworks.com/help/distcomp/o...

etwa 11 Jahre vor | 1

Beantwortet
Commenting Simulink Blocks in Parfor Loop
You should be able to do this by using |set_param|, something like this: set_param('model/path/block', 'Commented', 'on') %...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
How to recitfy a serialisation error while using a parfor which large data sets?
The problem here is that |images| is a large broadcast variable - you're going to be much better off with that as a _sliced_ var...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
"Index exceeds matrix dimensions" error when using parfor
|parfor| is treating |x| as a <http://www.mathworks.com/help/distcomp/sliced-variables.html sliced variable> because of the form...

etwa 11 Jahre vor | 3

| akzeptiert

Beantwortet
How to specify the number of labs in smpd?
You're only allowed to have a single |spmd| _context_ active at any given time. An |spmd| context is created when you open an |s...

etwa 11 Jahre vor | 2

| akzeptiert

Beantwortet
Error: The variable in a parfor cannot be classified.
An equivalent problem is the following: parfor i=1:5 data = rand(5, 1); for j = 1:numel(data) ou...

etwa 11 Jahre vor | 3

Beantwortet
How to use event listners for notifications sent from parfeval functions?
There currently isn't any support for events from |parfeval| futures. What sort of event support were you hoping for? Just a com...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
How can I work with 8 cores on Parallel Computing Toolbox?
See <http://www.mathworks.com/matlabcentral/answers/80129-definitive-answer-for-hyperthreading-and-the-parallel-computing-toolbo...

etwa 11 Jahre vor | 0

Beantwortet
How to retrieve error message when running script on cluster
The task within the job object returned by the |batch| command has a property called |Error| which has the error stack. You coul...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
How can I fix error in working directory location change when using a parallel cluster?
The message in the diary output there is simply a _warning_ that the worker couldn't |cd| to that location. You can use the |Cur...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
saving within SPMD or parfor
The problem with the |save| command is that it needs to inspect the contents of the workspace in which it is running. That's not...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
Does matlab create only one worker on each core when you use parallel toolbox?
Yes, that's right - the _default_ is to use the number of physical cores (not hyperthreaded cores). You can override this choice...

etwa 11 Jahre vor | 0

| akzeptiert

Beantwortet
Function handle as input argument -> conflict with parfeval queue
There are several ways you could work around this. Perhaps the simplest way is to use |batch| jobs rather than |parfeval|. T...

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
SPMD in matlab - how to store the returned data?
Each |Composite| contains the values computed on each worker. So, you should be able to index into e.g. |res| to get the values ...

etwa 11 Jahre vor | 0

Mehr laden