I'm not sure why I'm receiving a fetchOutputs error - please help

조회 수: 3 (최근 30일)
Emma
Emma 2023년 8월 30일
답변: Shreshth 2024년 1월 2일
I am trying to run a code on my cluster, and it was working until Matlab closed by accident. I am trying to re-run the code again, but the onl problem I am running into now is an an error stating
% fetchOutputs cannot operate on Futures in state 'unavailable'.
and
Error in mac_graphmatching_LifeSpan (line 64)
[P, d, ob, ~, ~, ss] = fetchOutputs(f, 'UniformOutput', false);
mac_graphmatching_LifeSpan is the name of the function I am running. I did not run into this error earlier, and in fact I even have part of the data analysis which I am trying to do with my code. If someone could please help me out on what this error means, I would really appreciate it since I am pretty new to running codes on a cluster.
  댓글 수: 1
Edric Ellis
Edric Ellis 2023년 8월 31일
How are you creating f? You can end up with this error if you attempt to save and then load Futures. If you closed MATLAB, you will need to re-run the code on the parallel pool.

댓글을 달려면 로그인하십시오.

답변 (1개)

Shreshth
Shreshth 2024년 1월 2일
Hello Emma,
I understand that after a sudden shut down of MATLAB, you are not able to execute your code on the cluster. it appears that you are experiencing an issue with a MATLAB function that involves asynchronous computation on a computing cluster.
The function ‘mac_graphmatching_LifeSpan’ is attempting to retrieve outputs from a Future object using the ‘fetchOutputs’ command. However, the future object is in an 'unavailable' state, which prevents the retrieval of the desired outputs.
The 'unavailable' state occurs when a future array is pre-allocated but a future is not defined. Most operations will fail on futures with the 'unavailable' state.
Here are a few steps to troubleshoot your problem.
  1. Check Cluster and Job Status: Ensure that your cluster is up and running and that the job associated with the Future object has been submitted and is either running or has completed successfully. You can check the status of your jobs using the ‘parcluster’ and ‘findJob’ functions.
  2. Job Completion: The Future object might be 'unavailable' if the job it refers to was not completed successfully. This could happen if the job was cancelled, the worker encountered an error, or if MATLAB closed unexpectedly. Ensure that the job has completed before calling ‘fetchOutputs’
  3. Recreate the Future Object: If MATLAB closed unexpectedly, the Future object you had might no longer be valid. You will need to resubmit the job to the cluster to create a new Future object.
Executing the above three steps should resolve your problem while executing the ‘fetchOutputs’ command. You can also refer to a relatable case by visiting the link below:
Thank you,
Shubham Shreshth.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by