Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Changed: | ||||||||
< < | This page hasn't been written yet. Let's describe MATLAB issues, particularly how to get it working on the cluster, here. | |||||||
> > | Compiling Matlab | |||||||
Changed: | ||||||||
< < | -- KevinLeytonBrown - 17 Apr 2007 | |||||||
> > |
if isdeployed
myArg1 = str2double(myArg1);
end
addpath(genpath(pwd)); % Add stuff to the path so compiler can find functions
mcc -m myFunction.m % Compile into a stand-alone
(you can call mcc from outside matlab, but it needs to be called from within matlab to add anything to the path)
setenv LD_LIBRARY_PATH /cs/local/generic/lib/pkg/matlab-7.3/bin/glnx86 (or wherever matlab is installed, this can be added to .cshrc)
Submitting Compiled Matlab to the Arrow ClusterThe configuration that has worked was compiling on arrow50@cs with Matlab 7.3 compiler/libraries. Here is a compile.sh file (run from the 'root' code directory, where $1 is the function you want to compile):#!/bin/sh
/cs/local/generic/lib/pkg/matlab-7.3/bin/matlab -nojvm -nosplash -nodesktop -nodisplay -r "addpath(genpath(pwd));mcc -m $1;exit;"
Also, the arrow cluster uses bash instead of cshell, so the library
command needs to be:
export LD_LIBRARY_PATH=/cs/local/generic/lib/pkg/matlab-7.3/bin/glnx86
It appears that the right way to get environment variables set is to
set them on the qsub command line. So on samos, set your
LD_LIBRARY_PATH to be what you want (adding in the matlab directory)
and then use the command
qsub -v LD_LIBRARY_PATH=$LD_LIBRARY_PATH -o . -e . -cwd -t 4 ./script
to submit the job. $SGE_TASK_ID causes a complaint from Matlab, so you may need to send explicit integers instead.
-- Main.jtillett - 19 Apr 2007 | |||||||
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
|