Skip to content
robnagler edited this page Mar 11, 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 525 comsol
useradd -s /sbin/nologin -M -d /srv/lmcomsol -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
install -d -o comsol -g comsol /srv/lmcomsol /srv/comsol
Create:
both services run as comsol:
Mar 11 17:51:37 fnl10b.bivio.biz comsol[33874]: java.nio.file.AccessDeniedException: /srv/lmcomsol/.comsol/v53aserver/tomcat
/etc/systemd/system/comsol.service
/etc/systemd/system/lmcomsol.service
### 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

Install Errors

If you see this, verify X11 is working (xset -q). Sometimes the tunnel doesn't work and you have to relogin:

# umask 022; bash /mnt/setup
Extracting temporary COMSOL installer components in /tmp...

(Setuplauncher:32917): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(Setuplauncher:32917): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(Setuplauncher:32917): Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(Setuplauncher:32917): GLib-GObject-CRITICAL **: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(Setuplauncher:32917): Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(Setuplauncher:32917): GLib-GObject-CRITICAL **: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(Setuplauncher:32917): Gtk-WARNING **: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
Clone this wiki locally