Ubuntu 18.04 guide

Upgrade Announcement

Sysnet support for 18.04 LTS will cease sometime in the spring of 2023. We are preparing to upgrade to Jammy Jellyfish, 22.04 LTS this fall and through the spring. You can read more about the upcoming release of 22.04 here

Ubuntu 18.04 LTS

We had a good run with CentOS as our desktop and server installation and we feel it is time to switch to Ubuntu. Ubuntu offers far more non-standard packages than Redhat based variants and has always been the first linux desktop new users have been introduced to. Connical has also come around and ditched Unity and has embraced Gnome3 as the default desktop manager. Ubuntu by default uses Xorg over Wayland so we feel confident all applications we support such as Tecplot, Matlab, Mathematica, etc…, will work with little or no issues.

SSH

The ssh port is now the standard port. Here’s a comprehensive guide on SSH. The ssh port is now the standard port 22. For example:

$ ssh myusername@hostname

The default ssh port is 22, no need to specify the ‘-p’ option. If you have modified your ~/.ssh/config, be sure to update it with the proper port. See the manual pages for other ssh options, man ssh and man ssh_config.

How do I use Environmental Modules?

The Oden Institute is hosting an NFS share where commercial and open source software will be placed. This is exported to all managed desktops and servers running our current desktop distribution. Commercial software like Matlab, Mathematica, Intel compilers, Maple, etc… will reside in /opt/apps/sysnet/. New versions of open source software compiled with gcc and Intel compilers will reside in /opt/apps/ossw/. Software in the ossw directory is currently maintained and built by one of institutes centers. Any request for software to built and installed in ossw will be evaluated by Sysnet if there is not an available package which can be installed.

We use Lmod implementation of Environment Modules. Environment modules provide a convenient way to dynamically change the users’ environment through modulefiles. This includes easily adding or removing directories to the PATH environment variable.

A modulefile contains the necessary information to allow a user to run a particular application or provide access to a particular library. All of this can be done dynamically without logging out and back in. Modulefiles for applications modify the user’s path to make access easy. Modulefiles for Library packages provide environment variables that specify where the library and header files can be found.

Packages can be loaded and unloaded cleanly through the module system. All the popular shells are supported: bash, ksh, csh, tcsh, zsh.

It is also very easy to switch between different versions of a package or remove it.

Help! module command not found

If you are logging into your workstation on the console the first time and you open an xterm and you see the following:

$ module
module: command not found

There are a couple methods to resolve this issue. The first option presented below is probably the safest and easiest option.

  • Open a terminal window go to the menu bar and Edit->Preferences, under the Command tab, check ‘Run command as login shell’. Close the terminal window and re-open and issue the module command again. This option only needs to be done once, the preference is saved for all login sessions.

  • If you are using bash, you can source /etc/profile in your ~/.bashrc file.

  • For csh, you can source /etc/csh/login.d/z00_module.csh in your ~/.tcshrc or ~/.cshrc.

Module commands

To view the default available modules:

$ module avail

----------------------------------- /opt/apps/sysnet/modulefiles -----------------------------------
 comsol/5.0         maple/2018r2     (D)    pointwise/18.0R2        trelis/14.0
 ensight/10.1.2b    mathematica/11.2        pointwise/18.2R1 (D)    trelis/16.5 (D)
 gridgen/15.17      mathematica/11.3 (D)    tecplot/2017r3          vmd/1.9.1   (D)
 gridpro/5.1        matlab/r2017b           tecplot/2018r2   (D)    vmd/1.9.3
 maple/2016.1       matlab/r2018a    (D)    tecplot/2018
 maple/2017         matlab/r2018b           tecplotRS/2013

 ------------------------------------ /opt/apps/ossw/modulefiles ------------------------------------
  cab    eigen/3.2.6    eigen/3.3.1 (D)    pecos    pecos_cluster    testing    ubt18

 Where:
 D:  Default Module

 Use "module spider" to find all possible modules.
 Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".

To use the matlab module, issue:

module load matlab

By default, this will load matlab r2018a

Note

If you leave off the slash and any trailing version information, the default version (indicated with a D) will be loaded. If only one version of a particular module is available, that is taken as the default.

To load a specific version of matlab:

module load matlab/r2018b

Some modules depend on other modules (e.g. the mpi compilers). Therefore, in order to load them, you need to first load the corresponding module:

$ module load ubt18

Now if you look to see what modules are available, you will get something like this:

$ module avail
----------------------- /opt/apps/ossw/derived_modulefiles/ubt18/modulefiles -----------------------
 clang/system    gcc/8.2    (D)    intel/18.0 (D)    nompi/nompi
 gcc/system      intel/17.0        intel/19.0

----------------------------------- /opt/apps/sysnet/modulefiles -----------------------------------
 comsol/5.0         maple/2018r2     (D)    pointwise/18.0R2        trelis/14.0
 ensight/10.1.2b    mathematica/11.2        pointwise/18.2R1 (D)    trelis/16.5 (D)
 gridgen/15.17      mathematica/11.3 (D)    tecplot/2017r3          vmd/1.9.1   (D)
 gridpro/5.1        matlab/r2017b           tecplot/2018r2   (D)    vmd/1.9.3
 maple/2016.1       matlab/r2018a    (D)    tecplot/2018
 maple/2017         matlab/r2018b           tecplotRS/2013

------------------------------------ /opt/apps/ossw/modulefiles ------------------------------------
 cab    eigen/3.2.6    eigen/3.3.1 (D)    pecos    pecos_cluster    testing    ubt18 (L)

Where:
 L:  Module is loaded
 D:  Default Module

 Use "module spider" to find all possible modules.
 Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".

In order to use openmpi, mpich, or other software compiles with either GCC or Intel compilers, you will need to load those modules also. Say we wanted to use the software compiled with GCC 8.2 compiler:

$ module load gcc/8.2
$ module avail
------------------- /opt/apps/ossw/derived_modulefiles/ubt18/gcc/8.2/modulefiles -------------------
   boost/1.69.0      glpk/4.65        hdf5/1.10.4    mpich2/3.2       sshcc/alpha    vtk/8.0.1 (D)
   cppunit/1.10.3    gsl/1.16         masa/0.44.0    openmpi/3.0.0    tbb/2018_U2
   fftw3/3.3.8       gsl/2.4   (D)    mkl/19.0       pfftw3/3.3.4     vtk/7.1.1

----------------------- /opt/apps/ossw/derived_modulefiles/ubt18/modulefiles -----------------------
   clang/system    gcc/8.2    (L,D)    intel/18.0 (D)    nompi/nompi
   gcc/system      intel/17.0          intel/19.0
<--- snip --->

Note

Currently, we have not compiled versios of openmpi or mpich with Intel. These will become available as the demand becomes apparent. For now, we recommend using GCC 8.2.

Note

Intel 18.0 compilers are not officially supported by Intel, use at your own risk. It’s strongly recommended using version 19 or GCC compilers.

I don’t see the module for XYZ

If you used a module on CentOS 7 and you don’t see it available, for example:

$ module load texlive
Lmod has detected the following error:  The following module(s) are unknown: "texlive"

This might be because we installed the packages for texlive made available through Ubuntu’s PPA.

Ubuntu has more available packages over CentOS, more than likely we installed those packages. We made our best effort to install prebuilt packages over rebuilding software since Ubuntu does release updates and maintains newer versions of software. If you don’t see something, you can try:

$ apt search texlive
$ apt show texlive

For complete list of installed packages:

$ dpkg -l

FEnICS

This software has become very popular with researchers. This software does not play well with the module system, therefore there will be no module available or sourcing of any type of environment like we had for CentOS 7. For Ubuntu, there is an available package, it will not be installed by default on all desktops, if you need it installed on your desktop, send a help request to rt. If you require a newer version than what’s available through Ubuntu’s PPA’s, we suggest you build it. Sysnet will not be able to help you build this software.

Set up environment for custom modules

Create a directory which will contain all your custom modules. For this example we will use /org/centers/foo/modulefiles. Add the module path to your modules environment:

module use /org/centers/foo/modulefiles

You should then be able to add any modulefiles you like to this directory. A sample modulefile is shown for reference:

#%Module1.0

proc ModulesHelp { } {
  puts stderr "The tig module file"
}

module-whatis "Name: tig"

prepend-path    PATH /org/centers/foo/apps/tig/0.11/bin
prepend-path MANPATH /org/centers/foo/apps/tig/0.11/share/man

For more information about writing modulefiles visit https://lmod.readthedocs.io/en/latest/

Unencrypting /workspace

The /workspace partition on managed desktops is encrypted. When logging into a desktop’s console after a reboot, the encrypted partition must be unencrypted, you should be prompted in the X session to decrypt /workspace.

If your remotely log into a workstation and need access to /workspace, be aware that it might not have been unencrypted. If you see the file:

/workspace/WORKSPACE_IS_NOT_MOUNTED

This means the workspace has NOT been unencrypted. To unencrypt /workspace, issue:

sudo /usr/local/sbin/deluks

This will prompt for your Oden Institute credentials to unencrypt the encrypted partitions.

Retrieving backups of home directory

Often times you can accidentally misplace or delete an important file. If you are in a situation where a file you need is missing it may be worthwhile to look through the snapshot directory for backups.

  • In your desktop menu, select Places ‣ Home Folder

  • Make sure you have hidden files enabled by choosing View ‣ Show Hidden Files

Scroll down to a folder called .snapshots and open it.

You will see a series of folders with numbers on them. These represents the different dates the backups were taken in yyyy/mm/dd format. Choose a recent time and open the folder. There will be a folder inside named tree. Open it and you will see a copy of all your files in the home folder from the time period indicated on the parent folder.

Simply copy whatever files you need to your current home folder to restore them.

SUDO privileges

There are limited sudo privileges available on all manage desktops. To view the sudo commands, issue the following:

pebkac@suzerain:~$ sudo -l

This will post results similar to the following:

Matching Defaults entries for pebkac on suzerain:
 env_reset, mail_badpass,
 secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin,
 ignore_local_sudoers

 User pebkac may run the following commands on suzerain:
 (root) NOPASSWD: /usr/local/bin/fail2showbans.sh
 (root) NOPASSWD: /usr/local/bin/fail2unban.sh
 (root) NOPASSWD: /usr/local/bin/dropvmcache.sh
 (root) NOPASSWD: /usr/local/sbin/deluks
 (root) /sbin/reboot, /usr/sbin/reboot
 (root) NOPASSWD: /usr/local/bin/invalidate-cache.sh

On occasion we will grant sudo privileges for specific commands upon request, you must provide a specific use case, Sysnet will then take it under consideration. Unfortunately, we will not grant sudo privileges for apt install or docker related commands.

Password Change

Important

We suggest reviewing Sysnet’s policy on password rules before changing your password.

Visit our Password Change page.

How do I access my vnc server?

Warning

These instructions need a little work, try at your own risk. If you think you found a solution, share it with us so we can stay up to date.

From OSX and Linux using X forwarding.

From OSX and Linux using port forwarding.

  • $ ssh -l username -L port:localhost:port workstation.oden.utexas.edu

  • You should be able to point your VNC client at localhost:port where “port” is the port of your vnc server on the remote computer.

From Windows using port forwarding.

  • Download and install the SSH client called PuTTY here http://www.chiark.greenend.org.uk/~sgtatham/putty/

  • In “Session” -> “Host Name (or IP address)” input “workstation.oden.utexas.edu”

  • In “Session” -> “Port” input “22”

  • In “Connection” -> “SSH” -> “Tunnels” -> “Source port” input the VNC port.

  • In “Connection” -> “SSH” -> “Tunnels” -> “Destination” input “localhost:port”

  • In “Connection” -> “SSH” -> “Tunnels” -> “Add”

  • In “Connection” -> “SSH” -> “Tunnels” -> “Open”

  • Now connect your local vnc client to “localhost:port” while leaving the ssh window open

Nvidia issues

Occasionally you might see an issue when trying to run a GPU job or when issuing nvidia-smi, you might see this:

$ nvidia-smi
  Failed to initialize NVML: Driver/library version mismatch

This is due to the NVIDIA drivers having been upgraded but the run-time driver information is not up to date. The easiest fix for this condition is to reboot the workstation or server. Since most servers are multi-user, be sure to check that others are not running jobs. If others are logged in, reach out to them before issuing a reboot.

How do I report a problem

The transition to Ubuntu 18.04 is not perfect, if you find a problem please make an email describing your problem and address it to RT