MPI and Spack for HPC (Ubuntu 22.04)
Launch
at CHI@TACC
Launch
at CHI@UC
Launch
at KVM@TACC
Description
This appliance is built on top of Ubuntu 22.04 and comes preconfigured with Spack for flexible software management, along with Lmod (Lua Modules). Both MPICH and OpenMPI are installed and can be easily managed using module commands. You can use the module load
and module unload
commands to manage software packages for your HPC work.
To load MPICH, run:
module load mpich
You can confirm that the module is loaded by checking the list of currently loaded modules:
module list
You can now run MPI programs using MPICH. Here's a simple example program to compute the value of pi using numerical integration:
wget https://raw.githubusercontent.com/pmodels/mpich/master/examples/cpi.c
mpicc -o cpi cpi.c
mpiexec -n 4 ./cpi
Output should look something like:
Process 0 of 4 is on mpich.novalocal
Process 1 of 4 is on mpich.novalocal
Process 2 of 4 is on mpich.novalocal
Process 3 of 4 is on mpich.novalocal
pi is approximately 3.1415926544231239, Error is 0.0000000008333307
wall clock time = 0.000059
If you want to install a new package using Spack, use the following command:
spack install <package-name>
Keywords
MPI MPICH SpackImage IDs
CHI@TACC: | 542ce0d8-0c58-4594-8397-46d36d00daf2 |
CHI@UC: | 670e4420-eb9d-42b6-93c2-fec12bc14520 |
KVM@TACC: | 58dd4dd9-c074-4145-b171-9affba253d64 |
Author
Name: | Rohan Babbar |
Contact: | rohanbabbar0408@gmail.com |
Support
Name: | Rohan Babbar |
Contact: | rohanbabbar0408@gmail.com |
Version: | 1.0.0 |
Created By: | rohanbabbar0408@gmail.com on June 17, 2025, 1:04 a.m. |
Updated By: | rohanbabbar0408@gmail.com on July 22, 2025, 8:32 a.m. |