<< Previous question   Table of contents   MOSIX home   Next question >>
Question:
How to run MATLAB Version 7.4 (or older) jobs in MOSIX
Answer:
Jobs running MATLAB Version 7.4 (or older) can automatically migrate
among nodes of a cluster/multi-cluster.
First, tune MATLAB to MOSIX by the following 3 steps:
- Find where MATLAB is installed on your system by
> which matlab
/usr/local/bin/matlab
- Backup the matlab program to another location
> cp /usr/local/bin/matlab /tmp/mos-matlab
- Comment-out the following 2 lines in the mos-matlab script:
LD_ASSUME_KERNEL=2.4.1
export LD_ASSUME_KERNEL
the result should be :
#LD_ASSUME_KERNEL=2.4.1
#export LD_ASSUME_KERNEL
You can now run MATLAB jobs in a cluster/multi-cluster using mosrun.
Example: to run the following MATLAB test.m program:
a=randn(3000);
b=svd(a);
use:
> mosrun -e mos-matlab -nojvm -nodesktop -nodisplay < test.m