For the complete documentation index, see llms.txt. This page is also available as Markdown.

Alamo on HPC

This page provides reference information for compiling and running Alamo on high-performance computing (HPC) clusters.

These instructions are for reference only and may not always work. The Alamo developers do not manage the software on these clusters, and configurations may change over time. If you encounter outdated instructions, open an issue on GitHub.

Reference Scripts for Nova

For more information on Nova or HPC in general, Iowa State University provides an online HPC guide.

The following environment modules are required to complete the listed tasks.

Task
Required Module(s)

Configuring with gcc

openmpi gcc

Configuring with clang

openmpi llvm

Compiling with gcc

openmpi gcc

Compiling with clang

openmpi llvm

Running Alamo

openmpi gcc

Saving data in h5 format (recommended)

hdf5

The scripts below automatically handle module management.

The configuration and compilation scripts below can be run line-by-line or in a Bash script. If you use a script, make the file executable:

chmod +x /path/to/file

As of April 2025, the git installation on Nova is quite old and can occasionally cause fatal errors when configuring. If you get an error about SSL when the configure script tries to check out AMReX, load the git module with module load git.

GCC Configure and Compile Script

#!/usr/bin/env bash
module purge
module load openmpi gcc
​module load hdf5/1.14.6-openmpi4-2sb6n2k
./configure --get-eigen --comp=g++ --hdf5 --hdf5-prefix /opt/rit/el9/20240815/app/linux-rhel9-x86_64_v3/gcc-11.4.1/hdf5-1.14.6-2sb6n2kw36egzn3nsgv5uw4wv4c3pgkd
srun --nodes=1 --cpus-per-task=16 --mem-per-cpu=1G --time=10:00 make -j16

As of July 28, 2026 compiling with clang does not work on nova, must compile with g++

Alamo Simulation Slurm Job Script

The script starts a parallel job on Nova. Modify these parameters as needed:

  • --time: the wall clock time limit, or maximum job duration

  • --nodes: number of nodes requested

  • --ntasks-per-node: number of tasks per node

  • --cpus-per-task: number of cores per task

  • --mem-per-cpu: memory allocated per core, in MB

  • --job-name: job name displayed by squeue

  • --output: log filename; see the Slurm documentation for filename pattern specifications

  • --mail-user: email for notifications; remove this if not needed

  • Executable path: for example, ./bin/alamo-2d-clang++

  • Input file path: the input file for Alamo

Iowa State University provides a Slurm job script generator for Nova, which can help generate job scripts.

Nova uses a fair-share scheduling system to prioritize job execution based on requested resources and past usage. To reduce wait times, request only necessary resources and set reasonable time limits.

Slurm automatically determines the number of cores based on the --nodes and --ntasks-per-node values. Refer to the Nova hardware guide for appropriate values.

Once modifications are made, submit the job with sbatch:

Managing Dependencies on an HPC Cluster

Compiling and running Alamo on an HPC cluster differs slightly from doing so on a local machine, primarily because of dependency management. HPC clusters often provide multiple versions of software dependencies for users. To manage these dependencies efficiently, HPC clusters commonly use Environment Modules, or modules, which help users load and unload software as needed. Most HPC clusters provide the required modules for compiling Alamo.

To load an environment module:

To unload an environment module:

To unload all modules:

While Environment Modules are widely used, another tool called Spack was specifically developed for dependency management in shared computing environments. You may encounter either system while working on an HPC cluster. The instructions on this page assume Environment Modules.

Configuring Alamo on an HPC Cluster

Configuring Alamo on an HPC cluster is similar to configuring it on a local machine. However, you must ensure that a compiler, clang, and Python 3 are available via modules or other means. Additionally, Alamo relies on the Eigen library, which can either be loaded as a module or installed during configuration with the --get-eigen flag:

Using --get-eigen is preferred.

Compiling Alamo on an HPC Cluster

Compiling code can be resource-intensive and time-consuming. Running large, multithreaded operations on the login node of an HPC cluster is generally discouraged. To avoid this, compile within an interactive job or by submitting a batch job.

If the cluster uses the Slurm Workload Manager, an interactive job can be started with salloc:

This command requests a single node with 16 cores and 16 GB of memory for 10 minutes. Once the resources are allocated, your shell will reload, and you can compile with:

Replace 16 with the number of cores requested.

Alternatively, if interactivity is not required, submit a non-interactive compilation job using srun:

Adjust resource requests as needed. To reduce wait times, specify a shorter duration using the --time flag.

Running Alamo on an HPC Cluster

To verify that a simulation starts correctly, an interactive job may suffice. For full simulations, submit a batch job to the cluster's workload manager. For Slurm-based clusters, use sbatch to submit a job script:

The sections above include example job scripts that can be modified to suit your needs.

Last updated

Was this helpful?