Ubuntu 22.04 guide

SSH

Here’s a comprehensive guide on SSH. 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/. We will not be migrating or building packages in /opt/apps/ossw unless there is a specific need that is not satisfied by standard installable packages. Any request for software to be built and installed in ossw will be evaluated by Sysnet.

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:

$ ml avail

------------------------------------------- /opt/apps/sysnet/modulefiles -------------------------------------------
 aocc/4.0.0          mathematica/13.0        matlab/r2022b                   tecplot/2020r1
 cuda/11.8    (D)    mathematica/13.1        matlab/r2023a                   tecplot/2020r2
 cuda/12.2           mathematica/13.2        matlab/r2023b            (D)    tecplot/2021r1
 cuda/12.4           mathematica/13.3        matlab/r2024a                   tecplot/2021r2
 julia/1.8.5         mathematica/14.0 (D)    nvhpc-byo-compiler/22.11        tecplot/2022r1
 maple/2020          matlab/r2020a           nvhpc-nompi/22.11               tecplot/2022r2
 maple/2021.1        matlab/r2020b           nvhpc/22.11                     tecplot/2023r2 (D)
 maple/2022          matlab/r2021a           pointwise/18.5r2                trelis/14.0    (D)
 maple/2023   (D)    matlab/r2022a           pointwise/2022.2.2       (D)    trelis/16.5

---------------------------------------- /opt/apps/sysnet/intel/modulefiles ----------------------------------------
 intel/2022    intel/2022.2    intel/2023.2 (D)
Where:
 D:  Default Module

 If the avail list is too long consider trying:

 "module --default avail" or "ml -d av" to just list the default modules.
 "module overview" or "ml ov" to display the number of modules for each name.

 Use "module spider" to find all possible modules and extensions.
 Use "module keyword key1 key2 ..." to search for all possible modules matching

To use the matlab module, issue:

module load matlab

By default, this will load matlab r2024a

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/r2023b

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

$ module load intel/2022.2

You will get something like this:

$ ml av

------------------------------------------------------ /opt/apps/sysnet/intel/oneapi/2022.2/modulefiles ------------------------------------------------------
 clck/latest                   compiler/2022.1.0      (D)    dpct/latest          icc32/2022.1.0       (D)    mkl/latest            oclfpga/2022.1.0 (D)
 clck/2021.6.0          (D)    compiler32/latest             dpct/2022.1.0 (D)    init_opencl/latest          mkl/2022.1.0   (D)    tbb/latest
 compiler-rt/latest            compiler32/2022.1.0    (D)    dpl/latest           init_opencl/2022.1.0 (D)    mkl32/latest          tbb/2021.6.0     (D)
 compiler-rt/2022.1.0   (D)    debugger/latest               dpl/2021.7.0  (D)    inspector/latest            mkl32/2022.1.0 (D)    tbb32/latest
 compiler-rt32/latest          debugger/2021.6.0      (D)    icc/latest           inspector/2022.1.0   (D)    mpi/latest            tbb32/2021.6.0   (D)
 compiler-rt32/2022.1.0 (D)    dev-utilities/latest          icc/2022.1.0  (D)    itac/latest                 mpi/2021.6.0   (D)    vtune/latest
 compiler/latest               dev-utilities/2021.6.0 (D)    icc32/latest         itac/2021.6.0        (D)    oclfpga/latest        vtune/2022.2.0   (D)

---------------------------------------------------------------- /opt/apps/sysnet/modulefiles ----------------------------------------------------------------
 aocc/4.0.0         maple/2021.1            mathematica/13.3        matlab/r2022b                   nvhpc/22.11               tecplot/2021r2
 cuda/11.8   (D)    maple/2022              mathematica/14.0 (D)    matlab/r2023a                   pointwise/18.5r2          tecplot/2022r1
 cuda/12.2          maple/2023       (D)    matlab/r2020a           matlab/r2023b            (D)    pointwise/2022.2.2 (D)    tecplot/2022r2
 cuda/12.4          mathematica/13.0        matlab/r2020b           matlab/r2024a                   tecplot/2020r1            tecplot/2023r2 (D)
 julia/1.8.5        mathematica/13.1        matlab/r2021a           nvhpc-byo-compiler/22.11        tecplot/2020r2            trelis/14.0    (D)
 maple/2020         mathematica/13.2        matlab/r2022a           nvhpc-nompi/22.11               tecplot/2021r1            trelis/16.5

------------------------------------------------------------- /opt/apps/sysnet/intel/modulefiles -------------------------------------------------------------
 intel/2022    intel/2022.2 (L)    intel/2023.2 (D)


Where:
 L:  Module is loaded
 D:  Default Module

If the avail list is too long consider trying:

"module --default avail" or "ml -d av" to just list the default modules.
"module overview" or "ml ov" to display the number of modules for each name.

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

Intel is now making their suite of compilers available for free. We need to add more here about this announcement.

I don’t see the module for XYZ

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

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

This is because we have installed the latest gcc package available for 22.04. This is just an example of the error you might see if you were trying to load modules on 22.04 that are no longer available.

Update your .bashrc

If you are loading modules in your .bashrc script, you will need to update the modules you are attempting to load. An error in your .bashrc or .cshrc file can lead to odd behaviours including not being able to login remotely or locally.

We made our best effort to install native 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. 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 send a help request to RT with the specific file or directory and location you need recovered.

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.

Change login shell

Please submit a help request to RT to change your shell.

Password Change

Important

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

Visit our Password Change page.

Retrieving backups of home directory

Please submit a help request to RT to retrieve files from backups. Provide useful information such as file location and file name when requesting a restore. We typically restore files to a scratch area for retrieval.

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