Horizon User Guide
Last update: November 25, 2026
Info
This user guide is a draft in progress. You may submit feedback via support ticket or PR.
Notices
-
Horizon's Globus endpoint will be setup once Horizon is in full production. Until then, use the standard
scputility to transfer data to Horizon. -
Horizon is now open to early users. (11/17/2026)
-
Subscribe to Horizon User News. Stay up-to-date on Horizon's status, scheduled maintenances and other notifications. (04/15/2026)
-
Using Artificial Intelligence (AI) clients on TACC resources: We strongly recommend you run all AI assisted tasks on a compute node. Consult the Good Conduct Guide guide for instructions on the use of AI tools and agents. (05/07/2026)
Caution
- You are responsible for any processes launched on TACC resources via any AI process.
- Any and all SUs consumed by an AI process launched by you will be charged to your allocation.
Introduction
Horizon is a National Science Foundation-funded system that is part of the the Leadership Class Computing Facility (LCCF) award, Award Abstract #2323116. Please reference TACC when providing any citations.
Allocations
Depending on your PI eligibility, you can request allocations through a few methods.
If you aren't faculty or post-doc eligible, you may be eligible for an Explore allocation through ACCESS.
System Specifications
Developed in collaboration with Dell Technologies, NVIDIA, VAST Data, Spectra Logic, Versity, and Sabey Data Centers, the Horizon supercomputer combines cutting-edge technologies with advanced infrastructure to redefine what is possible in scientific computing.
| Specification | Value |
|---|---|
| Performance (GPU component only) |
160 petaflops (FP64 units) 320 petaflops (FP32 units) ~288 petaflops |
| AI Performance | 20 exaflops for AI at BF16/FP16 40 exaflops for AI at FP8 80 exaflops for AI at FP4 |
| Scale | NVIDIA Grace Blackwell platform featuring 4,000 GPUs and NVIDIA Vera Vera servers featuring 4752 nodes |
| Networking | Interconnected by the NVIDIA Quantum-x800 InfiniBand networking platform |
| Local All-Solid State Storage | up to 200PB of storage delivering more than 8TB/s of read/write bandwidth along with multi-tenancy and Quality-of-Service capabilities. |
| Efficiency | Up to 6x more energy efficient, powered by a new 20 MW data center with advanced liquid cooling in Round Rock, Texas. |
Grace Blackwell Compute Nodes
Horizon hosts 1,000 Grace Blackwell (GB) nodes. The Grace Blackwell (GB) subsystem consists of nodes using the GB200 NVL4 platform. The NVL4 platform is configured with 4 NVIDIA Blackwell GPUs each with 185 GiB of HBM3 memory and 2 Grace CPUs each with 478 GiB of LPDDR5X memory and 72 cores.
A GB node provides 160 TFlops of FP64 performance and 20 PFlops of FP16 performance for ML workflows. The GB subsystem is housed in 28 racks, each containing 36 GB nodes. These nodes connect via an NVIDIA dual-rail InfiniBand 800 Gb/s fabric to NVIDIA XDR InfiniBand switches using a fully connected two-level fat-tree topology. There are two 800 Gb/s connections per node.
Table 1. Grace Blackwell Specifications
| Specification | Value |
|---|---|
| Server platform | Dell PowerEdge XE8712, NVIDIA GB200 NVL4 |
| GPUs per node | 4 × NVIDIA Blackwell (GB200) |
| GPU memory | 185 GiB HBM3e per GPU (~740 GiB per node) |
| GPU interconnect | NVLink; every GPU pair is connected by 6 NVLinks (about 600 GB/s bidirectional per pair) |
| CPUs per node | 2 × NVIDIA Grace (72 Arm Neoverse V2 cores each, Armv9) |
| CPU cores per node | 144 (2 sockets × 72) |
| Hardware threads | 1 per core, 144 per node |
| Clock rate | Up to 3.4 GHz |
| CPU memory | 478 GiB LPDDR5X per CPU (~956 GiB per node) |
| Cache | 64 KiB L1 data and 64 KiB L1 instruction per core 1 MiB L2 per core 114 MiB L3 per CPU (228 MiB per node) |
| GPU–CPU affinity | GPUs 0–1 with CPU 0 (cores 0–71) GPUs 2–3 with CPU 1 (cores 72–143) |
| Network | 2 × 800 Gb/s InfiniBand ports per node, one per CPU socket |
| Local storage | 480 GB NVMe SSD; /tmp is about 156 GiB (XFS) |
| Operating system | Rocky Linux 10.x, Arm64 kernel with 64 KiB pages |
Vera Vera Compute Nodes
Table 2. Vera Vera Specifications
| Specification | Value |
|---|---|
| CPU: | NVIDIA Vera CPU |
| Total cores per node: | 176 cores on two sockets (2 x 88) |
| Hardware threads per core: | 2 (Spatial Multi-Threading) |
| Hardware threads per node: | 2 x 88 x 2 = 352 |
| Clock rate: | TBA |
| Memory: | 768 GB LPDDR |
| Cache: | TBA |
| Local storage: | 240 GB |
| DRAM: | LPDDR5 |
Horizon hosts 4752 "Vera Vera" (VV) nodes with 176 cores each. Each VV node provides a performance increase of over 3x compared to Frontera's CLX nodes and ~2x compared to the Grace Grace nodes of Vista. This improved performance per node is due to increase in core count, 176 vs 144, an increase in vector units per core, 6 vs 4, and an increase in memory bandwidth, 2.4 TB/s vs 1 TB/s. Each VV node provides over 13 TFlops of double precision performance and over 2 TiB/s of memory bandwidth.
Login Nodes
The Horizon login nodes are Grace Grace (GG) nodes with 144 cores and 237 GB of LPDDR. They are compatible with the NVIDIA and GNU software stacks installed for the GB and VV nodes.
Network
The interconnect is based on Mellanox XDR technology with full XDR (800 Gb/s) connectivity between the switches and the GB GPU nodes and with XDR400 (400 Gb/s) connectivity to the VV compute nodes. A fat tree topology fully connects the compute nodes and the GPU nodes within separate trees with no over subscription within each tree. Every GB node is fully connected using full XDR (800 Gb/s) to every other GB node. Every VV node is fully connected using XDR400 (400 Gb/s) to every other VV node. Both sets of nodes are connected to the $HOME and $SCRATCH file systems via Infiniband.
Horizon Filesystems
Horizon will use a shared VAST file system for the $HOME and $SCRATCH directories.
Warning
The $WORK filesystem will not be available for early users. A $WORK filesystem will be available in late 2026. The /tmp partition is also available to users but is local to each node.
The Work file system does not utilize the high-performance Infiniband network for IO, and as a result will have increased latency and lower overall bandwidth when compared to the $SCRATCH file system.
Important
In order to achieve optimal performance and make the best use of the GPU resources, TACC Staff advises staging compute jobs out of Horizon's $SCRATCH file system, rather than the $WORK file system.
Table 3. File Systems
| Name | File System | Type | Quota | Key Features |
|---|---|---|---|---|
| Home | $HOME |
VAST | TBD | Not intended for parallel or high−intensity file operations. Backed up daily. |
| Work | $WORK |
VAST | TBD | Not backed up. |
| Scratch | $SCRATCH |
VAST | no quota Overall capacity ~400 PB. | Not backed up. Files are subject to purge if access time* is more than 10 days old. See TACC's Scratch File System Purge Policy below. |
Corral and Horizon
A Corral mount, /corral, will be available on the Horizon login nodes but will not be mounted on compute nodes/within jobs. The Corral system is intended for data sharing and publication purposes and as such is not appropriate for use directly in compute tasks.
Beginning in early 2027, you may request that your Corral project directory be moved to the Work file system, which will be available on Horizon compute nodes.
Scratch File System Purge Policy
Caution
The $SCRATCH file system, as its name indicates, is a temporary storage space. Files that have not been accessed* in ten days are subject to purge.
Deliberately modifying file access time, using any method, tool, or program, for the purpose of circumventing purge policies is prohibited.
*The operating system updates a file's access time when that file is modified on a login or compute node. Reading or executing a file/script on a login node does not update the access time, but reading or executing on a compute node does update the access time. This approach helps us distinguish between routine management tasks (e.g. tar, scp) and production use. Use the command ls -ul to view access times.
Accessing the System
Access to all TACC systems requires Multi-Factor Authentication (MFA). You can create an MFA pairing under "Manage Account" in the TACC Portal. See Multi-Factor Authentication at TACC for further information.
Important
You will be able to log on to Horizon only if you have an allocation on Horizon, otherwise your password will be rejected.
Monitor your projects & allocations the via the TACC Portal.
Secure Shell (SSH)
The ssh command (Secure Shell, or SSH protocol) is the standard way to connect to Horizon and initiate a login session. SSH also includes support for the UNIX file transfer utilities scp and sftp. These commands are available within Linux and the Terminal application within Mac OS. If you are using Windows, you will need a modern terminal application such as Windows Terminal, MobaXterm or Cyberduck.
Initiate an SSH session using the ssh command or the equivalent:
localhost$ ssh taccusername@horizon.tacc.utexas.edu
The above command will rotate connections across all available login nodes and route your connection to the next available node.
Important
Horizon's login nodes are a shared resource. See TACC's Good Conduct Policy for more information.
To connect to a specific login node, use its full domain name:
localhost$ ssh taccusername@login2.horizon.tacc.utexas.edu
To connect with X11 support on Horizon (usually required for applications with graphical user interfaces), use the -X or -Y option:
localhost$ ssh -X taccusername@horizon.tacc.utexas.edu
Use your TACC portal password for direct logins to TACC resources. You can change or reset your TACC password via the TACC Portal under "Manage Account". To report a connection problem, execute the ssh command with the -vvv option and include this command's verbose output when submitting a help ticket.
Do not run the ssh-keygen command on Horizon. This command will create and configure a key pair that will interfere with the execution of job scripts in the batch system. If you do this by mistake, you can recover by renaming or deleting the .ssh directory located in your home directory; the system will automatically generate a new pair for you when you next log into Horizon.
- execute
mv .ssh dot.ssh.old - log out
- log into Horizon again
After logging in again, the system will generate a properly configured key SSH pair.
Account Administration
This section explores ways to configure and manage your Linux account on Horizon. Regardless of your research workflow, you'll likely need to master Linux command-line basics along with a Linux-based text editor (e.g. emacs, nano, gedit, or vi/vim) to use the system properly. If you encounter a term or concept in this user guide that is new to you, a quick internet search should help you resolve the matter quickly.
Allocation Status
If your password is rejected while attempting to log in, it's possible your account or project has not been added to a Horizon allocation. You can list and manage your allocations via the TACC Portal.
Linux Shell
The default login shell for your user account is Bash. To determine your current login shell, examine the contents of the $SHELL environment variable:
$ echo $SHELL
Tip
If you'd like to change your login shell to csh, tcsh, or zsh, submit a help ticket.
The chsh ("change shell") command will not work on TACC systems.
When you start a shell on Horizon, system-level startup files initialize your account-level environment and aliases before the system sources your own user-level startup scripts. You can use these startup scripts to customize your shell by defining your own environment variables, aliases, and functions. These scripts (e.g. .profile and .bashrc) are generally hidden files: so-called "dotfiles" that begin with a period, visible when you execute: ls -a.
Before editing your startup files, however, it's worth taking the time to understand the basics of how your shell manages startup. Bash startup behavior is very different from the simpler csh behavior, for example. The Bash startup sequence varies depending on how you start the shell (e.g. using ssh to open a login shell, executing the bash command to begin an interactive shell, or launching a script to start a non-interactive shell). Moreover, Bash does not automatically source your .bashrc file when you start a login shell by using ssh to connect to a node. Unless you have specialized needs, however, this is undoubtedly more flexibility than you want: you will probably want your environment to be the same regardless of how you start the shell. The easiest way to achieve this is to execute source ~/.bashrc from your .profile, then put all your customizations in your .bashrc file. The system-generated default startup scripts demonstrate this approach. We recommend that you use these default files as templates.
For more information see the Bash Users' Startup Files: Quick Start Guide and other online resources that explain shell startup. To recover the originals that appear in a newly created account, execute /usr/local/startup_scripts/install_default_scripts.
Account-level Diagnostics
TACC's checklist utility detects and diagnoses common account-level issues. Checklist evaluates the access/availability of critical HPC components in a user's environment such as queue availability and access, file system availability and quotas, allocations, SSH keys and more.
Run this utility when you encounter unexpected account behavior and periodically as preventive maintenance.
login1.ls6$ checklist -t # display terse output
[PASS] 01 SSH: OK Permissions: keys & .ssh dir; pub key in authorized_keys file.
[PASS] 02 FILE SYSTEMS: Defined and Accessible (HOME SCRATCH WORK STOCKYARD)
[PASS] 03 FILESYSTEM QUOTAS: (/tmp 75% /home1 80% /work 99% %remaining)
[PASS] 04 MODULES: TACC and intel Loaded.
[PASS] 05 COMPILERS: intel: icc icpc ifort gcc: gcc g++ gfortran
[PASS] 06 PROJECTS: (A-ccsc 85% A-cciq 96% OTH24028 12% %remain)
[PASS] 07 BATCH: SLURM cmds found: sbatch scancel squeue. ALL QUEUES UP.
[PASS] 08 RESERVATIONS: None.
[PASS] 09 QUEUE ACCESS: No Restrictions.
Environment Variables
Your environment includes the environment variables and functions defined in your current shell: those initialized by the system, those you define or modify in your account-level startup scripts, and those defined or modified by the modules that you load to configure your software environment. Be sure to distinguish between an environment variable's name (e.g. HISTSIZE) and its value ($HISTSIZE). Understand as well that a sub-shell (e.g. a script) inherits environment variables from its parent, but does not inherit ordinary shell variables or aliases. Use export (in Bash) or setenv (in csh) to define an environment variable.
Execute the env command to see the environment variables that define the way your shell and child shells behave.
Pipe the results of env into grep to focus on specific environment variables. For example, to see all environment variables that contain the string GIT (in all caps), execute:
$ env | grep GIT
The environment variables, PATH and LD_LIBRARY_PATH, are especially important. The PATH is a colon-separated list of directory paths that determines where the system looks for your executables. The LD_LIBRARY_PATH environment variable is a similar list that determines where the system looks for shared libraries.
Using Modules
Lmod, a module system developed and maintained at TACC, makes it easy to manage your environment so you have access to the software packages and versions that you need to using your research. This is especially important on a system like Horizon that serves thousands of users with an enormous range of needs and software. Loading a module amounts to choosing a specific package from among available alternatives:
$ module load intel # load the default Intel compiler
$ module load intel/24.0.0 # load a specific version of Intel compiler
A module does its job by defining or modifying environment variables (and sometimes aliases and functions). For example, a module may prepend appropriate paths to $PATH and $LD_LIBRARY_PATH so that the system can find the executables and libraries associated with a given software package. The module creates the illusion that the system is installing software for your personal use. Unloading a module reverses these changes and creates the illusion that the system just uninstalled the software:
$ module load ddt # defines DDT-related env vars; modifies others
$ module unload ddt # undoes changes made by load
The module system does more, however. When you load a given module, the module system can automatically replace or deactivate modules to ensure the packages you have loaded are compatible with each other. In the example below, the module system automatically unloads one compiler when you load another, and replaces Intel-compatible versions of IMPI and PETSc with versions compatible with gcc:
$ module load intel
$ module load petsc
$ module load gcc
Lmod is automatically replacing "intel/24.0" with "gcc/13.2.0".
Due to MODULEPATH changes, the following have been reloaded:
1) catch2/3.8.1 2) petsc/3.24
The following have been reloaded with a version change:
1) impi/21.11 => impi/21.9
Tip
See Lmod's documentation for extensive information. The online documentation addresses the basics in more detail, but also covers several topics beyond the scope of the help text (e.g. writing and using your own module files).
On Horizon, modules generally adhere to a TACC naming convention when defining environment variables that are helpful for building and running software. For example, the papi module defines TACC_PAPI_BIN (the path to PAPI executables), TACC_PAPI_LIB (the path to PAPI libraries), TACC_PAPI_INC (the path to PAPI include files), and TACC_PAPI_DIR (top-level PAPI directory). After loading a module, here are some easy ways to observe its effects:
$ module show papi # see what this module does to your environment
$ env | grep PAPI # see env vars that contain the string PAPI
$ env | grep -i papi # case-insensitive search for 'papi' in environment
To see the modules you currently have loaded:
$ module list
To see all modules that you can load right now because they are compatible with the currently loaded modules:
$ module avail
To see all installed modules, even if they are not currently available because they are incompatible with your currently loaded modules:
$ module spider # list all modules, even those not available to load
To filter your search:
$ module spider slep # all modules with names containing 'slep'
$ module spider sundials/2.5.0 # additional details on a specific module
Among other things, the latter command will tell you which modules you need to load before the module is available to load. You might also search for modules that are tagged with a keyword related to your needs (though your success here depends on the diligence of the module writers). For example:
$ module keyword performance
You can save a collection of modules as a personal default collection that will load every time you log into Horizon. To do so, load the modules you want in your collection, then execute:
$ module save # save the currently loaded collection of modules
Two commands make it easy to return to a known, reproducible state:
$ module reset # load the system default collection of modules
$ module restore # load your personal default collection of modules
On TACC systems, the command module reset is equivalent to module purge; module load TACC. It's a safer, easier way to get to a known baseline state than issuing the two commands separately.
Help text is available for both individual modules and the module system itself:
$ module help swr # show help text for software package swr
$ module help # show help text for the module system itself
It's safe to execute module commands in job scripts. In fact, this is a good way to write self-documenting, portable job scripts that produce reproducible results. If you use module save to define a personal default module collection, it's rarely necessary to execute module commands in shell startup scripts, and it can be tricky to do so safely. If you do wish to put module commands in your startup scripts, see Horizon's default startup scripts in /usr/local/startup_scripts for a safe way to do so.
Crontabs
TACC allows cronjobs but be aware that crontab files are unique to the login node where they were created and are not shared across the login nodes. Crontab files are not allowed on the compute nodes.
Note
All TACC HPC systems host multiple login nodes. When you login, your connection is routed to the next available login node via round-robin DNS. This practice balances the user load across the system.
When creating a crontab file, use the hostname command to determine your exact location, and make note of it:
$ hostname
login2.horizon.tacc.utexas.edu
Similarly you can always connect to that login node by specifying its full domain name:
localhost$ ssh login2.horizon.tacc.utexas.edu
Important
As with any computation, ensure that cronjobs are run only on the compute nodes
TACC Tips
TACC staff has amassed a database of helpful tips for our users. Access these tips via the tacc_tips module and showTip command as demonstrated below:
$ module load tacc_tips
$ showTip
Tip 40 (See "module help tacc_tips" for features or how to disable)
Here are four different ways to repeat the last executed command (press enter after each):
* Use the up arrow
* Type !!
* Type !-1
* Press Ctrl+P
Managing Your Files
Navigating the Shared File Systems
Horizon mounts three file systems that are shared across all nodes: the home, work, and scratch file systems. Horizon's startup mechanisms define corresponding account-level environment variables $HOME, $SCRATCH, and $WORK that store the paths to directories that you own on each of these file systems.
Tip
Each "Active" TACC account user is allocated 1TB of space across the shared /work (Stockyard) file system, as well as 2TB on TACC's archival system, Ranch.
Horizon's /home and /scratch file systems are mounted only on Horizon, but the work file system mounted on Horizon is the Global Shared File System hosted on Stockyard. Stockyard is the same work file system that is currently available on Frontera, Lonestar6, and several other TACC resources.
The $STOCKYARD environment variable points to the highest-level directory that you own on the Global Shared File System. The definition of the $STOCKYARD environment variable is of course account-specific, but you will see the same value on all TACC systems that provide access to the Global Shared File System. This directory is an excellent place to store files you want to access regularly from multiple TACC resources.
Your account-specific $WORK environment variable varies from system to system and is a sub-directory of $STOCKYARD (Figure 1). The sub-directory name corresponds to the associated TACC resource. The $WORK environment variable on Horizon points to the $STOCKYARD/horizon subdirectory, a convenient location for files you use and jobs you run on Horizon. Remember, however, that all subdirectories contained in your $STOCKYARD directory are available to you from any system that mounts the file system. If you have accounts on both Horizon and Frontera, for example, the $STOCKYARD/horizon directory is available from your Frontera account, and $STOCKYARD/frontera is available from your Horizon account.
Note
Your quota and reported usage on the Global Shared File System reflects all files that you own on Stockyard, regardless of their actual location on the file system.
See the example for fictitious user bjones in the figure below. All directories are accessible from all systems, however a given sub-directory (e.g. lonestar6, frontera) will exist only if you have an allocation on that system. Figure 1 below illustrates account-level directories on the $WORK file system (Global Shared File System hosted on Stockyard).
Note that the resource-specific sub-directories of $STOCKYARD are nothing more than convenient ways to manage your resource-specific files. You have access to any such sub-directory from any TACC resources. If you are logged into Horizon, for example, executing the alias cdw (equivalent to cd $WORK) will take you to the resource-specific sub-directory $STOCKYARD/horizon. But you can access this directory from other TACC systems as well by executing cd $STOCKYARD/horizon. These commands allow you to share files across TACC systems. In fact, several convenient account-level aliases make it even easier to navigate across the directories you own in the shared file systems:
Table 4. Built-in Account Level Aliases
| Alias | Command |
|---|---|
cd or cdh |
cd $HOME |
cdw |
cd $WORK |
cds |
cd $SCRATCH |
cdy or cdg |
cd $STOCKYARD |
Sharing Files with Collaborators
If you wish to share files and data with collaborators in your project, see Sharing Project Files on TACC Systems for step-by-step instructions. Project managers or delegates can use Unix group permissions and commands to create read-only or read-write shared workspaces that function as data repositories and provide a common work area to all project members.
Running Jobs
Like all other current TACC systems, Horizon employs the Slurm Workload Manager as it's job scheduler. Slurm commands enable you to submit, manage, monitor, and control your jobs.
Slurm Partitions (Queues)
Caution
Queue limits are subject to change without notice.
Horizon admins may occasionally adjust queue settings in order to ensure fair scheduling for the entire user community.
TACC's qlimits utility will display the latest queue configurations.
A Grace Blackwell node contains 2 Grace CPUs and 4 Blackwell GPUs. The node is composed of 2 Grace/Blackwell/Blackwell boards connected via NVLink. One SU is charged per Grace/Blackwell/Blackwell. So, a regular GPU node is charged at 2 SUs per node hour.
There are shared queues that allow a user to request one or two GPUs to efficiently use the system. In the shared queue, the charge is .5 SUs per GPU.
Table 5. Production Queues
| Queue Name | Node Type | Max Nodes per Job | Max Job Duration | Charge Rate (per node-hour) |
|---|---|---|---|---|
gpu-shared |
Grace Blackwell | 3 (Max GPUs per job) | 48 hrs | .5 SUs (per GPU-hour) |
gpu-dev |
Grace Blackwell | 8 | 2 hrs | 2 SUs |
gpu |
Grace Blackwell | 64 | 48 hrs | 2 SUs |
gpu-large |
Grace Blackwell | 256 | 48 hrs | 2 SUs |
cpu-dev |
Vera Vera | 32 | 2 hrs | 0.3 SUs |
cpu |
Vera Vera | 256 | 48 hrs | 0.3 SUs |
cpu-large |
Vera Vera | 1024 | 48 hrs | 0.3 SUs |
Job Accounting
Like most TACC systems, Horizon's accounting and allocation system is based on node-hours: one unadjusted Service Unit (SU) represents a single compute node used for one hour (a node-hour). For any given job, the total cost in SUs is the use of one compute node for one hour of wall clock time plus any charges or discounts for the use of specialized queues, e.g. Stampede3's pvc queue, Lonestar6's gpu-a100 queue, and Frontera's flex queue. The queue charge rates are determined by the supply and demand for that particular queue or type of node used and are subject to change.
The Slurm scheduler tracks and charges for usage to a granularity of a few seconds of wall clock time. The system charges only for the resources you actually use, not those you request. If your job finishes early and exits properly, Slurm will release the nodes back into the pool of available nodes. Your job will only be charged for as long as you are using the nodes.
TACC does not implement node-sharing on any compute resource. Each Horizon compute node can be assigned to only one user at a time; hence a complete node is dedicated to a user's job and accrues wall-clock time for all the node's cores/GPUs whether or not all cores/GPUs are used.
TACC Charging Policy
Horizon SUs billed = (# nodes) x max(job duration in wall clock hours,.25) x (queue charge rate per node-hour)
All running jobs are charged a minimum of 15 minutes (.25 hrs) of queue time regardless of actual runtime. This policy ensures equal access to the queues for all users as TACC's user base expands.
For example: a 4-node job in Horizon's gpu queue which runs for five minutes would be charged as follows:
4 nodes * 0.25 hrs * 2 SUs/node-hour = 2 SUs
We strongly encourage users launching large jobs to do thorough testing of your code at smaller node counts prior to maximizing your runs.
Submitting Batch Jobs with sbatch
Use Slurm's sbatch command to submit a batch job to one of the Horizon queues:
login1$ sbatch myjobscript
Where myjobscript is the name of a text file containing #SBATCH directives and shell commands that describe the particulars of the job you are submitting. The details of your job script's contents depend on the type of job you intend to run.
In your job script you (1) use #SBATCH directives to request computing resources (e.g. 10 nodes for 2 hrs); and then (2) use shell commands to specify what work you're going to do once your job begins. There are many possibilities: you might elect to launch a single application, or you might want to accomplish several steps in a workflow. You may even choose to launch more than one application at the same time. The details will vary, and there are many possibilities. But your own job script will probably include at least one launch line that is a variation of one of the examples described here.
Your job will run in the environment it inherits at submission time; this environment includes the modules you have loaded and the current working directory. In most cases you should run your applications(s) after loading the same modules that you used to build them. You can of course use your job submission script to modify this environment by defining new environment variables; changing the values of existing environment variables; loading or unloading modules; changing directory; or specifying relative or absolute paths to files. Do not use the Slurm --export option to manage your job's environment: doing so can interfere with the way the system propagates the inherited environment.
Table 6. below describes some of the most common sbatch command options. Slurm directives begin with #SBATCH; most have a short form (e.g. -N) and a long form (e.g. --nodes). You can pass options to sbatch using either the command line or job script; most users find that the job script is the easier approach. The first line of your job script must specify the interpreter that will parse non-Slurm commands; in most cases #!/bin/bash or #!/bin/csh is the right choice. Avoid #!/bin/sh (its startup behavior can lead to subtle problems on Horizon), and do not include comments or any other characters on this first line. All #SBATCH directives must precede all shell commands. Note also that certain #SBATCH options or combinations of options are mandatory, while others are not available on Horizon.
By default, Slurm writes all console output to a file named "slurm-%j.out", where %j is the numerical job ID. To specify a different filename use the -o option. To save stdout (standard out) and stderr (standard error) to separate files, specify both -o and -e options.
Tip
The maximum runtime for any individual job is 48 hours. However, if you have good checkpointing implemented, you can easily chain jobs such that the outputs of one job are the inputs of the next, effectively running indefinitely for as long as needed. See Slurm's -d option.
Table 6. Common sbatch Options
| Option | Argument | Comments |
|---|---|---|
-A |
projectid | Charge job to the specified project/allocation number. This option is only necessary for logins associated with multiple projects. |
-aor --array |
=tasklist | Horizon supports Slurm job arrays. See the Slurm documentation on job arrays for more information. |
-d= |
afterok:jobid | Specifies a dependency: this run will start only after the specified job (jobid) successfully finishes |
-export= |
N/A | Avoid this option on Horizon. Using it is rarely necessary and can interfere with the way the system propagates your environment. |
--gres |
N/A | Horizon does not support this option. Slurm will reject any job script containing this directive. |
--gpus-per-task |
N/A | Horizon does not support this option. Slurm will reject any job script containing this directive. |
-p |
queue_name | Submits to queue (partition) designated by queue_name |
-J |
job_name | Job Name |
-N |
total_nodes | Required. Define the resources you need by specifying either: (1) -N and -n; or(2) -N and -ntasks-per-node. |
-n |
total_tasks | This is total MPI tasks in this job. See -N above for a good way to use this option. When using this option in a non-MPI job, it is usually best to set it to the same value as -N. |
-ntasks-per-nodeor -tasks-per-node |
tasks_per_node | This is MPI tasks per node. See -N above for a good way to use this option. When using this option in a non-MPI job, it is usually best to set -ntasks-per-node to 1. |
-t |
hh:mm:ss | Required. Wall clock time for job. |
-mail-type= |
begin, end, fail, or all |
Specify when user notifications are to be sent (one option per line). |
-mail-user= |
email_address | Specify the email address to use for notifications. Use with the -mail-type= flag above. |
-o |
output_file | Direct job standard output to output_file (without -e option error goes to this file) |
-e |
error_file | Direct job error output to error_file |
-mem |
N/A | Not available. If you attempt to use this option, the scheduler will not accept your job. |
Launching Applications
The primary purpose of your job script is to launch your research application. How you do so depends on several factors, especially (1) the type of application (e.g. MPI, OpenMP, serial), and (2) what you're trying to accomplish (e.g. launch a single instance, complete several steps in a workflow, run several applications simultaneously within the same job). While there are many possibilities, your own job script will probably include a launch line that is a variation of one of the examples described in this section:
Important
The following examples demonstrate launching within a Slurm job script or an idev session.
Do not launch jobs on the login nodes. See TACC's Good Conduct Policy for more information.
One Serial Application
To launch a serial application, simply call the executable. Specify the path to the executable in either the $PATH environment variable or in the call to the executable itself:
myprogram # executable in a directory listed in $PATH
$WORK/apps/myprov/myprogram # explicit full path to executable
./myprogram # executable in current directory
./myprogram -m -k 6 input1 # executable with notional input options
One Multi-Threaded Application
Launch a threaded application the same way. Be sure to specify the number of threads. Note that the default OpenMP thread count is 1.
export OMP_NUM_THREADS=176 # 176 total OpenMP threads (1 per Vera-Vera core)
./myprogram
One MPI Application
To launch an MPI application, use the TACC-specific MPI launcher ibrun, which is a Horizon-aware replacement for generic MPI launchers like mpirun and mpiexec. In most cases the only arguments you need are the name of your executable followed by any arguments your executable needs. When you call ibrun without other arguments, your Slurm #SBATCH directives will determine the number of ranks (MPI tasks) and number of nodes on which your program runs.
#SBATCH -N 4
#SBATCH -n 704
ibrun ./myprogram # ibrun uses the $SBATCH directives to properly allocate nodes and tasks
To use ibrun interactively, say within an idev session, you can specify:
login1$ idev -N 2 -n 80 -p cpu
c123-456$ ibrun ./myprogram # ibrun uses idev's arguments to properly allocate nodes and tasks
One Hybrid (MPI+Threads) Application
When launching a single application you generally don't need to worry about affinity: both OpenMPI and MVAPICH2 will distribute and pin tasks and threads in a sensible way.
export OMP_NUM_THREADS=8 # 8 OpenMP threads per MPI rank
ibrun ./myprogram # use ibrun instead of mpirun or mpiexec
As a practical guideline, the product of $OMP_NUM_THREADS and the maximum number of MPI processes per node should not be greater than total number of cores available per node (cpu nodes have 176 cores, gpu nodes have 144 cores).
MPI Applications - Consecutive
To run one MPI application after another (or any sequence of commands one at a time), simply list them in your job script in the order in which you'd like them to execute. When one application/command completes, the next one will begin.
module load git
module list
./preprocess.sh
ibrun ./myprogram input1 # runs after preprocess.sh completes
ibrun ./myprogram input2 # runs after previous MPI app completes
MPI Application - Concurrent
Coming soon.
More than One OpenMP Application Running Concurrently
You can also run more than one OpenMP application simultaneously on a single node, but you will need to distribute and pin tasks appropriately. In the example below, numactl -C specifies virtual CPUs (hardware threads). According to the numbering scheme for GG cores, CPU () numbers 0-143 are spread across the 144 cores, 1 thread per core.
export OMP_NUM_THREADS=2
numactl -C 0-1 ./myprogram inputfile1 & # HW threads (hence cores) 0-1. Note ampersand.
numactl -C 2-3 ./myprogram inputfile2 & # HW threads (hence cores) 2-3. Note ampersand.
wait
Shared Queue Jobs
To launch a slurm job in the shared queue, gpu-shared, you must also select the number of GPUs that you want to use. This can be done either on the command line:
sbatch --gpus=2 <slurm_batch_script>
or within a batch script using an SBATCH directive:
#SBATCH --gpus=2 #Requests 2 GPUs from a shared node
These options are only available for the gpu-shared queue. You may request 1, 2, or 3 gpus and will be charged .5, 1.0, or 1.5 SUs respectively.
Interactive Sessions
Interactive Sessions with idev and srun
TACC's own idev utility is the best way to begin an interactive session on one or more compute nodes. To launch a thirty-minute session on a single node in the development queue, simply execute:
login1$ idev
You'll then see output that includes the following excerpts:
...
-----------------------------------------------------------------
Welcome to the Horizon Supercomputer
-----------------------------------------------------------------
...
-> After your `idev` job begins to run, a command prompt will appear,
-> and you can begin your interactive development session.
-> We will report the job status every 4 seconds: (PD=pending, R=running).
->job status: PD
->job status: PD
...
c449-001$
The job status messages indicate that your interactive session is waiting in the queue. When your session begins, you'll see a command prompt on a compute node (in this case, the node with hostname c449-001). If this is the first time you launch idev, the prompts may invite you to choose a default project and a default number of tasks per node for future idev sessions.
The idev utility also supports the -g flag to specify the number of GPUs for the shared queue. This option only works for shared queues.
For command line options and other information, execute idev --help. It's easy to tailor your submission request (e.g. shorter or longer duration) using Slurm-like syntax:
login1$ idev -p gpu -N 2 -n 8 -m 150 # gpu queue, 2 nodes, 8 total tasks, 150 minutes
For more information see the idev documentation.
Interactive Sessions using ssh
If you have a batch job or interactive session running on a compute node, you "own the node": you can connect via ssh to open a new interactive session on that node. This is an especially convenient way to monitor your applications' progress. One particularly helpful example: login to a compute node that you own, execute top, then press the "1" key to see a display that allows you to monitor thread ("CPU") and memory use.
There are many ways to determine the nodes on which you are running a job, including feedback messages following your sbatch submission, the compute node command prompt in an idev session, and the squeue or showq utilities. The sequence of identifying your compute node then connecting to it would look like this:
login1$ squeue -u bjones
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
858811 skx-dev idv46796 bjones R 0:39 1 c448-004
1ogin1$ ssh c448-004
...
C448-004$
Slurm Environment Variables
Be sure to distinguish between internal Slurm replacement symbols (e.g. %j described above) and Linux environment variables defined by Slurm (e.g. SLURM_JOBID). Execute env | grep SLURM from within your job script to see the full list of Slurm environment variables and their values. You can use Slurm replacement symbols like %j only to construct a Slurm filename pattern; they are not meaningful to your Linux shell. Conversely, you can use Slurm environment variables in the shell portion of your job script but not in an #SBATCH directive.
Caution
For example, the following directive will not work the way you might think:
#SBATCH -o myMPI.o${SLURM_JOB_ID} # incorrect
Tip
Instead, use the following directive:
#SBATCH -o myMPI.o%j # "%j" expands to your job's numerical job ID
Similarly, you cannot use paths like $WORK or $SCRATCH in an #SBATCH directive.
For more information on this and other matters related to Slurm job submission, see the Slurm online documentation; the man pages for both Slurm itself (man slurm) and its individual commands (e.g. man sbatch); as well as numerous other online resources.
Job Management
In this section, we present several Slurm commands and other utilities that are available to help you plan and track your job submissions as well as check the status of the Slurm queues.
Important
When interpreting queue and job status, remember that Horizon does not operate on a first-come-first-served basis. Instead, the sophisticated, tunable algorithms built into Slurm attempt to keep the system busy, while scheduling jobs in a way that is as fair as possible to everyone. At times this means leaving nodes idle ("draining the queue") to make room for a large job that would otherwise never run. It also means considering each user's "fair share", scheduling jobs so that those who haven't run jobs recently may have a slightly higher priority than those who have.
Monitoring Queue Status
Monitor queue status via Slurm's sinfo command and/or TACC's qlimits utility.
TACC's qlimits command
To display resource limits for the Lonestar queues, execute: qlimits. The result is real-time data; the corresponding information in this document's table of Horizon queues may lag behind the actual configuration that the qlimits utility displays.
Slurm's sinfo command
Slurm's sinfo command allows you to monitor the status of the queues. If you execute sinfo without arguments, you'll see a list of every node in the system together with its status. To skip the node list and produce a tight, alphabetized summary of the available queues and their status, execute:
login1$ sinfo -S+P -o "%18P %8a %20F" # compact summary of queue status
This command's output might look like this:
PARTITION AVAIL NODES(A/I/O/T)
gpu up 951/4/5/960
gpu-dev* up 18/22/2/40
gpu-large up 951/4/5/960
gpu-shared up 18/22/2/40
The AVAIL column displays the overall status of each queue (up or down), while the column labeled NODES(A/I/O/T) shows the number of nodes in each of several states ("Allocated", "Idle", "Offline", and "Total"). Execute man sinfo for more information. Use caution when reading the generic documentation, however: some available fields are not meaningful or are misleading on Horizon (e.g. TIMELIMIT, displayed using the %l option).
Monitoring Job Status
Monitor your job's status in the queue via Slurm's squeue command and/or TACC's showq utility.
Slurm's squeue command
Slurm's squeue command displays the state of all queued and running jobs.
login1$ squeue # show all jobs in all queues
login1$ squeue -u bjones # show all jobs owned by bjones
login1$ man squeue # more info
The squeue command's default output format lists all nodes assigned to displayed jobs; this can make the output difficult to read. See the example below for a handy variation that suppresses the nodelist:
Tip
The squeue command's default output format lists all nodes assigned to displayed jobs; this can make the output difficult to read. See the example below for a handy variation that suppresses the nodelist:
login1$ squeue -o "%.10i %.12P %.12j %.9u %.2t %.9M %.6D" # suppress nodelist
Job and Queue Status Meanings
The squeue command's output displays two columns of interest, the column labeled ST displays each job's status, and the last column, labeled NODELIST/REASON, includes a nodelist for running/completing jobs, or a reason for pending jobs. See Table 7 and Table 8 below for detailed explanations.
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
674649 gpu bb_rag_s rtoscano PD 0:00 1 (Dependency)
696999 gpu g6_deim 999999 PD 0:00 1 (DependencyNeverSatisfied)
696818 gpu TESSA_J1 slindsey PD 0:00 2 (Dependency)
690973 gpu TESSA_J2 slindsey R 1-23:42:47 2 i617-[062-063]
696803 gpu TESSA_J2 slindsey R 3:24:00 2 i617-[001-002]
697595 gpu-dev 2wiki300 ashleyp CG 3:36:29 1 c634-022
673236 gpu-dev IFML-R 895124 PD 0:00 1 (QOSMaxWallDurationPerJobLimit)
697740 gpu-dev lysozyme sarajane PD 0:00 16 (Priority)
697456 gpu-dev grpo_eva jemerson PD 0:00 1 (Dependency)
695288 gpu-dev tldr_int kellykel PD 0:00 1 (DependencyNeverSatisfied)
695427 gpu-dev idv02624 reynolds R 1-18:40:00 8 c611-[071,122],c619-031,c620-[051,141-142],c640-[061-062]
697606 gpu-dev musique3 tg111111 R 3:22:17 1 c612-021
697613 gpu-dev ga_vmme_ bcatton R 3:02:21 2 c613-152,c619-052
695666 gpu-dev idv43155 camiguet R 1-16:44:38 1 c621-052
697723 gpu-dev ga_lvb_r mylouis R 16:19 2 c637-021,c641-061
697782 gpu-dev proc_syn cmannion R 34:45 8 c611-032,c613-[141,151],c619-151,c620-031,c622-[102,131,152]
697802 gpu-dev idv24504 gbell PD 0:00 1 (Resources)
614573 gpu-dev jupyter- jheldman PD 0:00 1 (JobHeldAdmin)
611728 gpu-dev jupyter- jheldman PD 0:00 1 (JobHeldAdmin)
697772 gpu-dev idv19251 reynolds R 43:26 1 c642-011
squeue outputTable 7. Job Status Meanings
| Status Code | Status | Description |
|---|---|---|
CA |
CANCELLED | Job was explicitly cancelled by the user or system administrator |
CD |
COMPLETED | Job has terminated all processes on all nodes with an exit code of zero. |
CG |
COMPLETING | Job is in the process of completing. Some processes on some nodes may still be active. |
F |
FAILED | Job terminated with non-zero exit code or other failure condition. |
NF |
NODE_FAIL | Job terminated due to failure of one or more allocated nodes. |
PD |
PENDING | Job is awaiting resource allocation. |
PR |
PREEMPTED | Job terminated due to preemption. |
R |
RUNNING | Job has an allocation and is currently running. |
TO |
TIMEOUT | Job terminated upon reaching its time limit. |
Table 8. Pending Jobs Reason
The last column, labeled NODELIST/REASON, includes a nodelist for running/completing jobs, or a reason for pending jobs.
NODELIST/REASON |
Description |
|---|---|
Resources |
The necessary combination of nodes/GPUs for your job are not available |
Priority |
There are other jobs in the queue with a higher priority |
Dependency |
The job will not start until the dependency specified by you is satisfied. |
ReqNodeNotAvailable |
If you submit a job before a scheduled system maintenance period, and the job cannot complete before the maintenance begins, your job will run when the maintenance/reservation concludes. The job will remain in the PD state until Horizon returns to production. |
QOSMaxJobsPerUserLimit |
The number of your jobs queued exceeds that queue's limits. These jobs will run once your previous jobs have ended. |
Tip
The --start option to the squeue command displays job start times, including very rough estimates for the expected start times of some pending jobs that are relatively high in the queue:
login1$ squeue --start -j 167635 # display estimated start time for job 167635
TACC's showq utility
TACC's showq utility mimics a tool that originated in the PBS project, and serves as a popular alternative to the Slurm squeue command:
login1$ showq # show all jobs; default format
login1$ showq -u # show your own jobs
login1$ showq -U bjones # show jobs associated with user bjones
login1$ showq -h # more info
The output groups jobs in four categories: ACTIVE, WAITING, BLOCKED, and COMPLETING/ERRORED. A BLOCKED job is one that cannot yet run due to temporary circumstances (e.g. a pending maintenance or other large reservation.).
If your waiting job cannot complete before a maintenance/reservation begins, showq will display its state as **WaitNod** ("Waiting for Nodes"). The job will remain in this state until Horizon returns to production.
Since TACC charges by the node rather than core, showq's default format now reports total nodes associated with a job rather than cores, tasks, or hardware threads. Run showq with the -l option to display the number of cores and the job's queue.
Dependent Jobs using sbatch
You can use sbatch to help manage workflows that involve multiple steps: the --dependency option allows you to launch jobs that depend on the completion (or successful completion) of another job. For example you could use this technique to split into three jobs a workflow that requires you to (1) compile on a single node; then (2) compute on 40 nodes; then finally (3) post-process your results using 4 nodes.
login1$ sbatch --dependency=afterok:173210 myjobscript
Caution
It is not possible to add resources to a job (e.g. allow more time, increase number of nodes) once you've submitted the job to the queue.
For more information see the Slurm online documentation. Note that you can use $SLURM_JOBID from one job to find the jobid you'll need to construct the sbatch launch line for a subsequent one. But also remember that you can't use sbatch to submit a job from a compute node.
Inspecting Running and Completed Jobs
-
To view some accounting data associated with your own jobs, use
sacct:login1$ sacct --starttime 2026-05-01 # show jobs that started on or after this date -
To cancel a pending or running job, first determine its jobid, then use
scancel:login1$ squeue -u bjones # one way to determine jobid JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 170361 gpu spec12 bjones PD 0:00 32 (Resources) login1$ scancel 170361 # cancel job -
For detailed information about the configuration of a specific job, use
scontrol:login1$ scontrol show job=170361
NVIDIA MPS
NVIDIA's Multi-Process Service (MPS) allows multiple processes to share a GPU efficiently by reducing scheduling overhead. MPS can improve GPU resource sharing between processes when a single process cannot fully saturate the GPU's compute capacity.
Follow these steps to configure MPS on Horizon for optimized multi-process workflows:
-
Configure Environment Variables
Set environment variables to define where MPS stores its runtime pipes and logs. In the example below, these are placed in each node's
/tmpdirectory. The/tmpdirectory is ephemeral and cleared after a job ends or a node reboots. Add these lines to your job script or shell session:# Set MPS environment variables export CUDA_MPS_PIPE_DIRECTORY=/tmp/nvidia-mps export CUDA_MPS_LOG_DIRECTORY=/tmp/nvidia-logTo retain these logs for later analysis, specify directories in
$SCRATCH,$WORK, or$HOMEfile systems instead of/tmp. -
Launch MPS Control Daemon
Use
ibrunto start the MPS daemon across all allocated nodes. This ensures one MPS control process per node:# Launch MPS daemon on all nodes export TACC_TASKS_PER_NODE=1 # Force one task per node ibrun -np $SLURM_NNODES nvidia-cuda-mps-control -d unset TACC_TASKS_PER_NODE # Reset to default task distribution -
Submit Your GPU Job
After enabling MPS, run your CUDA application as usual. For example:
ibrun ./your_cuda_executable -
Optional: Quit MPS daemon on all nodes
export TACC_TASKS_PER_NODE=1 # Force 1 task/node ibrun -np $SLURM_NNODES bash -c "echo quit | nvidia-cuda-mps-control" unset TACC_TASKS_PER_NODE
Sample Job Script
Incorporating the above elements into a job script may look like this:
#!/bin/bash
#SBATCH -J mps_gpu_job # Job name
#SBATCH -o mps_job.%j.out # Output file (%j = job ID)
#SBATCH -t 01:00:00 # Wall time (1 hour)
#SBATCH -N 2 # Number of nodes
#SBATCH -n 32 # Total tasks (16 per node)
#SBATCH -p gpu # GPU partition (modify as needed)
#SBATCH -A your_project # Project allocation
# 1. Configure environment
export CUDA_MPS_PIPE_DIRECTORY=/tmp/nvidia-mps
export CUDA_MPS_LOG_DIRECTORY=/tmp/nvidia-log
# 2. Launch MPS daemon on all nodes
echo "Starting MPS daemon..."
export TACC_TASKS_PER_NODE=1 # Force 1 task/node
ibrun -np $SLURM_NNODES nvidia-cuda-mps-control -d
unset TACC_TASKS_PER_NODE
sleep 5 # Wait for daemons to initialize
# 3. Run your CUDA application
echo "Launching application..."
ibrun ./your_cuda_executable # Replace with your executable
Notes on Performance
MPS is particularly effective for workloads characterized by:
- Fine-grained GPU operations (many small kernel launches)
- Concurrent processes sharing the same GPU
- Underutilized GPU resources in single-process workflows
You may verify performance gains for your use case using the following command to monitor the node that your job is running on (e.g., c608-052):
login1$ ssh c608-052
c608-052$ nvidia-smi dmon --gpm-metrics=3,12 -s u
The side-by-side plots in Figure 1 illustrate the performance enhancement obtained by running two GPU processes simultaneous on a single Hopper node with MPS. The GPU performance improvement is ~12%, compared to no improvement without MPS. Also, the setup cost on the CPU (about 12 seconds) is completely overlapped, resulting in in a 1.2x total improvement for 2 simultaneous Amber executions. Even better performance is expected for applications which don't load the GPU as much as Amber.

Building Software
Important
TACC maintains a database of currently installed software packages and libraries across all HPC resources. Navigate to TACC's Software List to see where, or if, a particular package is already installed on a particular resource.
If TACC does not have your desired software package already installed, you are welcome to download, build, and install the package in your own account. See Building Third-Party Software in the Software at TACC guide.
The phrase "building software" is a common way to describe the process of producing a machine-readable executable file from source files written in C, Fortran, CUDA, or some other programming language. In its simplest form, building software involves a simple, one-line call or short shell script that invokes a compiler. More typically, the process leverages the power of makefiles, so you can change a line or two in the source code, then rebuild in a systematic way only the components affected by the change. Increasingly, however, the build process is a sophisticated multi-step automated workflow managed by a special framework like autotools or cmake, intended to achieve a repeatable, maintainable, portable mechanism for installing software across a wide range of target platforms.
This section of the user guide does nothing more than introduce the big ideas with simple one-line examples. You will undoubtedly want to explore these concepts more deeply using online resources. You will quickly outgrow the examples here. We recommend that you master the basics of CMake and/or makefiles as quickly as possible: even the simplest computational research project will benefit enormously from the power and flexibility of a CMakefile or makefile-based build process.
NVIDIA Compilers
NVIDIA is the recommended and default compiler suite on Horizon.
Here are simple examples that use the NVIDIA compiler to build an executable from source code:
$ nvc mycode.c # C source file; executable a.out
$ nvc main.c calc.c analyze.c # multiple source files
$ nvc mycode.c -o myexe # C source file; executable myexe
$ nvcpc mycode.cpp -o myexe # C++ source file
$ nvfortran mycode.f90 -o myexe # Fortran90 source file
Compiling a code that uses OpenMP would look like this:
$ nvc -openmp mycode.c -o myexe # OpenMP
See the published NVIDIA documentation, available online at https://docs.nvidia.com/hpc-sdk//index.html.
GNU Compilers
The GNU foundation maintains a number of high quality compilers, including a compiler for C (gcc), C++ (g++), and Fortran (gfortran). The gcc compiler is the foundation underneath all three, and the term "gcc" often means the suite of these three GNU compilers.
Load a GCC module to access a recent version of the GNU compiler suite. Avoid using the GNU compilers that are available without a gcc module — those will be older versions based on the "system GCC" that comes as part of the Linux distribution.
Here are simple examples that use the GNU compilers to produce an executable from source code:
$ gcc mycode.c # C source file; executable a.out
$ gcc mycode.c -o myexe # C source file; executable myexe
$ g++ mycode.cpp -o myexe # C++ source file
$ gfortran mycode.f90 -o myexe # Fortran90 source file
$ gcc -fopenmp mycode.c -o myexe # OpenMP
Note that some compiler options are the same for both NVIDIA and GNU (e.g. -o), while others are different (e.g. -openmp vs -fopenmp). Many options are available in one compiler suite but not the other. See the online GNU documentation for information on optimization flags and other GNU compiler options.
Compiling and Linking
Building an executable requires two separate steps: (1) compiling (generating a binary object file associated with each source file); and (2) linking (combining those object files into a single executable file that also specifies the libraries that executable needs). The examples in the previous section accomplish these two steps in a single call to the compiler. When building more sophisticated applications or libraries, however, it is often necessary or helpful to accomplish these two steps separately.
Use the -c ("compile") flag to produce object files from source files:
$ nvc -c main.c calc.c results.c
Barring errors, this command will produce object files main.o, calc.o, and results.o. Syntax for the NVIDIA and GNU compilers is similar. You can now link the object files to produce an executable file:
$ nvc main.o calc.o results.o -o myexe
The compiler calls a linker utility (usually /bin/ld) to accomplish this task. Again, syntax for other compilers is similar.
Include and Library Paths
Software often depends on pre-compiled binaries called libraries. When this is true, compiling usually requires using the -I option to specify paths to so-called header or include files that define interfaces to the procedures and data in those libraries. Similarly, linking often requires using the -L option to specify paths to the libraries themselves. Typical compile and link lines might look like this:
$ nvc -c main.c -I${WORK}/mylib/inc -I${TACC_HDF5_INC} # compile
$ nvc main.o -o myexe -L${WORK}/mylib/lib -L${TACC_HDF5_LIB} -lmylib -lhdf5 # link
On Horizon, both the HDF5 and PHDF5 modules define the environment variables $TACC_HDF5_INC and $TACC_HDF5_LIB. Other module files define similar environment variables; see Using Modules to Manage Your Environment for more information.
The details of the linking process vary, and order sometimes matters. Much depends on the type of library: static (.a suffix; library's binary code becomes part of executable image at link time) versus dynamically-linked shared (.so suffix; library's binary code is not part of executable; it's located and loaded into memory at run time). However, the $LD_LIBRARY_PATH environment variable specifies the search path for dynamic libraries. For software installed at the system-level, TACC's modules generally modify the $LD_LIBRARY_PATH automatically. To see whether and how an executable named myexe resolves dependencies on dynamically linked libraries, execute ldd myexe.
MPI Programs
OpenMPI (module openmpi) and MVAPICH (module mvapich-plus) are the two MPI libraries available on Horizon. After loading an openmpi or mvapich-plus module, compile and/or link using an MPI wrapper (mpicc, mpicxx, mpif90) in place of the compiler:
$ mpicc mycode.c -o myexe # C source, full build
$ mpicc -c mycode.c # C source, compile without linking
$ mpicxx mycode.cpp -o myexe # C++ source, full build
$ mpif90 mycode.f90 -o myexe # Fortran source, full build
These wrappers call the compiler with the options, include paths, and libraries necessary to produce an MPI executable using the MPI module you're using. To see the effect of a given wrapper, call it with the -show option:
$ mpicc -show # Show compile line generated by call to mpicc; similarly for other wrappers
Building for Performance
Compiler Options
When building software on Horizon, we recommend using the most recent NVIDIA compiler and OpenMPI library available on Horizon. The most recent versions may be newer than the defaults. Execute module spider nvidia and module spider ompi to see what's installed. When loading these modules you may need to specify version numbers explicitly (e.g. module load nvidia/26.5 and module load ompi/5.0.10).
Architecture-Specific Flags
The Grace architecture is based on an Arm design that uses Neoverse V2 cores The Neoverse V2 core support Arm’s Scalable Vector Extension v2(SVE2) and Advanced SIMD(NEON) technologies. Each core has four 128-bit functional units that support 8 64-bit FMA operations. To compile for this specific architecture, include the -tp neoverse-v2 compile option.
Normally, we do not recommend using the -fast option. But, in this case, since there is only one chip architecture on Horizon, and -fast does not enforce -static, it is safe to use the -fast option with the NVIDIA compilers. It will enable optimizations for the Neoverse V2 architecture.
You can also use the environment variable $TACC_VEC_FLAGS. This environment variable sets the following flags:
-Mvect=simd -fast -Mipa=fast,inline
If you use GNU compilers, you can optimize for the Grace architecture using the -mcpu=neoverse-v2 option. You can also use TACC_VEC_FLAGS as with the NVIDIA compilers. It enables the following flags:
-O3 -mcpu-neoverse-v2
NVIDIA Performance Libraries (NVPL)
The NVIDIA Performance Libraries (NVPL) are a collection of high-performance mathematical libraries optimized for the NVIDIA Grace Armv9.0 architecture. These CPU-only libraries are for standard C and Fortran mathematical APIs allowing HPC applications to achieve maximum performance on the Grace platform. The collection includes:
NVIDIA Documentation
- NVPL BLAS Documentation
- NVPL FFT Documentation
- NVPL LAPACK Documentation
- NVPL RAND Documentation
- NVPL ScaLAPACK Documentation
- NVPL Sparse Documentation
- NVPL Tensor Documentation
Consult the above documents for the details of each library and its API for building and linking codes. The libraries work with both NVHPC and GCC compilers, as well as their corresponding MPI wrappers. All libraries support the OpenMP runtime libraries. Refer to individual libraries documentation for details and API extensions supporting nested parallelism.
Compiler Examples
Example: A compile/link process on Horizon may look like the following:
This links the code against the NVPL FFT library using the GNU g++ compiler.
The features in NVPL FFT are still evolving, please pay close attention and follow the latest NVPL FFT document.
$ module load nvpl
$ g++ mycode.cpp -I$TACC_NVPL_DIR}/include \
-L$TACC_NVPL_DIR}/lib \
-lnvpl_fftw \
-o myprogram
Example: This links the code against the NVPL OpenMP threaded BLAS, LAPACK, and SCALAPACK libraries of 32 bit integer interface using the NVHPC mpif90 wrapper. The cluster capability of BLAS from current NVPL release from NVHPC SDK-24.5 includes openmpi3,4,5 and mpich, choose the one that matches the MPI version in mpif90.
$ module load nvpl
$ mpif90 -mp -I$TACC_NVPL_DIR}/include \
-L${TACC_NVPL_DIR}/lib \
-lnvpl_blas_lp64_gomp \
-lnvpl_lapack_lp64_gomp \
-lnvpl_blacs_lp64_openmpi5 \
-lnvpl_scalapack_lp64 \
mycode.f90
When linking using NVHPC compiler, convenient flags -Mnvpl and -Mscalapack are provided. As the behavior of these flags may change during active development, please refer to the latest NVHPC compiler guide for more details.
Using NVPL as BLAS/LAPACK with Third-Party Software
When your third-party software requires BLAS or LAPACK, we recommend that you use NVPL to supply this functionality. Replace generic instructions that include link options like -lblas or -llapack with the NVPL approach described above. Generally there is no need to download and install alternatives like OpenBLAS. However, since the NVPL is a relatively new math library suite targeting the aarch64, its interoperability to other softwares with a special 32 or 64 bit integer interface, or OpenMP runting support are not fully tested yet. If you have issues with NVPL and alternative BLAS, LAPACK libraries are needed, the OpenBLAS based ones are available as a part of NVHPC compiler libraries.
Controlling Threading in NVPL
All NVPL libraries support the both GCC and NVHPC OpenMP runtime libraries. See individual libraries documentation for details and API extensions supporting nested parallelism. NVPL Libraries do not explicitly link any particular OpenMP runtime, they rely on runtime loading of the OpenMP library as determined by the application and environment. Applications linked to NVPL should always use at runtime the same OpenMP distribution the application was compiled with. Mixing OpenMP distributions from compile-time to runtime may result in anomalous performance. Please note that the default library linked with -Mnvpl flag is single threaded as of NVHPC 24.5, -mpflag is needed to linked with the threaded version.
NVIDIA HPC modules provide a libgomp.so symlink to libnvomp.so. This symlink will be on LD_LIBRARY_PATH if NVHPC environment modules are loaded. Use ldd to ensure that applications built with GCC do not accidentally load libgomp.sosymlink from HPC SDK due to LD_LIBRARY_PATH. Use libnvomp.soif if and only if the application was built with NVHPC compilers.
$OMP_NUM_THREADS defaults to 1 on TACC systems. If you use the default value you will get no thread-based parallelism from NVPL. Setting the environment variable $OMP_NUM_THREADS to control the number of threads for optimal performance.
Using NVPL with other MATLAB, PYTHON and R
TACC MATLAB, Python and R modules need BLAS and LAPACK and other math libraries for performance. How to use NVPL with them is under investigation. We will update.
Help Desk
Important
Submit a help desk ticket at any time via the TACC User Portal. Be sure to include "Horizon" in the Resource field.
TACC Consulting operates from 8am to 5pm CST, Monday through Friday, except for holidays. Help the consulting staff help you by following these best practices when submitting tickets.
-
Do your homework before submitting a help desk ticket. What does the user guide and other documentation say? Search the internet for key phrases in your error logs; that's probably what the consultants answering your ticket are going to do. What have you changed since the last time your job succeeded?
-
Describe your issue as precisely and completely as you can: what you did, what happened, verbatim error messages, other meaningful output.
Tip
When appropriate, include as much meta-information about your job and workflow as possible including:
- directory containing your build and/or job script
- all modules loaded
- relevant job IDs
- any recent changes in your workflow that could affect or explain the behavior you're observing.
-
Subscribe to Horizon User News. This is the best way to keep abreast of maintenance schedules, system outages, and other general interest items.
-
Have realistic expectations. Consultants can address system issues and answer questions about Horizon. But they can't teach parallel programming in a ticket, and may know nothing about the package you downloaded. They may offer general advice that will help you build, debug, optimize, or modify your code, but you shouldn't expect them to do these things for you.
-
Be patient. It may take a business day for a consultant to get back to you, especially if your issue is complex. It might take an exchange or two before you and the consultant are on the same page. If the admins disable your account, it's not punitive. When the file system is in danger of crashing, or a login node hangs, they don't have time to notify you before taking action.