ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
verify.m
Go to the documentation of this file.
1%> \brief
2%> Verify the existence of the requirements of the installed ParaMonte MATLAB library.
3%>
4%> \details
5%> This function takes no input arguments and returns nothing.
6%>
7%> \return
8%> ``failed`` : The output scalar MATLAB ``logical`` that is ``true`` if and
9%> only if the ParaMonte library components verification fails.<br>
10%>
11%> \interface{verify}
12%> \code{.m}
13%>
14%> failed = pm.lib.verify();
15%>
16%> \endcode
17%>
18%> \example{verify}
19%> \include{lineno} example/lib/verify/main.m
20%> \output{verify}
21%> \include{lineno} example/lib/verify/main.out.m
22%>
23%> \final{verify}
24%>
25%> \author
26%> \JoshuaOsborne, May 21 2024, 8:11 PM, University of Texas at Arlington<br>
27function failed = verify()
28
29 failed = false;
30
31 %if isunix
32 % setenv('PATH', ['/usr/local/bin:', getenv('PATH')]);
33 %end
34
35 %%%%
36 %%%% Require MATLAB >2017a.
37 %%%%
38
39 matlabMinimum = "2023a";
40 fprintf("Checking MATLAB version >" + matlabMinimum + " requirement for compatibility with ParaMonte...")
41
42 matlabVersion = version("-release");
43 matlabVersion = str2double(matlabVersion(1:4));
44 if 2023 <= matlabVersion
45 disp("PASSED")
46 else
47 failed = true;
48 warning ( newline ...
49 + "MATLAB R" + string(matlabMinimum) + "a or newer may be required for " ...
50 + "proper functionality of some of the ParaMonte MATLAB library routines, " ...
51 + "particularly, the ParaMonte samplers and other routines which rely compiled MEX files. " ...
52 + "Please install a compatible version of MATLAB. " ...
53 + "Proceeding with the current installation..." ...
54 + newline ...
55 );
56 end
57
58 weblinks = pm.lib.weblinks();
59
60 %%%%
61 %%%% Ensure supported architecture.
62 %%%%
63
64 fprintf("Checking the system architecture compatibility with the ParaMonte library...")
65
66 if any(strcmp(["amd64", "arm64"], pm.sys.arch()))
67 disp("PASSED")
68 else
69 failed = true;
70 warning ( newline ...
71 + "The ParaMonte library shared files are incompatible with the current system architecture:" + newline ...
72 + newline ...
73 + pm.io.tab + pm.sys.arch() + newline ...
74 + newline ...
75 + "All library functionalities that rely on the shared binary files will be unavailable." + newline ...
76 + "However, all generic ParaMonte MATLAB functionalities are still available." + newline ...
77 + "If you need the ParaMonte MATLAB offloading capabilities for this architecture," + newline ...
78 + "let the library developers know by opening a GitHub issue at:" + newline ...
79 + newline ...
80 + pm.io.tab + pm.web.href(weblinks.github.issues.url) + newline ...
81 + newline ...
82 + "Alternatively, you can also build the library for your system" + newline ...
83 + "by following the ParaMonte MATLAB build installations at:" + newline ...
84 + newline ...
85 + pm.io.tab + pm.web.href(weblinks.github.url) + newline ...
86 + newline ...
87 );
88 end
89
90 %%%%
91 %%%% Check for MPI installations.
92 %%%%
93
94 if pm.lib.mpi.verify()
95 failed = true;
96 end
97
98end
function verify(in varval, in vartype, in varsize, in varname)
Verify the type and number of elements of the input varval match the specified input vartype and vars...
function version(in silent)
Return a scalar MATLAB string containing the latest available ParaMonte MATLAB version newer than the...
function arch()
Return the processor architecture name of the current system on which MATLAB is running,...
function href(in url)
Return an HTML-style decoration of the input URL if the ParaMonte MATLAB library is used in GUI,...
function install(in vendor, in isyes)
Install or provide instructions to install the MPI library from the requested input MPI vendor.
function lib()
Return a scalar MATLAB string containing the path to the lib directory of the ParaMonte library packa...
function release(in type)
Return a scalar MATLAB string containing the MATLAB release version, year, or season as requested.
function tab()
Return a scalar MATLAB string containing 4 blank characters equivalent to a tab character.
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...