Skip to main content

Create an HPC compute environment

Create a compute environment for a high-performance computing (HPC) cluster that uses Altair PBS Pro, Grid Engine, IBM Spectrum LSF, Moab, or Slurm. For everything you need in place first, see the checklist.

Prerequisites

You need the following:

  • SSH or Tower Agent credentials in your workspace, or a managed identity in your organization. See HPC credentials.

Work and launch directories​

To set the work directory or launch directory dynamically at runtime, use variable expansion. Variable expansion works in conjunction with Tower Agent. The path that results from variable expansion must exist before the pipeline runs, because the agent does not create directories.

For example, suppose the HPC cluster file system has a /workspace directory with subdirectories for each user that can run jobs. You can then set the work directory to /workspace/$TW_AGENT_USER. For a user user1, the work directory resolves to the /workspace/user1 directory.

You can use the following variables:

  • TW_AGENT_WORKDIR: Resolves to the work directory for Tower Agent. By default, this directory resolves to the ${HOME}/work path, where HOME is the home directory of the user that the agent runs as. To override the work directory, specify the --work-dir argument when you configure Tower Agent. See the Tower Agent documentation.
  • TW_AGENT_USER: Resolves to the username that the agent runs as. By default, this is the Unix username. On systems where the agent cannot determine which user it runs as, the agent falls back to the value of the USER environment variable.

Create the compute environment​

  1. In a Seqera workspace, select Compute Environments, then select Add compute environment.

  2. Enter a descriptive name for this environment. Use only alphanumeric characters, dashes, and underscores.

  3. Select your HPC environment from the Platform drop-down.

  4. Select your existing managed identity, SSH, or Tower Agent credentials, or select + and SSH or Tower Agent to add new credentials.

  5. Enter the absolute path of the Work directory to use on the cluster. You can use the TW_AGENT_WORKDIR and TW_AGENT_USER variables in the file system path.

    caution

    All managed identity users must be part of the same Linux user group. The group must have access to the HPC compute environment work directory. Set group permissions for the work directory as follows (replace sharedgroupname and <WORKDIR> with your group name and work directory):

    chgrp -R sharedgroupname <WORKDIR>
    chmod -R g+wxs <WORKDIR>
    setfacl -Rdm g::rwX <WORKDIR>

    These commands change the group ownership of all files and directories in the work directory to sharedgroupname. They also ensure that new files inherit the directory's group. Default access control list (ACL) entries give the group read, write, and execute permissions for new files and directories. With this setup, the group has shared access and consistent permissions in the directory.

  6. Enter the absolute path of the Launch directory to use on the cluster. If you omit it, the launch directory is the same as the work directory.

  7. Enter the Login hostname. This is usually the hostname or public IP address of the cluster's login node.

  8. Enter the Head queue name. This is the default cluster queue to which the Nextflow job is submitted.

  9. Enter the Compute queue name. This is the default cluster queue to which the Nextflow job submits tasks.

  10. Optional: Expand Staging options and Environment variables to add pre- and post-run scripts, Nextflow configuration, or environment variables. See Common compute environment options.

  11. Configure any advanced options needed:

    • Use the Nextflow queue size to limit the number of jobs that Nextflow can submit to the scheduler at the same time.
    • Use the Head job submit options to add platform-specific submit options for the head job. You can also apply these options to compute jobs.
    note

    After you set these options during compute environment creation, you cannot override them at pipeline launch time.

    note

    In IBM LSF compute environments, use Unit for memory limits, Per job memory limits, and Per task reserve to control how memory is requested for Nextflow jobs.

  12. Select Add.

Pre-flight checks​

Pre-flight checks confirm that a compute environment is usable before you launch a pipeline. For compute environments that use Tower Agent, Seqera confirms at launch that a Tower Agent is online for the compute environment. If no Tower Agent is online, Seqera blocks the launch. See No Tower Agent is online for the selected compute environment.

See Pre-flight checks for how validation works.

Next steps​

To run pipelines in your HPC compute environment, see Launch pipelines.