How can I tell if the parallel computing toolbox installed?

조회 수: 38 (최근 30일)
J Wigton
J Wigton 2015년 7월 1일
편집: Raymond Norris 2025년 10월 2일 17:55
I purchased the Linux home version plus the parallel computing toolbox. Home version installed, how can I tell if the parallel computing toolbox installed?

답변 (3개)

Walter Roberson
Walter Roberson 2017년 4월 27일
There are two things you can check:
ver('distcomp') %this tells you whether it is _installed_
license('test','Distrib_Computing_Toolbox') %this tells you whether it is _licensed_
It is a pain that you have to know the exact magic names and that the names are different for the two facilities.
  댓글 수: 1
Chandler Williams
Chandler Williams 2017년 4월 27일
편집: Chandler Williams 2017년 4월 27일
Awesome. Thanks. The code to check for my particular program ended up being:
try
ver('distcomp')
catch
fprintf('Not installed')
end

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


Mischa Kim
Mischa Kim 2015년 7월 1일
J, use the ver command.
You should see something like
Parallel Computing Toolbox Version 6.6 (R2015a)
  댓글 수: 1
Chandler Williams
Chandler Williams 2017년 4월 27일
편집: Chandler Williams 2017년 4월 27일
Thanks. For runtime, I want to check only for the Parallel Computing Toolbox. I tried ver product, ver(product), ver('product'), and tried finding a function specific to the Parallel Computing Toolbox, but failed and so using
if true
% code
n = 'dss';
pat = '(?<=^.+[\\/]toolbox[\\/])[^\\/]+';
regexp(which(n), pat, 'match', 'once')
end
failed as well. Do you happen to know what format product name should be in for the Parallel Computing Toolbox? Thanks.

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


Mark
Mark 2025년 9월 18일 1:25
Novice user here. An online search found the function canUseParallelPool(). My PC does not have Parallel Computing Toolbox installed. As expected, the function returns False on my installation
  댓글 수: 1
Raymond Norris
Raymond Norris 2025년 10월 2일 16:20
편집: Raymond Norris 2025년 10월 2일 17:55
@Mark that's close. canUseParallelPool was introduced in R2020b and in the unlikely event the a user set the parallel preference to not automatically start, canUseParallelPool will return false as well.
If you look at the code, canUseParallelPool shows you a possible way to determine if Parallel Computing Toolbox is installed and licensed.
I'd probably use @Walter Roberson's solution, though programmatically, I'd wrap isempty around the call to ver.

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

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by