Hermes Initial Software Configuration in 2017

Links below were the guides to what was done. It should be assumed that the indicated steps were executed by root.

Initial setup in 2017... Basic installation of the Linux OS and tools was performed by Red Barn Computing prior to delivery.

What is described here is the additional local setup, which brought in the following tools:

The first order of business on the new system was to add new users with adduser, usermod, etc. -
How To Create a Sudo User on CentOS [Quickstart]

Also, it was tough to wrangle SSH keys until emacs was installed with "yum install emacs". Then testing could begin.
The very first test didn't go so well: X2Go worked fine, but from within it, ParaView 5.4 complained and crashed -

failed to get the current screen resources
Fontconfig warning: line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf
Aborted (core dumped)

One possible clue came from the name of the download, ParaView-5.4.0-Qt5-OpenGL2-MPI-Linux-64bit.tar.gz.
Were all the dependencies really present? Qt5 in particular seemed like it wasn't installed, so that was added:
Yum install qt-devel qt-doc qt-creator qt5?

rpm -qa | grep qt5
yum install qt5-qtbase
yum install qt5-qtbase-devel

No luck. Another possibility was a deficiency in OpenGL or Mesa, but yum reported that they were already installed:
How to get OpenGL libraries in Red Hat Enterprise Linux 6.

rpm -qa | grep freeglut
rpm -qa | grep mesa
yum install mesa-libGL
yum install mesa-libGL-devel

Two more installations were added because they were missing compared to the Mesa libraries installed on the Perseus server:

yum install mesa-libGLES
yum install mesa-libGLw

In the end, ParaView 5.4 was found to work only on the physical console, and further work on this issue was deferred.
A solution is needed for Perseus, too - it was found that the 5.4 binaries crashed there with the exact same error message.
One possible solution, to be investigated later, involves VirtualGL (and vglserver_config): [Paraview] Segfault with OpenGL2
Maybe it's the case that ParaView 5.4 must be built from source in order to work properly in these environments?
For future reference: ParaView: Build and Install

As a workaround, the ParaView 4.3 binaries were copied over from Perseus; they were found to work perfectly well on Hermes.

tar xvfz ParaView-4.3.1-Linux-64bit-glibc-2.3.6.tar.gz
cp -pr /home/slantz/Downloads/ParaView-4.3.1-Linux-64bit /opt
chown -R root:root /opt/ParaView-4.3.1-Linux-64bit

Next up: Change hostname in CentOS 7 (used hostnamectl too; /etc/sysconfig/network was unchanged, assumed that was OK)

echo perseus.lps.cornell.edu > /etc/hostname
systemctl restart systemd-hostnamed

Intel Fortran was installed via the GUI installer, which was obtained from Charlie (30-day trial license option was selected):

~cornell/Downloads/parallel_studio_xe_2017_composer_edition_for_fortran/install_GUI.sh

On Perseus, it is convenient to have environment modules--for Open MPI, e.g.--as well as screen for managing login sessions.
So they were installed. (The former package brings in Tcl as well.)

yum install environment-modules
yum install screen

The Open MPI RPM from Red Barn puts items in standard places like /usr/bin, so a modulefile for Open MPI is unnecessary.
However, the initialization script for Intel Fortran places Intel MPI ahead of Open MPI on paths as a side effect.
In general, all logins need to be initialized consistently so that mpif90 resolves to Intel Fortran (ifort) with Open MPI.
On Perseus, it wasn't enough to customize each user's .bash_profile and .bashrc, as screen's bash shells were not set properly.
Therefore, a special file, /etc/profile.d/zzintel-openmpi.sh, was created to handle all types of shells on Perseus.
Below is this file as modified for Hermes, with 2 lines based on the contents of /etc/modulefiles/mpi/openmpi-x86_64 on Perseus.
How to correctly add a path to PATH?

if [ -z "`echo $PATH | grep intel`" ]; then
  . /opt/intel/bin/ifortvars.sh intel64
fi
#. /usr/share/Modules/init/sh
#module unload mpi
#module load mpi
PATH=/usr/bin:$PATH
LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
export OMPI_FC=ifort

A desktop icon for ParaView was created in MATE (in X2Go) by right-clicking the desktop, picking "Create Launcher...", and doing:

Name: ParaView
Command: /opt/ParaView-4.3.1-Linux-64bit/bin/paraview
Comment: 3d visualization tool
[click on icon]: /opt/ParaView-4.3.1-Linux-64bit/share/icons/hicolor/96x96/apps/paraview.png

This resulted in a file named "ParaView.desktop" being created in ~/Desktop. This was renamed paraview.desktop.

The next goal was to add a similar launcher to the Applications menu for all users, starting from ~/Desktop/paraview.desktop.
This file was copied into /usr/share/applications, the shebang line (#!/usr/bin/env xdg-open) was removed, and the icon was shrunk:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/opt/ParaView-4.3.1-Linux-64bit/share/icons/hicolor/22x22/apps/paraview.png
Name[en_US]=ParaView
Exec=/opt/ParaView-4.3.1-Linux-64bit/bin/paraview
Comment[en_US]=Create 3d visualizations of data
Name=ParaView
Comment=Create 3d visualizations of data
Icon=/opt/ParaView-4.3.1-Linux-64bit/share/icons/hicolor/22x22/apps/paraview.png
Categories=Graphics;

The last line was added so that the new menu item would appear the in the Graphics submenu of the Applications menu for all users.
How To Add an Item To The GNOME Menu For All Users (editing the /etc/xdg/menus/applications.menu was not necessary)
It seems best to add the semicolon after "Graphics" as a list is expected here.

It seemed good to add the ParaView launcher to the MATE panel (top menu bar) as well. A few more tricks are needed for that...
Globally adding items to panel
How to tweak your panel layouts
Steps: right-click on top menu bar in the desired location, choose Application Launcher... > Graphics > ParaView.
Next, dump the current layout to file ~/dump.layout using panel_dump_layout.py from the second link above.
Finally, create a new MATE layout file based on the dump, then change some settings...

gsettings get org.mate.panel default-layout
'rhel'
cp /usr/share/mate-panel/layouts/rhel.layout /usr/share/mate-panel/layouts/rhel-pv.layout
# edited the rhel-pv.layout file to add the ParaView launcher at menu bar position=40...
diff /usr/share/mate-panel/layouts/rhel*layout
37a38,44
> [Object launcher]
> object-type=launcher
> launcher-location=/usr/share/applications/paraview.desktop
> toplevel-id=top
> position=40
> locked=true
>
# (the entries above are not quite the same as on Perseus)
# it's best to do the next command from an ssh shell, not from any desktop
gsettings set org.mate.panel default-layout 'rhel-pv'
gsettings get org.mate.panel default-layout
'rhel-pv'
mate-panel --reset

With the new default layout, the last command is equivalent to "mate-panel --reset --layout rhel-pv".
That succeeded in making the ParaView icon and launcher appear in the menu bar.
But it was still not clear whether the ParaView launcher would appear for all users.
Customize default desktop environment settings for Gnome-centric Linux distributions
The procedure below is different from the one used on Perseus, but it was found to work. (A reboot was unnecessary.)

cp 10_mate-rhel.gschema.override 60_mate-rhel.gschema.override
# after editing /usr/share/glib-2.0/schemas/60_mate-rhel.gschema.override...
diff *mate-rhel*
16c16
< default-layout='rhel'
---
> default-layout='rhel-pv'
glib-compile-schemas /usr/share/glib-2.0/schemas/

These desktop customizations completed the work related to ParaView 4.3.



Last updated on 7/7/17 by Steve Lantz (steve.lantz ~at~ cornell.edu)