How can I test a successful installation of MATLAB?

15 ビュー (過去 30 日間)
Andreas Goser
Andreas Goser 2012 年 3 月 15 日
コメント済み: Julian Hapke 2023 年 11 月 17 日
There is a need to automatically verify successful installations of MATLAB and related products. Often, IT staff without deep MATLAB knowledge is performaing an installation, but does not know how to verify if all necessary functionality is working.
The goal of this question is to collect commands and automated procedures that help IT staff to verify. This includes:
  • Successful installation and licensing of products
  • Basic functionality like mathematical operations and graphics
  • Functionality that needs interfaces, like import and export or a working C compiler
Thank you for your contribution!

回答 (7 件)

Andreas Goser
Andreas Goser 2012 年 3 月 15 日
The BENCH command itself contains a couple of useful tests. Designed for perfomance tests though:
bench(5)

Friedrich
Friedrich 2012 年 3 月 15 日
Hi,
I would say, check if a specific compiler is installed correctly, or check which compilers MATLAB find and can use (Windows specific code)
mex_compiler_files = dir([fullfile(matlabroot,'bin',computer('arch'),'mexopts'),'\*.bat']);
mbuild_compiler_files = dir([fullfile(matlabroot,'bin',computer('arch'),'mbuildopts'),'\*.bat']);
disp('-----------------------------------')
disp('NOW MEX')
disp('-----------------------------------')
for i=1:numel(mex_compiler_files)
%check for engine and mat file bat files, we want bat files for mexing
%only
if isempty(strfind(mex_compiler_files(i).name,'engmat'))
try
%try to select the compiler
evalc('mex([''-setup:'',mex_compiler_files(i).name(1:strfind(mex_compiler_files(i).name,''opts'')-1)])');
disp(['Compiler : ',mex_compiler_files(i).name,' is installed correctly'])
catch err
disp(['Compiler : ',mex_compiler_files(i).name,' is not installed correctly'])
end
end
end
disp('-----------------------------------')
disp('NOW MBUILD')
disp('-----------------------------------')
for i=1:numel(mbuild_compiler_files)
try
%try to select the compiler
evalc('mbuild([''-setup:'',mbuild_compiler_files(i).name(1:strfind(mbuild_compiler_files(i).name,''compp'')-1)])');
disp(['Compiler : ',mbuild_compiler_files(i).name,' is installed correctly'])
catch err
disp(['Compiler : ',mbuild_compiler_files(i).name,' is not installed correctly'])
end
end

Friedrich
Friedrich 2012 年 3 月 15 日
Hi again,
you can also check if you are able to checkout the licenses you want:
lm_list = feature('lmfeaturelist')
for i=1:numel(lm_list)
if license('checkout',lm_list{i}) == 1
disp(['License for Toolbox : ',lm_list{i}, ' is available '])
else
disp(['License for Toolbox : ',lm_list{i}, ' is not available '])
end
end

Sean de Wolski
Sean de Wolski 2012 年 3 月 15 日
Does:
ver
work and what is the output of it? Does the output match what you intended to install?
  1 件のコメント
Thomas O'Donnell
Thomas O'Donnell 2013 年 5 月 29 日
ver works on the desktop and shows the license number, o/s, and tool boxes allowed to run. You must start matlab on the headnode from a cmd prompt
cd $MATLAB\bin (where $MATLAB is the installation folder for MATLAB on the cluster) matlab.exe -dmlworker -nodisplay -logfile C:\output.txt -r ver;exit
to get the details on the head node or job manager server with the MATLAB flexnet license manager running on it.

サインインしてコメントする。


Andreas Goser
Andreas Goser 2012 年 3 月 15 日
Fast and easy ways to test the functionality of a product:
Simulink:
sim('vdp')
Control System Toolbox:
tf(1, [1 1])
  1 件のコメント
Julian Hapke
Julian Hapke 2023 年 11 月 17 日
This only works if examples are included. If now this will throw an error. MATLAB could be able to load examples from the web, but only if the openExample command is used to...well...open an example. I know in 2012 this was propably not an issue, I just wanted to make this answer a bit contemporary.

サインインしてコメントする。


Jason Ross
Jason Ross 2012 年 3 月 15 日
To check setup Parallel Computing Toolbox, you can do the following:
  • Validate a configuration to ensure that that the MATLAB client is set up properly to run various jobs against a cluster. This works for all configuration types, and does not require MATLAB knowledge. You can validate a configuration under the Parallel > Manage Configurations dialog.
  • In the Admin Center, located in matlabroot/toolbox/distcomp/bin/admincenter, administrators can set up a MJS cluster, control services, stop and start the server, and stop and start workers. There are also connectivity tests that make sure that the head node and workers can communicate to help troubleshoot cluster setup issues.
  • From the command line, in matlabroot/toolbox/distcomp/bin, the "nodestatus" command can tell you the status of the cluster. You can also stop and start mdce, MJS and workers from here, as well using the various start and stop commands.
  1 件のコメント
Thomas O'Donnell
Thomas O'Donnell 2013 年 5 月 29 日
Outstanding advice. Is Mathworks going to make a web version of this feature so powerusers can check the Parallel server status from their desktops ?

サインインしてコメントする。


Daniel Shub
Daniel Shub 2012 年 3 月 15 日
For Linux systems in particular there tend to be issues with
  1. fonts in figures http://www.mathworks.com/matlabcentral/answers/1238-font-size-changes-in-figures,
  2. libc.so.6 http://www.mathworks.com/matlabcentral/answers/10134-usr-local-matlab-r2011a-bin-util-oscheck-sh-605-lib64-libc-so-6-not-found,
  3. environment variables http://www.mathworks.com/matlabcentral/answers/30029-problem-starting-matlab-on-64-bit-linux
  4. OpenGL and hardware acceleration (you can check that you have it correct with
opengl('info')
#+4 (anyone know how to continue numbering a list?) Sound issues, not that anyone expects it to work in Linux, but ideally
load('handel');
sound(y, Fs);
should give you "hallelujah".

カテゴリ

Help Center および File ExchangeIntroduction 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