Skip to content
Rob Nagler edited this page Feb 1, 2018 · 14 revisions

How to use and install COMSOL

We are running COMSOL 52a on our comsol server.

Client setup

The fastest connection is VNC, which needs to be tunneled manually (apologies to Windows users for the shell syntax):

cat >> ~/.ssh/config <<EOF
Host comsol-x11.radiasoft.org
    LocalForward 5901 localhost:XYZ
EOF
ssh comsol-x11.radiasoft.org

XYZ is assigned by the administrator.

It's likely vncserver is still running. If it is, on a Mac, you can connect with Screen Sharing. Just type that into spotlight ⌘-space.

On a PC, you'll need to use TightVNC (64 bit installer). You'll need to tunnel ssh with Putty or the ssh client from cygwin.

NOTE: You need to quit VNC before quitting your ssh session, or the exit from the ssh session will hang (waiting for the VNC tcp session to close).

Client commands (on COMSOL host)

We are using TigerVNC on the Linux server, which is a wrapper for Xvnc. Once you login into the comsol-x11 server, you can:

$ vncserver -list

TigerVNC server sessions:

X DISPLAY #        PROCESS ID
:1                6118

You can then kill the server and restart:

$ vncserver -kill :1
Killing Xvnc process ID 6118
$ vncserver

New 'somehost.bivio.biz:1 (someuser)' desktop is somehost.bivio.biz:1

Starting applications specified in /home/someuser/.vnc/xstartup
Log file is /home/someuser/.vnc/apa14b.bivio.biz:1.log

If you need to change the password, you use:

$ vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n

The configuration is in ~/.vnc/config:

$ cat ~/.vnc/config
localhost
geometry=1600x900
nolisten=tcp

It's a bit strange syntax, and not clear that all options pass through. For example localhost does not get passed to Xvnc so nolisten=tcp is used.

Performance

X11 sucks. VNC is miles better.

Your home directory is being served over NFS. /var/tmp is the local SSD, but is limited in capacity (5GB). /tmp is a RAM disk, which is even more limited. The host has plenty of RAM (128G) so we could create a RAM disk if COMSOL needs to write locally.

COMSOL install

Download the COMSOL tarball and License.dat file into /root. Install:

umask 022
groupadd -g 524 lmcomsol
useradd -g lmcomsol -u 524 lmcomsol
groupadd -g 525 comsol
useradd -g 525 -u 525 comsol
yum install -y webkitgtk redhat-lsb-core xorg-x11-xauth libXtst tigervnc-server gnome-classic-session gnome-terminal
mount /usr/local/src/COMSOL53a_dvd.iso /mnt
umask 022; bash /mnt/setup
umount /mnt
mkdir /srv/comsol
chown -R comsol:comsol /srv/comsol
mkdir /srv/lmcomsol
chown -R lmcomsol:lmcomsol /srv/lmcomsol
### systemd stuff
### Install in /usr/local/comsol53a [default]
### license user to lmcomsol

To setup a user:

su - someuser
mkdir .vnc
vncpasswd
cat > .vnc/config <<'EOF'
localhost
rfbport=XYZ
geometry=1600x900
nolisten=tcp
EOF
chmod 600 .vnc/config
vncserver
ln -s /usr/local/comsol52a/multiphysics/bin/glnxa64/comsol .local/share/applications/comsol
# Drag Applications > Education > comsol to Desktop
Clone this wiki locally