40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  COMSOL elog  Not logged in ELOG logo
Entry  Fri Dec 4 18:32:02 2015, rana, General, Configuration, COMSOL: remote server w/ matlab BrownianSweep.tgz
    Reply  Tue Aug 11 11:16:29 2020, aaron, General, Configuration, COMSOL with Matlab without display 
    Reply  Tue Aug 11 16:35:07 2020, aaron, General, Configuration, COMSOL: remote server w/ matlab 
Message ID: 139     Entry time: Tue Aug 11 11:16:29 2020     In reply to: 102
Author: aaron 
Type: General 
Category: Configuration 
Subject: COMSOL with Matlab without display 

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.

Sometimes, it is necessary to run COMSOL without any display available. In that case, the Instructions in the manual are a little unclear. Here are the detailed steps that let me run my script '/home/amarkowi/metamaterials/run_spiral.m' with no screen forwarding.

1. ssh onto sandbox1 by entering the following at your laptop command prompt
Aaron’s-latpop $ ssh aaron.markowitz@sandbox1.ligo.caltech.edu
                           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
>>   mphstart(’sandbox1.ligo.caltech.edu’, 2020, ‘whoever’, ‘whatever’)
7. change into the directory containing the script, and run it
>> cd /home/amarkowi/metamaterials
>> run_spiral
ELOG V3.1.3-