When running comsol with matlab interface on sandbox1, it is usually most convenient to ssh with screen forwarding (eg '-CY') and launch COMSOL with matlab by following the instructions in the livelink manual.
1. ssh onto sandbox1 by entering the following at your laptop command prompt
password: [enter sandbox1 credentials]
2. start a tmux session for starting the COMSOL server
aaron.markowitz@sandbox1:~$ tmux
3. start a comsol server from the tmux session
aaron.markowitz@sandbox1:~$ comsol54 mphserver -login force -port 2020
Username: whoever
Password: whatever
Confirm password: whatever
4. detach the tmux session by pressing ‘ctrl-b’ followed by ‘d’
5. (optionally, you can start a new tmux session for your matlab work by running tmux again at your main sandbox prompt)
6. Start matlab by running
>> matlab -nodesktop -mlnosplash
6. Add the comsol directory to the matlab path by running at the matlab prompt
>> addpath(‘/localhome/comsol54/multiphysics/mli/‘)
6. Start the matlab with comsol interface by running the following at the matlab prompt
7. change into the directory containing the script, and run it
>> cd /home/amarkowi/metamaterials
>> run_spiral