Interactive HPC at PDC

Introduction

Interactive HPC allows scientific users to perform computations in real-time through a remote desktop environment, combined with an interactive job launcher.

What is ThinLinc?

ThinLinc is a remote desktop application developed by Cendio that enables users to connect to a remote server using the ThinLinc Client. It utilizes SSH for authentication and VNC for graphics rendering. ThinLinc comprises two main components: the Server and the Client. The ThinLinc server is configured by PDC administrators to provide a remote desktop environment. The ThinLinc client, available for Linux, Mac, and Windows, can be installed by users on their laptops or desktops.

How ThinLinc Can Assist with Your Computations?

When you connect to the ThinLinc server, you are provided with a remote desktop graphical environment that gives you access to various graphical applications, utilities, and terminals. Through this environment, you can:

  • Create and update files on the Lustre file system.

  • Submit interactive jobs to SLURM.

  • Launch GUI applications (e.g., Matlab, RStudio, Mathematica) and web applications (e.g., Jupyter Lab/Notebook) on Dardel.

Getting Started with Interactive HPC

To connect to the remote ThinLinc server, users need to download the ThinLinc client (tlclient). Choose the installation media that corresponds to your operating system from the Cendio download page. After downloading, run the installer and follow the instructions in the installation dialog box.

Supported Applications

Following applications are currently available on ThinLinc via Interactive Launcher.

Application

Version

Application Category

Abaqus

2021, 2019

PDC - Finite Element Analysis

Ansys-Fluent

2023R1, 21.2

PDC - Computational Fluid Dynamics

Armforge

22.0

PDC - Development Tools

Comsol

6.2, 6.1, 6.0, 5.6

PDC - Multiphysics Simulation

Converge

3.1.8, 3.0.25, 3.0.23

PDC - Computational Fluid Dynamics

Jupyter

Lab, Notebook

PDC - Jupyter

LS-Dyna

13.0-sp, 13.0-dp, 13.0-sp-intel, 13.0-dp-intel

PDC - Finite Element Analysis

Matlab

r2023a, r2022b, r2021b, r2020b

PDC - Numerical Computing

Mathematica

14.0.0

PDC - Numerical Computing

Paraview

5.12, 3.4.0, 3.3.3

PDC - Visualization

Rstudio

R4.3.2, R.4.4.0

PDC - Data Analysis

StarCCM

19.02.009, 19.04.007-dp, 18.06.006-dp

PDC - Computational Fluid Dynamics

Authentication - ThinLinc Client

The ThinLinc client supports multiple authentication methods. At PDC, Kerberos and SSH key-based authentication are available.

  • For Windows users, only SSH key-based authentication is supported.

  • For Linux and Mac users, both Kerberos and SSH key-based authentication can be used.

Step 01: Launch ThinLinc Client and enter Thinlinc server address and your PDC username. Please also check the box End existing session.

../../_images/thinlinc_main.png

Step 02: Click on Options -> Security Tab

Step 03: Choose type of authentication, either Kerberos or Public Key.

Read more about Kerberos Authentication How to log in with kerberos and for ssh keybased authentication How to log in with SSH keys

Notice for Windows system:

  1. You can only use Public Key authentication to connect the Thinlinc server on Windows system.

  2. The ThinLinc client uses OpenSSH for ssh communication with the server, that means that it cannot support PuTTy generated private keys. You have to convert the .ppk to OpenSSH format, this can be done with PuTTYGen by loading the private key and then clicking “Conversions” to “Export OpenSSH key”. You can also use the private key generated by command ssh-keygen in MS cmd

../../_images/puttgen.png

Kerberos Authentication

For Kerberos authentication, obtain Kerberos ticket in terminal and then connect to ThinLinc server.

kinit username@NADA.KTH.SE
klist
../../_images/select_kerberos_method.png

SSH Key-Based Authentication

For SSH key-based authentication, select the “Public Key” option in the security settings and provide the path to your private key.

../../_images/select_ssh_method.png

Step 04: After selecting the required authentication method, click “OK” to return to the main window of the ThinLinc client. Then, click “Connect!”.

Launching Interactive Jobs

Most of the GUI applications available on Dardel are already integrated in Remote Desktop Menu system. Users can launch Graphical applications and Jupyter Notebooks/Lab on Dardel interactively.

Graphical application on Dardel

Applications which have a graphical interface such as Matlab, Mathematica etc. can be launched interactively from Applications menu.

  • Click on Applications -> PDC-<App Category> and click on required application

../../_images/rdp_menu.png
  • Application launcher menu will appear where you can choose various options for this application

../../_images/gfxlauncher_main.png
  • Click on three dots to choose resources e.g. Jobname, Tasks per node and memory

../../_images/gfxlauncher_resources.png
  • View logs for gfxlauncher by clicking ‘More’

../../_images/gfxlauncher_logs.png
  • View Job Script which will be submitted for this interactive job

../../_images/gfxlauncher_jobscript.png
  • Start job by clicking ‘Start’ button and review progress in log tab.

../../_images/gfxlauncher_jobstarted.png

Launching Jupyter Lab and Jupyter Notebook

You can interactively launch Jupyter Lab and Notebook on Dardel by following the steps as below;

Step 01: Click on Applications -> PDC-Jupyter -> Jupyter Lab or Jupyter Notebook

../../_images/start_jupyter.png

Step 02: Configure your job parameters in the dialog box.

Step 03: For Custom Conda Environment, click on Job Settings and choose your Custom Conda Environment.

../../_images/jupyter_anaconda_env.png

Step 03: Click Start, wait for the job to start and in few seconds a firefox browser will open with Jupyter Lab or Notebook session. If you close the firefox browser, you can connect to same Jupyter session again by clicking ‘Reconnect to Lab’.

../../_images/reconnect2jupyter.png

Custom Conda Environment with Jupyter

Users can use a custom Conda environment with Jupyter on ThinLinc by following these steps:

  • Click on Applications -> PDC-Jupyter -> Jupyter Lab or Jupyter Notebook.

  • In the Interactive Launcher, click on Job Settings.

  • Check the option Use Custom Conda Env.

  • From the dropdown menu, select the Conda environment you want to use.

The Interactive Launcher detects all Conda environments located in ~/.conda/envs. If you have a Conda environment in a non-default location, add the full path of that environment to ~/.conda/environments.txt.

R Packages in RStudio

In RStudio, users can install and manage custom R packages.

  • To start, click on Applications -> PDC-Data Analysis -> RStudio-R<ver>.

  • Set the required job parameters and launch RStudio.

RStudio’s graphical interface comes with several pre-installed packages. You can easily view and search through these packages by using the following commands:

  • To list all installed packages along with their versions:

    installed.packages()
    
  • To get a simplified list that only shows package names:

    rownames(installed.packages())
    
  • To check if a specific package (e.g., tidyverse) is installed:

    "tidyverse" %in% installed.packages()[, "Package"]
    
  • Users can install additional packages in their home directory, which is the default location for any packages installed by a non-administrative user.

    To install a package, such as plotly, simply run:

    install.packages("plotly")
    

Launching Interactive jobs from Terminal

If your application is not integrated in menu system, you can still run such application interactively via terminal in Remote desktop environment.

  • Request for node allocation and note down the allocated nid number e.g. nid00xx

salloc --ntasks=2 -t 01:00:00 -p shared --qos=normal -A <project>
  • Login to allocated node

ssh -X nid00xx
  • Load application module and launch

module load PDC
module load matlab/2022a
matlab

Disconnect or Logout

If you don’t have application running in remote desktop environment, please logout from current sesssion by selecting Logout as shown below to free up ThinLinc licenses for someone else.

../../_images/thinlinc_logout.png

If you simply close your ThinLinc client, your session will continue to run on the server, and you can reconnect via the ThinLinc client to resume the same session. However, this is not recommended if you don’t have any active applications running on the ThinLinc node, as it still uses up ThinLinc licenses.

Additionally, if your session remains inactive for 24 hours, it will be terminated automatically. It’s important to log out properly when you’re finished to free up resources and licenses for other users.

FAQ’s

  1. Is there an idle timeout for ThinLinc session?

    Yes, ThinLinc sessions that remain inactive for 24 hours will be terminated to free up resources for other users.

  2. The menu structure in the ThinLinc client is not working as expected. What should I do?

    If the menu entries are not appearing correctly, it may be because the previous ThinLinc installation created menu entries in your home directory. To resolve this issue, you should clean up your home directory to prevent old menu configurations from interfering with the system-provided menu structure.

rm ~/.local/share/applications/gfx-*
rm ~/.local/share/desktop-directories/*
  1. How can I request to add additional applications in Menu Integration?

    You can always open a service request at PDC to request for additional applications to be intergrated in menu system.

  2. What happens if I close my ThinLinc session?

    If you close your ThinLinc session, your current session and applications will continue to run. However, if the session remains inactive for 24 hours, it will be terminated.

  3. I am receiving a license error. What should I do?

    We currently have 30 ThinLinc client licenses, so the 31st user trying to connect will encounter a license error. You may try reconnecting later to see if a license becomes available. If this issue occurs frequently, please submit a support request so we can evaluate the possibility of increasing the number of ThinLinc client licenses.