Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6206621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:28:54+00:00 2026-05-24T05:28:54+00:00

I have an embarrassingly parallel job that requires no communication between the workers. I’m

  • 0

I have an embarrassingly parallel job that requires no communication between the workers. I’m trying to use the dfeval function, but the overhead seems to be enormous. To get started, I’m trying to run the example from the documentation.

>> matlabpool open
Starting matlabpool using the 'local' configuration ... connected to 8 labs.
>> sched = findResource('scheduler','type','local')
sched =
Local Scheduler Information
===========================

                      Type : local
             ClusterOsType : pc
               ClusterSize : 8
              DataLocation : C:\Users\~\AppData\Roaming\MathWorks\MATLAB\local_scheduler_data\R2010a
       HasSharedFilesystem : true

- Assigned Jobs

           Number Pending  : 0
           Number Queued   : 0
           Number Running  : 1
           Number Finished : 8

- Local Specific Properties

         ClusterMatlabRoot : C:\Program Files\MATLAB\R2010a
>> matlabpool close force local
Sending a stop signal to all the labs ... stopped.
Did not find any pre-existing parallel jobs created by matlabpool.

>> sched = findResource('scheduler','type','local')
sched =
Local Scheduler Information
===========================

                      Type : local
             ClusterOsType : pc
               ClusterSize : 8
              DataLocation : C:\Users\~\AppData\Roaming\MathWorks\MATLAB\local_scheduler_data\R2010a
       HasSharedFilesystem : true

- Assigned Jobs

           Number Pending  : 0
           Number Queued   : 0
           Number Running  : 0
           Number Finished : 8

- Local Specific Properties

         ClusterMatlabRoot : C:\Program Files\MATLAB\R2010a
>> tic;y = dfeval(@rand,{1 2 3},'Configuration', 'local');toc
Elapsed time is 4.442944 seconds.

Running subsequent times produces similar timings. So my questions are:

  1. Why do I need to run matlabpool close force local to get the Number Running to zero, given that I run matlabpool open in a fresh instance?
  2. Is five seconds of overhead really necessary for such a trivial example? especially given the Matlab workers have already been started up?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:28:55+00:00Added an answer on May 24, 2026 at 5:28 am

    The DFEVAL function is a wrapper around submitting a job with one or more tasks to a given scheduler, in your case the ‘local’ scheduler. With the ‘local’ scheduler, each new task runs in a fresh MATLAB worker session, which is why you see the 4.5 second overhead – that’s the time take to launch the worker, work out what to do, do it, and then quit.

    The reason that you need the number of running jobs to be zero is that the local scheduler can only run a restricted number of workers.

    In general, PARFOR with MATLABPOOL is an easier combination to use than DFEVAL. Also, when you open a MATLABPOOL, the workers are launched and ready, so the overhead of PARFOR is much less (but still not zero as the body of the loop needs to be sent to the workers).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have what I believe to be an embarrassingly simple problem, but three hours
I have a simple request that I have spent much time on (embarrassingly).. I
We have a client requirement that has stumped me, embarrassingly enough. The client has
I have a String Collection that is populated with ID's like so --> 12345
This may turn out to be an embarrassingly stupid question, but better than potentially
I run across a lot of embarrassingly parallel projects I'd like to parallelize with
I'm revealing my embarrassing ignorance of REGEX-fu here, but: I currently have a website
What are the applications for your personal use that needs a small database like
What is the proper way to parallelize a multi-dimensional embarrassingly parallel loop in OpenMP?
I have a current web application, and I'm embarrassingly it has not been designed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.