Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
dfeval returning only after long wait.

Subject: dfeval returning only after long wait.

From: jarobert

Date: 2 Sep, 2010 16:08:31

Message: 1 of 1

I've observed some inexplicable behavior with dfeval and I was wondering if anyone is familiar with this issue.

I have been using dfeval for a while to farm out function calls. Each call/thread/worker takes a couple of minutes to do its work. After all of the functions have finished their work, dfeval doesn't return for a couple of minutes. The machine just sits idle as far as I can tell, and then eventually returns. I've confirmed this by having my function output a file (in each call) indicating it has finished. I then check the finish time of the last worker to finish and I compare it to the time the call to dfeval actually returns.

I'm only returning a single number from my function, so there should be no large transfer of data.

I run the same function call using parfor and there's no waiting for the function calls to return. It just runs and returns immediately. So the answer would seem to be to use parfor. However, I would prefer to use dfeval, since it works in a queuing system, and doesn't tie up all my worker threads unless it's actually using them. Not all functions have the same run time, and dfeval releases the workers when done, so I can do other work at the same time on another copy of Matlab.

Has anyone observed this odd behavior? I assume it's doing some kind of clean-up work from the distributed job, but I can't imagine what would take so long. I appreciate any ideas.

Thanks.

-John

p.s. Just for reference, the workers read in some data, fit some models, and then write the data out to disk and delete the input files. They're completely orthogonal to one another. No dependencies, and they don't use each other's data. I don't pass any large data sets to the function and its only return value is a single number.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us