Compute Canada

Matlab

Please note: The FAQ pages at the HPCVL website are continuously being revised. Some pages might pertain to an older configuration of the system. Please let us know if you encounter problems or inaccuracies, and we will correct the entries.

Matlab


This is a short FAQ on using the high-level language code "Matlab" on HPCVL machines. HPCVL does not maintain a separate license for Matlab, i.e. researchers who already hold a license have to make a license file accessible to HPCVL servers or supply us with a specific license file to install on our systems. The software is only made available to persons who belong to a specific Unix group. See details below.

 

What is "Matlab"?

From the Matlab web page:  "MATLAB® is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation. [...] You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. Add-on toolboxes (collections of special-purpose MATLAB functions, available separately) extend the MATLAB environment to solve particular classes of problems in these application areas."

Here is a list of features, also from the webpage:

  • High-level language for technical computing
  • Development environment for managing code, files, and data
  • Interactive tools for iterative exploration, design, and problem solving
  • Mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization, and numerical integration
  • 2-D and 3-D graphics functions for visualizing data
  • Tools for building custom graphical user interfaces
  • Functions for integrating MATLAB based algorithms with external applications and languages, such as C, C++, Fortran, Java, COM, and Microsoft Excel

The full Matlab program and most Toolboxes are installed on our systems, but the license for their usage is supplied by the user. 

Where is Matlab located and how do I access it?

 

The present version of Matlab is R2010b for Linux and R2009bSP1 for Solaris. The programs in the Matlab package are located in the directory /opt/matlab. Matlab production jobs are usually run on our so-called mini-cluster (Linux). The nodes of this cluster have between 8 and 24 cores and run under the Linux OS. Matlab processes can only be run in batch mode through our Gridengine scheduler.

Note that most Matlab Toolboxes are installed on the HPCVL clusters. This enables HPCVL users who have a pre-existing Matlab license to submit and run serial Matlab jobs to our cluster nodes.

It is furthermore required that you sign a statement. We will confirm this statement, and you will then be made a member of a Unix group "matlab", which enables you to access the software. Contact us if you are in doubt of whether you will be able to run Matlab on our system.

How do I run "Matlab" interactively?

The core of Matlab is a high-level programming language and an interactive programming/computing environment. Since you have to be a licensed user of Matlab to run Matlab programs on HPCVL machines, it is possible for you to either allow access to HPCVL servers to your own license server, or (preferably) move a license file to HPCVL systems and use our installation of the software through it. In either case, you are responsible for mainaining the license.

Here, we discuss how to run a Matlab session on HPCVL. The interactive part is usually started on a login node, for instance sflogin0. We assume that you are included in the "matlab" Unix group, and therefore have proper access to /opt/matlab where the software resides. To set the proper environment variables and include the directories with the binaries in your PATH, you should type:

use matlab

To avoid having to do this before every Matlab session, you may also include this command in your setup file, e.g. .bash_profile for a bash shell, or .login for a csh.

Note that for the sflogin0 login node, the "use matlab" command is setting you up for usage of the "R2009bSP1" version of Matlab. This is because that login node runs on the Solaris/Sparc platform and R2009bSP1 is the most recent version that is supported for that platform. This differs from the current version that is being used on the production nodes which run Linux (see next section)The above command is equivalent to adding the /opt/matlab/R2009bSP1/64bit/bin directory to your PATH. Finally you need to point the environment variable LM_LICENSE_FILE to the proper license file:

export LM_LICENSE_FILE=lic_file

for a bash shell. Here lic_file stands for the full path and file name of your license file. You need to make sure that the latter cannot be accessed by anyone but you. This command may of course also be placed into a setup file to avoid retyping. Once Matlab usage is set up properly, you only need to type

matlab

to start the GUI of the Matlab programming environment. Issuing the command with the -nodisplay will give you a command-line version that does not use the GUI.

How do I run a Matlab batch job on the HPCVL clusters?

In many cases, you will run Matlab in "Batch" mode, usually on our Linux "sw" cluster. Since you have to have access to Matlab outside of HPCVL license, much of the interactive work could be done elsewhere, whereas the computationally more intensive runs could be executed on HPCVL clusters.

Production jobs on HPCVL clusters are submitted via the GridEngine, which is a load-balancing software. To obtain details, read our Gridengine FAQ . For a Matlab batch job, this means that you have to prepare a job script and you have to call Matlab without the Graphical User Interface. If you encounter issues with preparing such a script, please contact us for assistance.

 

Where can I get further help?

 

Matlab is a complex software package, and requires some practice to be used efficiently. In this FAQ we can not explain its use in any detail. Luckily, Matlab features a complete set of online-documentation that may be accessed from inside the GUI by selecting the Help tab. There are also a Getting Started Tutorial and various Demos.

If you have problems with the GridEngine, read our FAQ on that subject, and maybe consult the manual for that software which is accessible as a PDF file. HPCVL also provide user support in the case of technical problems.Contact us here, we might be able to help, or pass you on to someone who can.

 

 

There are currently no posts in this category.