How can I test a successful installation of MATLAB?
15 ビュー (過去 30 日間)
古いコメントを表示
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!
0 件のコメント
回答 (7 件)
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
0 件のコメント
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
0 件のコメント
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
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
2012 年 3 月 15 日
1 件のコメント
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
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
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
2012 年 3 月 15 日
For Linux systems in particular there tend to be issues with
- fonts in figures http://www.mathworks.com/matlabcentral/answers/1238-font-size-changes-in-figures,
- 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,
- environment variables http://www.mathworks.com/matlabcentral/answers/30029-problem-starting-matlab-on-64-bit-linux
- 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".
0 件のコメント
参考
カテゴリ
Help Center および File 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!