Having problems getting from your compute node on the internal network,
to run any FlexLM licensed software where the license manager is on the
external network?

Assuming your login node doesn't route traffic (don't do it!), try this
workaround (SSH tunneling).  It's an init script meant to be run by some
account (we use "flexlm") other than root.  Well, actually, the script is
run by root of course, but the tunneling SSH's are as the flexlm account.
It's designed for multiple redundant license servers as we have here, but
you can take that logic out if unnecessary at your installation.


Instructions

Set up a flexlm account on your cluster, as well as on the license server On the license server, make sure that your DAEMON line for the appropriate application has a "port=DAEMONPORT" option (set DAEMONPORT to some suitable port #); this allows port forwarding to work Generate SSH key for flexlm account on login server, place it in authorized_keys file, distribute private key to all nodes (easiest if home directory is shared) On each compute node: Set up flexlm-tunnel init script appropriately (change variables as necessary) chkconfig --add flexlm-tunnel service flexlm-tunnel start edit /etc/profile.d/flexlm-tunnel.{sh,csh}, add LM_LICENSE_FILE => LMPORT@localhost (where LMPORT is the local port used in your lmgrd port forwarding) edit /etc/hosts: to 127.0.0.1, add the hostnames of all license servers listed in license.dat (SERVER lines) EXACTLY as listed therein (FQDN or short) You ought to be able to run matlab directly now (assuming your X forwarding is set up properly; we use SSH on our clusters and therefore that is automatic)

NOTES

The MATLAB binaries need to be installed on every node, or else reside in a shared directory where all nodes can access it (esp. lmstat prog). The flexlm account home directory doesn't need to be shared, but if it is, the hostname portion of the PIDFILE is important! According to the runlevel(1) man page, "newer" versions of init will set the RUNLEVEL and PREVLEVEL environment variables automatically for init scripts. It works for me in RedHat 7.2; I don't know which versions of init do *not* exhibit this behavior. If you're having problems with that line, use something like `/sbin/runlevel|awk '{print $1}'` instead.