Run Mathematica from the Loki cluster over an SSH tunnel
Overview
Running graphical applications such as Mathematica from the Loki cluster requires an active SSH session with X11 forwarding enabled. X11 allows the graphical interface to display on your local workstation while the program executes remotely on the cluster.
On Windows and macOS systems, an X server must be installed to handle the windowing traffic. Common examples:
Windows: Xming, VcXsrv, or WSL 2 (preferred)
macOS: XQuartz
Linux: Already includes built-in X11 support
Note
For Windows users, the Windows Subsystem for Linux (WSL 2) is the recommended solution. It provides the required OpenSSH utilities and an integrated X server, simplifying configuration.
Procedure
Log into an interactive submission node:
$ ssh -4 -X <USER>@hpc-inter-sub.augusta.edu
-4 Limits SSH to an IPv4 connection and -X permits X11 forwarding over SSH.
Request a cluster resource allocation meeting your needs:
# For Loki
$ salloc --job-name math-job --partition=interactive_q --ntasks=8 --mem=16G --time=02:00:00
# For Vali
$ salloc --job-name math-job --partition=interactive_q --ntasks=4 --mem=8G --time=02:00:00
Determine which node is providing your allocation:
$ squeue -u <AU_NETID>
Set up an SSH tunnel to the compute node and log in:
$ ssh -4 -X -L 2222:<COMPUTE_NODE>:22 <AU_NETID>@<COMPUTE_NODE>
For example:
$ ssh -4 -X -L 2222:cnode001:22 lskywalker@cnode001
-4 Limits SSH to an IPv4 connection
-X Enables X11 forwarding
-L Sets up SSH port forwarding
Format:
<LOCAL_PORT>:<COMPUTE_NODE>:22
Note
Port 2222 is commonly available, but you may choose another local port if needed.
Load the Mathematica module:
$ module load Mathematica
(Adjust module name/version as needed based on availability.)
Launch Mathematica:
$ mathematica &
This will open the Mathematica graphical interface on your local machine via X11.
Notes
If the GUI does not launch, verify X11 forwarding is working:
$ xeyes
If
xeyesdoes not display, your X11 setup is not configured correctly.For non-GUI workflows, users can run:
$ math
Performance may vary depending on network latency when using X11 forwarding.