Running parallel code, stuck on "Analyzing and transferring files to workers..."

64 views (last 30 days)
I am running multiple jobs in parallel (Bayesian Markov Chain Monte Carlo that call different functions) using the parfor command. i set up the code to print out the iterations of the different jobs but all I see in the output is "Analyzing and transferring files to workers..." If I quit the submission (i.e., hit control C) I see the iteration output. Does the "Analyzing and tranferring files to workers..." output mean that something is wrong with one of my jobs? I am concerned because it has been > 1 week after I submitted the jobs and the last time I submitted a similar set of code it was done within a week.

Answers (1)

Infinite_king
Infinite_king on 16 Apr 2024
Edited: Infinite_king on 16 Apr 2024
Hi Mike Pennell,
"Analyzing and transferring files to workers." is not an error. By default, batch processing automatically analyzes your code and transfers necessary files to the workers. However, there are situations where manual file transfer is required, such as when determining the filename during runtime. Refer the following example - https://www.mathworks.com/help/parallel-computing/batch.html#mw_b37401d2-759b-443d-b3f0-cec56feedce3:~:text=file%20or%20directory.%27-,Access%20Files%20from%20Workers,-By%20default%2C
Knowing the status of various tasks will give us a good picture. The status of a job can be queried using the following command,
% submitting the job
job = batch(....);
% querying the task status
job.Tasks % look for any error or warning
job.State
Hope this is helpful.
  1 Comment
Mike Pennell
Mike Pennell on 16 Apr 2024
Thank you for your response. A couple of the jobs in my parfor loop had coding errors which caused everything else to freeze. Everything seems to be running fine after fixing those errors.

Sign in to comment.

Categories

Find more on Parallel Computing Fundamentals in Help Center and File Exchange

Tags

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!