ECPS cluster : matlab
français | english
This wiki
This page

Matlab on Your Workstation

Mac OS X

  1. Download and install Matlab from Distrilog
  2. Install XCode
  3. Open a Terminal, type the following command followed by Return:
    /Applications/MATLAB*.app/bin/mex -setup
    Ensure that that command completes successfuly. If not, send an email to with a screen capture of the result.

Use the ECPS cluster with Matlab



  1. you need to have password-less shell access going. See the Getting Started guide on the wiki homepage.
  2. through said shell access, you need to be able to run a simple command, like
    salloc echo SUCCESS
    This should output SUCCESS (among other things) to your terminal.
  3. you want to be familiar with copying files back and forth between your computer and the ECPS cluster

Your First Batch Job

  1. Browse the directory /usr/local/matlab/epfl-batch on ECPS, and download the appropriate ZIP file for your Matlab version (for instance
  2. Unpack that ZIP file somewhere in your Matlab path (for instance on Mac, into Documents/MATLAB )
  3. Type
    and answer the question regarding your username on ECPS (it's your GASPAR username)

  4. Create a file parallel_hostnames.m in your PATH (for instance on a Mac, in Documents/MATLAB) with the following contents:
  5. Type the following commands:
    c = parcluster;
    j = c.batch('parallel_hostnames', 'Pool', 40, 'CurrentFolder', '.');
  6. When prompted whether to use an identity file, click Yes
  7. Now comes the tricky part. The file you want is in the .ssh subdirectory of your home directory, which is hidden since its name starts with a dot. Press ⌘+⇧+G to open the "go to the folder"  prompt, and type  ~/.ssh (tilde slash dot ssh) into the dialog.
  8. Pick the id_rsa file (this is your private key), and click Open
  9. You should now be able to see your job in progress. In Matlab's tool ribbon, click → Monitor Jobs. Be sure that the ECPS remote profile is selected, then click on the button, you should get something like this:

    Keep clicking on until the job transitions into "finished" state.
    💡If this doesn't work, see the troubleshooting § in the admin guide.
  10. To get the results of your finished job, right-click on its entry and select Show diary