Instructions on Using Matlab on the UCSB CSC Cluster from Windows

Status
Yes

Instructions on Using Matlab on the UCSB CSC Cluster from Windows

Dick Startz

Please note that this is for running a small number of MatLab jobs, as each will check out a license from the campus server.  If you want to run 10's of MatLab jobs at one time you can avoid exhausting the usable licenses for other members of campus by using a 'compiled matlab' job.

February 2012

  1. You need an account at CSC. You also need appropriate software for accessing the cluster. See your tech guru.
  2. Matlab runs on a machine in the cluster just like it runs on your desktop, except that the machine doesn’t have a keyboard or monitor attached. You supply a Matlab script, “wrapper.m,” that contains whatever commands you would normally enter into the Matlab command window. You want to be sure that your program saves any figures (using the Matlab print command) and sends text output to a file (using fprintf, for example). Text written to “standard out,” either using a fileID==1 or disp() will end up in a file with extension “.o”. Sometimes the latter is easier than using fprintf.
  3. The cluster supports the parallel toolbox, used with the parfor command. You will want to use the configuration named “local.” So the appropriate way to open a Matlab pool is with the command “matlabpool open local”. Here is a little Matlab script (say named 'CalculateIt.m') which adds up the numbers from 1 to 1,000 25 times, printing the answer each time.