2%> Return the processor architecture
name of
3%> the current system on
which MATLAB is running,
4%>
which is also supported by the ParaMonte MATLAB library.<br>
7%> ``str`` : The output scalar MATLAB
string containing the processor architecture.<br>
8%> The output value can be either:<br>
10%> <li> ``
"arm64"`` : This can be currently
true only
if the OS is Darwin.<br>
11%> <li> ``
"amd64"`` : This can be currently
true for either Darwin, Linux, or Windows.<br>
22%> If the function cannot
detect any of the above,
23%> the system-returned value will be output as is.<br>
26%> \include{lineno} example/sys/
arch/main.m
28%> \include{lineno} example/sys/
arch/main.out.m
33%> \JoshuaOsborne, May 21 2024, 5:34 AM, University of Texas at Arlington<br>
34%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
35%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
38 [failed, str] = system("uname -m");
42 + "Failed to
detect the processor architecture via" + newline ...
43 + "the MATLAB intrinsic call `system('uname -m'): " + newline ...
45 + pm.io.
tab + strtrim(str) + newline ...
50 [~, str] = system("echo %PROCESSOR_ARCHITECTURE%");
53 + "Unrecognized operating system for MATLAB." + newline ...
54 + "This is impossible, unless we live in the distant future." + newline ...
58 strLower = lower(strtrim(str));
59 if contains(strLower, "arm64")
61 elseif contains(strLower, "amd64") || contains(strLower, "x86_64")
65 + "Unrecognized unsupported processor architecture" + newline ...
66 + "for the ParaMonte MATLAB library: " + newline ...
68 + pm.io.
tab() + strtrim(str) + newline ...
72 %str = computer('
arch');
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function arch()
Return the processor architecture name of the current system on which MATLAB is running,...
function detect(in vendor)
Return the MPI image count and current image ID (e.g., MPI rank + 1) and the MPI library name as it a...
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...