Configure Matlab Distributed Computing Toolbox on remote client
The following instruction help users configure Matlab Distributed Computing Toolbox on remote client (desktop or department server) from where you can submit distributed/parallel matlab jobs to Matlab Distributed COmputing Engine on Eddie.
1. Implement passwordless login to Eddie frontend
We suggest kerbros authentication
2. Set up a shared directory between remote client and Eddie.
There are two ECDF export servers providing Samba and NFS service.
Note: You will need ECDF system group's arrangement to gete above two steps done, please contact science.support@ed.ac.uk for help.
3. Install Matlab + Matlab Distributed Coomputing Toolbox on your client
You can find matlab and DCT toolbox on Eddie /exports/work/is_iti_ug/matlab-dct-3.1-R2007a.tar. scp to your client. This package including Matlab-7.5 and Distributed Computing Toolbox-3.1-R2007b.
Install matlab and DCT toolbox on your client, you need create a Matlab root directory for all your matlab sodftware, in the following example, the root dir is /home/ywan/matlab
Create a matlab and DCT license file license.dat into matlab root directory, you'll need it during installation procedure. You can use our matlab trial license which is only valid for short term. matlab_trial_license
- Go back to your download position and unpack the tar file (tar -xvf matlab-dct-3.1-R2007a.tar)
Run install script and install all components under matlab root dir you just created
4. install configuration functions and scripts
5. Program a client session to test your install
>> sched = findResource('scheduler', 'type', 'generic');
>> set(sched, 'DataLocation', '/exports/work/is_iti_ug/ywan/matlab-test')
>> set(sched, 'HasSharedFilesystem',true)
>> set(sched, 'ClusterMatlabRoot', '/usr/local/Cluster-Apps/matlab-mdce')
>> set(sched, 'SubmitFcn',@sgeSubmitFcn)
>> j = createJob(sched);
>> createTask(j, @sum, 1, {[1 1]});
>> createTask(j, @sum, 1, {[2 2]});
>> createTask(j, @sum, 1, {[3 3]});
>> createTask(j, @sum, 1, {[4 4]});
>>
>> submit(j)
scriptName =
/exports/work/is_iti_ug/ywan/sgeWrapper.sh
Submitting task 1
ssh eddie.ecdf.ed.ac.uk ". /exports/work/is_iti_ug/ywan/my_matlab_env.sh; qsub -cwd -N Job1.1 -j yes -o "/exports/work/is_iti_ug/ywan/matlab-test/Job1_Task1.out" "/exports/work/is_iti_ug/ywan/sgeWrapper.sh""
Job output will be written to: /exports/work/is_iti_ug/ywan/matlab-test/Job1_Task1.out
QSUB output: Your job 3925572 ("Job1.1") has been submitted
Submitting task 2
ssh eddie.ecdf.ed.ac.uk ". /exports/work/is_iti_ug/ywan/my_matlab_env.sh; qsub -cwd -N Job1.2 -j yes -o "/exports/work/is_iti_ug/ywan/matlab-test/Job1_Task2.out" "/exports/work/is_iti_ug/ywan/sgeWrapper.sh""
Job output will be written to: /exports/work/is_iti_ug/ywan/matlab-test/Job1_Task2.out
QSUB output: Your job 3925573 ("Job1.2") has been submitted
Submitting task 3
ssh eddie.ecdf.ed.ac.uk ". /exports/work/is_iti_ug/ywan/my_matlab_env.sh; qsub -cwd -N Job1.3 -j yes -o "/exports/work/is_iti_ug/ywan/matlab-test/Job1_Task3.out" "/exports/work/is_iti_ug/ywan/sgeWrapper.sh""
Job output will be written to: /exports/work/is_iti_ug/ywan/matlab-test/Job1_Task3.out
QSUB output: Your job 3925574 ("Job1.3") has been submitted
Submitting task 4
ssh eddie.ecdf.ed.ac.uk ". /exports/work/is_iti_ug/ywan/my_matlab_env.sh; qsub -cwd -N Job1.4 -j yes -o "/exports/work/is_iti_ug/ywan/matlab-test/Job1_Task4.out" "/exports/work/is_iti_ug/ywan/sgeWrapper.sh""
Job output will be written to: /exports/work/is_iti_ug/ywan/matlab-test/Job1_Task4.out
QSUB output: Your job 3925575 ("Job1.4") has been submitted
>> waitForState(j)
>> results = getAllOutputArguments(j)
results =
[2]
[4]
[6]
[8]
>> destroy(j)