Why am I unable to use parpool or validate with the 'local' or 'Processes' profile of Parallel Computing Toolbox?

조회 수: 1,230 (최근 30일)
When attempting to use parpool in Parallel Computing Toolbox, it will not open or I receive an error message like the one below. I am unable to validate my 'Processes' cluster profile (known as 'local' for R2022a or earlier).
Error using parpool (line 103)
Failed to start a parallel pool. (For information in addition to the causing error, validate the profile 'local' in the Cluster Profile
Manager.)
Caused by:
Error using parallel.internal.pool.InteractiveClient>iThrowWithCause (line 665)
Failed to initialize the interactive session.
Error using parallel.internal.pool.InteractiveClient>iThrowIfBadParallelJobStatus (line 766)
The interactive communicating job failed with no message.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2023년 11월 20일
편집: MathWorks Support Team 2023년 11월 2일
There are several issues that can prevent the parpool from starting. Run the following tests below to make sure that your configuration is setup properly.
1) Make sure your license of Parallel Computing Toolbox works
In MATLAB you can run the following command to check your license:
license checkout Distrib_Computing_Toolbox
You will receive the output "ANS=1" if the license is working. Otherwise, you will see a license manager error. In that case, searching for the license error message should give a solution for how to solve your issue.
2) Revert any changes to your local machine cluster profile
There are no changes that need to be made in order to use the 'Processes' cluster profile, but if you have made changes to the default configuration, you may want to reset these. This can be done by creating a new local machine profile. To do so,
  1. Go to the Parallel menu in MATLAB and select "Manage Cluster Profiles..." ("Manage Configurations..." for R2011b or earlier) 
  2. Click on Add Cluster Profile > Local Machine Processes (for older releases: From the File menu, select New > Local Configuration)
  3. Once created right click on the profile name in the list and select 'Set as Default' (for older releases click the radio option in the default column)
Once complete, close the Cluster Profile Manager windows and try again.
3) Clear the local cluster jobs data folder
The error you are seeing might be the result of bad local scheduler data. In that case, the local scheduler data can be removed. To do so:
1. In MATLAB, run the command "prefdir" to find your preferences folder. Ex:
>>prefdir
ans =
C:\Users\%username%\AppData\Roaming\MathWorks\MATLAB\R2023a
This will output your preferences folder. The local scheduler data folder is one level up from the preferences in a folder called "local_scheduler_data" or "local_cluster_jobs". For example:
C:\Users\%username%\AppData\Roaming\MathWorks\MATLAB\local_cluster_jobs
2. Close MATLAB
3. Rename or delete the local_scheduler_data or local_cluster_jobs
4. Restart MATLAB
You can now try to run parpool to see if the data folder was the problem.
4) Ensure that hostname resolution works on your computer
In order to use the local scheduler, your computer's own hostname must be resolvable. To confirm this, run the following command in MATLAB:
!hostname
This will give you your computer's hostname. You must be able to resolve this hostname to the computer's IP address. To test this you can run:
!ping <hostname>
Where <hostname> is the output of the hostname command above. If the results indicate the wrong IP address or say that your computer is an "unknown host", there is a network issue on your computer that needs to be resolved in order to use the local scheduler. In that case, ask your network administrator for help.
5) Check to see if you have either:
  • A startup.m on the MATLAB path
  • One or more additional pathdef.m or a matlabrc.m scripts shadowing the correct versions that are stored in "<matlabroot>/toolbox/local"
Any of these things may cause an error or just cause parpool and validation to just hang, even if it works fine in MATLAB when run as code. Sometimes these problems only appear after a customer has upgraded to a new version of MATLAB. .
To determine if any of these files are a problem, run the following commands in MATLAB Command window.
>> which -all startup.m
>> which -all pathdef.m
>> which -all matlabrc.m
If any pathdef or matlabrc files are present that are shadowing the
/toolbox/local version, then either remove them from the path or move their file path down the MATLAB Path list so that it sits beneath the /toolbox/local path.  
If any startup file is present, remove it from the MATLAB path.
6) Contact support
If you are still unable to run parpool, run a validation of your local scheduler configuration and submit this to support. To validate:
1. Go to the Parallel menu in MATLAB and select "Manage Cluster Profiles..." ("Manage Configurations..." for R2011b or earlier)
2. Highlight your local scheduler configuration and click the "Validate" button ("Start Validation" for R2011b or earlier)
3. Once the validation completes, click the "details" link to see the results
You can then forward your output of validation, the results of the tests below, and your license number to the support link at the bottom of this article. When submitting a request, be sure to include the following:
- Your license number
- The release of MATLAB and PCT
- The output of your validation from above
- The results of the tests below

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by