 |
Department of Engineering |
 |
 |
Matlab for CUED IIB project students, Easter term
Having worked for months on their project, some IIB students have a
matlab program that seems to be working. In May, they decide it's
time to throw some real data at it. The result is that Matlab runs slowly and/or
runs out of memory. Fortunately all is not lost. Matlab makes it easy to
write inefficient code and speeding it up may be easy. Here are some
resources
- Faster Programs - Matlab
- faster scripts has a few simple things to check. Mathworks'
Avoiding
'Out of Memory' Errors page has
more detailed memory management tips.
- Parallelisation - Matlab and parallel computing
might have info that's useful when you run on multi-CPU, multi-core
machines. maxNumCompThreads can make a difference without you having
to
do any extra work. Other modification might require more thought
- Overnight/weekend batch jobs - our GridEngine page describes how you
can queue up dozens of jobs to run outside office hours on our faster machines. Don't be put off by the
length of the page - the 1st section and the matlab section might be all
you need. We have about 10 4-cpu machines available, so you can get a
lot done over-night. To fully exploit the facility you need to break up long
processes into smaller chunks that can be run simultaneously. Often the machines are barely used until a week or so
before project deadlines.