Answered
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...

meer dan 2 jaar ago | 0

Answered
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...

meer dan 2 jaar ago | 0

| accepted

Answered
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...

meer dan 2 jaar ago | 1

| accepted

Answered
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...

meer dan 2 jaar ago | 0

| accepted

Answered
-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...

meer dan 2 jaar ago | 1

| accepted

Answered
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 ...

meer dan 2 jaar ago | 1

| accepted

Answered
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...

meer dan 2 jaar ago | 1

Answered
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...

meer dan 2 jaar ago | 0

| accepted

Answered
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.

meer dan 2 jaar ago | 0

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

meer dan 2 jaar ago | 1

| accepted

Answered
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...

meer dan 2 jaar ago | 0

Answered
Seeding random number generator in parfor properly
I'm not an expert by any means, but my understanding is that your proposed approach will give you reproducible results, but the ...

meer dan 2 jaar ago | 1

| accepted

Answered
inexplicable GPU memory usage
MATLAB caches GPU memory and FFT plans etc. to make subsequent operations more efficient. This does mean that the FreeMemory pro...

meer dan 2 jaar ago | 0

| accepted

Answered
Code that processes a Byte structure in parfeval crashes the parallell workers
I would suggest that you need to run whatever code you're currently using to initialize img on the desktop client, you instead r...

meer dan 2 jaar ago | 0

Answered
How to restart a worker in parpool?
You can't easily do this with parfor, but you can do something like this with parfeval. I haven't tried too hard here to make th...

meer dan 2 jaar ago | 1

| accepted

Answered
Running functions in parallel
In your code above, the two parfeval lines are initiating asynchronous function evaluation requests in parallel. You're also cal...

meer dan 2 jaar ago | 0

Answered
Slicing variable in parfor loop (restricted indexing)
Steve has already pointed out that your X indexing expressions make it ineligible for slicing as things stand. However, fortunat...

meer dan 2 jaar ago | 0

| accepted

Answered
CUDA kernel MaxThreadsPerBlock not constant
In your comment you mention that you see different values of MaxThreadsPerBlock for different kernels. This is expected. The CUD...

meer dan 2 jaar ago | 1

| accepted

Answered
sparse and gpuArray/sparse errors very odd! (with MWE)
@Matt J has already provided some great information here, just adding a few more thoughts on your specific cases. Case 1: spar...

meer dan 2 jaar ago | 1

| accepted

Answered
Calling parpool with SpmdEnabled = False
Unfortunately, only MJS and Local cluster types support SpmdEnabled = false. You might be able to use the "cluster parfor" appro...

meer dan 2 jaar ago | 0

| accepted

Answered
How do I specify the number of workers in parfeval without deleting and recreating my pool
Unfortunately, there's no API to constrain the number of workers from the pool eligible to be used by parfeval. What you could c...

meer dan 2 jaar ago | 1

| accepted

Answered
How to properly store variables to use with parfor?
Yes, your code is somewhat inefficient in that in each parfor loop you're sending the whole of Tree to the workers. Here are a c...

meer dan 2 jaar ago | 1

Answered
Parfor, how do I use the variable within the loop correctly?
The problem here seems to be that you're making multiple assignments to e.g. fvalagg. A stripped-down version of your code is so...

meer dan 2 jaar ago | 0

Answered
Solution of large sparse matrix systems using GPU MLDIVIDE
A couple of suggestions: On the CPU, if you're repeatedly solving the same system, you might be able to benefit from the recent...

meer dan 2 jaar ago | 0

Answered
How are iterations assigned to workers in parfor?
As @Mohammad already commented, the parfor implementation automatically divides up the iterations of the loop onto the workers. ...

meer dan 2 jaar ago | 0

| accepted

Answered
How do I get parfor to downgrade gracefully to for when no parallel seat is open?
parfor already has the innate ability to run without Parallel Computing Toolbox being present, and it should automatically handl...

meer dan 2 jaar ago | 0

Answered
Parfor loop using 'saves' correctly on around half of iterations
In general, it is not safe to have multiple workers attempting to save to a single file. The results are likely to be unpredicta...

meer dan 2 jaar ago | 1

Answered
Why does function become slower when placed in spmd block?
Your desktop MATLAB client can use "built-in multithreading" for certain operations. By default, workers in a parallel pool use ...

meer dan 2 jaar ago | 0

| accepted

Answered
tall/gather issue
This error means that the workers on your remote cluster cannot find code that they need to execute your tall array algorithm. Y...

meer dan 2 jaar ago | 0

Answered
Cluster Profile Manager SPMD job test Failed
I'm going to guess you're using Linux. This is probably related to your ulimit settings, probably the limit on number of process...

meer dan 2 jaar ago | 0

Load more