Skip to content

High-performance Computing (HPC) ​

The module's jobs run on your lab's own cluster instead of on ViMi. Choose High-performance Computing (HPC) as the compute environment when creating or editing the module.

Here you will find information about:

  • Setting the HPC connection on ViMi
  • Configuring your module to run on HPC
  • Running a job with an HPC-enabled module

Setup HPC Connection ​

The permission Lab Management is required to manage HPC connections.

To create a new connection, find the HPC Configuration under Lab Space -> Lab Management. This page automatically generates an SSH key that you will need to add to your HPC system.

Working Directory Guidelines ​

Please follow these recommendations when specifying your base directory:

  • Ensure that all users have both read and write permissions for the specified directory.
  • Verify that the directory as well as any copied module files will not exceed the user’s allowed disk quota.
  • Avoid using spaces or special characters in directory names; use only letters, numbers, dashes (-), underscores (_), periods (.), or the variables ($LOGIN or $USER).

Virtual Environments ​

Tick Virtual Python environment on the module to have ViMi build and manage a Python environment for it on the cluster.

When it is ticked, the environment you name is looked up on the cluster:

  • It does not exist, so it is created.
  • It exists at the requested Python version, so it is reused.
  • It exists at a different version, so it is left untouched and a second environment is created beside it with the version appended, for example myenv_3.9. This module then uses that one.

Requirements are installed into whichever environment is used, so a reused or hand-built environment gets this module's dependencies too. Versions are compared on the minor version only, so a cluster's 3.9.6 and a pyenv build of 3.9.19 both satisfy a module asking for 3.9.

If you untick it, ViMi builds no virtual environment for the module and the job runs with the cluster's own python3. Requirements may still be installed from requirements.txt, using the cluster's pip. This might be a shared work environment, so use with caution.

Choosing an environment manager ​

  • conda is the safest choice. It downloads the interpreter itself, whatever version you ask for.
  • venv cannot download an interpreter, so it uses one already installed on the login node. If the version you asked for is missing there, load a Python module in the cluster setup commands.
  • pyenv compiles Python from source. Fine for current versions; for end-of-life ones such as 3.7 and 3.8 the build often fails against a modern OpenSSL.

No manager is blocked. If the one you picked cannot work, the deploy says what was missing.

Environment name and path templates ​

The name or path is prefilled with a template. The variables in it are replaced with real values when the module is deployed.

  • $LOGIN (or $USER) - the cluster login
  • $LAB - the lab id
  • $MODULE - the module name, snake-cased
  • $BASE - the HPC configuration's base directory

Cluster setup commands ​

These run before every command the app issues, on both machines:

  • On the login node, before the environment is built. This is where a module load has to go for venv to find its interpreter, or for conda and pyenv to be reachable at all.
  • On the compute node, inside the job script before your Python script starts, after your own script body. Anything you already wrote there stays as it is.

The same line is often needed on both machines, which is why you only write it once here. Proxies and package mirrors belong here too, for example export https_proxy=....

Requirements ​

Installed from requirements.txt in the root of the module whenever the module installs requirements - into its own environment when one is managed, or into the cluster's active Python when none is. Installation uses a short network timeout so an unreachable package index fails quickly instead of hanging.

If the cluster reaches nothing on the public internet, tick Cluster cannot reach the public package indexes on the HPC configuration. Three optional fields then appear, so you can tell ViMi where packages come from instead:

  • PyPI index URL - used for the requirements install, whichever environment manager the module uses.
  • conda channels - used only when ViMi creates a conda environment.
  • Python source mirror - used only when pyenv has to build a Python version, which otherwise downloads it from python.org.

Leave a field empty to keep whatever the cluster is already configured with for that tool.

Submission Script ​

Apart from the typical submission script, we allow you to make special variable customizations. You do not need to add the module's script invocation command - it will be automatically get appended during job execution.

Everything you write in this script runs first. The environment activation, or the conda or pyenv wrapper, and the call to your Python script are appended after it, so exports and commands you place here take effect before your module runs.

What the app adds to your script ​

After everything you write here, the app appends the lines that actually run your module:

  • a change into the job's output directory, which is also the working directory your script sees
  • the activation of the Python environment, when one is configured
  • the call to your main script, followed by the working directory and your job's inputs as arguments

The exact lines are shown in the preview below the submission script field.

Variables ​

You can use variables in your submission script using {{ variable_name }} syntax. ViMi convert these variables into inputs where users will be asked to provide values during job submission.

IMPORTANT

Only letters, numbers, hyphens, and underscores are allowed in variable values - no spaces or special characters.

We reversed a few special variables. Automatic variable replacements include:

  • {{ user_name }} will be replaced with the name of the user who submitted the job.
  • {{ job_name }} will be replaced with the actual name of the job.
  • {{ project_name }} will be replaced with the name of the selected project.

Executables ​

Binaries placed inside your module folder are made executable automatically during job submission. To ensure they are recognized as executables, they must not have a file extension (e.g., exec, not exec.exe or exec.sh).

Standard streams ​

The standard output (stdout) and standard error (stderr) are captured automatically after the module execution and added to the job's results.