Running MATLAB on High Performance Computing (HPC)

High Performance Computing

MATLAB is a versatile software environment for scientists. It is used for analysing data, developing algorithms, creating models and performing simulations.

At Utrecht University there are currently about 300 researchers who are running MATLAB on their workstations. However, sometimes the datasets are too big, or the computational demands are too heavy. The workstations are running for hours or even days and, in the meantime, they are unavailable for other tasks.

Overcome performance problems

Two PhD students (Filipe Serra Braganca and Jelle Treep) have used computer clusters to overcome these problems. Filipe has used MATLAB on the cluster of Utrecht Bioinformatics Center (UBC cluster) to analyse sensor and optical motion capture data from animals to perform an objective assessment of locomotion and detect orthopaedic pain. Jelle has used the MATLAB on the Lisa cluster of SURFsara to run atmospheric and ecological models to estimate seed dispersal by wind.

Running MATLAB on LISA or UBC cluster

Jelle who defended his thesis this spring, started with UBC cluster. He soon found out that he could not run his programs directly on the UBC cluster. “MATLAB on UBC can only run pre-compiled code under Linux”, Jelle explains, “and I have a Windows workstation. On LISA you can compile your MATLAB code and run it”. For Jelle moving his computations to Lisa was worth the effort: “In my case it was easy to run for-loops in parallel using multiple cores (e.g. 32) and submit multiple jobs (e.g. 10) at the same time. Instead of waiting three weeks for my results, I was done within a day. This saves much time and keeps my local workstation free for other tasks.” For MATLAB users the advantage of Lisa is the possibility to open a MATLAB GUI, run tests and compile directly on the cluster. “This makes debugging and running much more straightforward and efficient for a novice HPC user” says Jelle.

But if you have MATLAB on Linux

“Fortunately, I have a Linux workstation”, says Filipe, “so I could compile my MATLAB programs on my workstation and copy it to the UBC cluster.  I have optimized my code to run in parallel, this way I have saved a lot of time. Otherwise, I would have to dedicate 100% of my workstation to MATLAB only, leaving it unusable for other tasks for days.” However, running a program on a cluster is more involved than running locally.  “To use my scripts on the cluster, I had to adjust my code, log in to the cluster, compile it, upload data, and submit the job. Although the process works, it is time-consuming, especially when there are still errors in the code.”

London Science Museums Replica Difference Engine

Possible future directions

“My suggestion would be to implement the MATLAB distributed computer server (MDCS) on the cluster” Filipe proposes. “If you install an MDCS on a cluster, users can run programs on that cluster directly from the MATLAB application on their workstations. I believe that this is the way, at least to save time.”

In need of more computing power for MATLAB?

Are you struggling with performance issues when running MATLAB programs? Research IT would like to get in contact with you and other MATLAB users, who need more computing power than their workstations can provide. If there is substantial demand, Research IT will investigate user-friendly solutions for this problem.  Please e-mail RDM Support.

In the meantime, if you want to use the High Performing Computer (HPC) cluster of UBC, you can contact UBC. Test accounts are freely available. To obtain a Lisa account and a free-of-charge budget to start with, check out the Utrecht intranet on SURFsara credits for Utrecht researchers. More technical information about Lisa can be found at SURFsara.   

My suggestion would be to implement the MATLAB distributed computer server (MDCS) on the cluster. If you install an MDCS on a cluster, users can run programs on that cluster directly from the MATLAB application on their workstations. I believe that this is the way, at least to save time.