Demenstrate the use of MATLAB MCC to make standalone executables.
%fills random large matrix and vector solves for unknown | |
%brockp@umich.edu | |
%10/2014 | |
%used to demonstate built in matlab threading | |
% solved Ax=b | |
function implicitthreads(dim) | |
if ischar(dim) | |
dim=str2num(dim) | |
end | |
A=rand(dim); | |
b=rand(dim,1); | |
x=zeros(dim,1); | |
tic | |
x=A\b; | |
toc |
#use run_<programname>.sh <MCR root> <args> | |
#that file is created by the compiler and needs to be copied along with the executable | |
./run_implicitthreads.sh $WORK/mcr/v83 1000 |
#install the correct MCR (MATLAB Compiler Runtime) for your MATLAB version | |
# http://www.mathworks.com/products/compiler/mcr/ | |
#This need only be done once | |
#use $WORK to have sufficent space | |
mkdir $WORK/mcr | |
cd $WORK/mcr | |
wget http://www.mathworks.com/supportfiles/downloads/R2014a/deployment_files/R2014a/installers/glnxa64/MCR_R2014a_glnxa64_installer.zip | |
unzip MCR_R2014a_glnxa64_installer.zip | |
./install -mode silent -agreeToLicense yes -destinationFolder $WORK/mcr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment