Using Matlab or ENVI/IDL from cluster nodes or off-campus locations

You can access the Planetary and Marine Computing (PMC) matlab or envi/idl licenses from cluster nodes, home, or other off-campus locations provided you are connected to a network with the following instructions. These instructions were written for Linux.

Requirements

  1. You must have a linux account the PMC managed linux machines or cluster head node.
  2. You must be connected to a network.
  3. Your ISP must allow direct SSH connections (tcp port 22) to network hosts.
  4. Some locations such as wi-fi hotspots may limit the network services that can be connected to.
  5. If the terminal connection phase of these instructions fails then here some possible problems:
    1. You are in a location that does not allow direct SSH connections (try from another network)
    2. You aren't properly connected to a network (test using a browser to some popular site such as google)
    3. The public.pmc.ucsc.edu server or some portion of the network in-between you and the server is temporarily down (try again later).
  6. Establish a ssh tunnel for license server access:
    1. If you are working from home or another off-site location, ssh to the machine public.pmc.ucsc.edu with this command (typed all on one line):
      ssh -L 1700:flexlm.pmc.ucsc.edu:1700 -L 1702:flexlm.pmc.ucsc.edu:1702 -L 1703:flexlm.pmc.ucsc.edu:1703 <username>@public.pmc.ucsc.edu
    1. If you are working on a cluster node, ssh to the head node from the cluster node with this command (typed all one one line):
      ssh -L 1700:flexlm.pmc.ucsc.edu:1700 -L 1702:flexlm.pmc.ucsc.edu:1702 -L 1703:flexlm.pmc.ucsc.edu:1703 <username>@head
    2. <username> is your login on the managed linux machines

    3. this command opens a connection to public.pmc.ucsc.edu or to your cluster head node with 2 ssh tunnels to flexlm.pmc.ucsc.edu
  7. Remain logged in to public.pmc.ucsc.edu or to your cluster head node. If in terminal window, you may minimize the window, but do not close it. If you experience disconnects from the "public.pmc.ucsc.edu" server read Unix Shell and SSH Timeouts. In particular, try the solution in the "Shell auto-logout Solution" section.

  8. Start a new shell (terminal or ssh session) on the cluster node or remote UNIX/Linux machine (leave the above port forwarding session running). Perform the remaining steps in this new shell.
  9. Enter the following:
    • addpackage matlab  (or addpackage matlabXYZ, where XYZ is the version number you are interested in)
      or
      addpackage envi
  10. Setup the LM_LICENSE_FILE variable:
    1. If using tcsh enter the following command:
      setenv LM_LICENSE_FILE 1700@localhost
    2. If using bash enter the following command:
      LM_LICENSE_FILE=1700@localhost
      export LM_LICENSE_FILE
  11. Start matlab or envi/idl in the same shell where you set the LM_LICENSE_FILE variable and it should find the license.