A collection of basic HPC tests for validating MPI, OpenMP, and CPU performance in containerized environments.
# Build the Docker image
docker build -t hpc-tests .
# Run all tests
docker run --rm hpc-tests
# Run with custom thread/process counts
docker run --rm -e MPI_PROCS=2 -e OMP_THREADS=4 hpc-tests
| Test |
Description |
hello_mpi |
Basic MPI initialization and rank identification |
pingpong |
Point-to-point latency and bandwidth measurement |
reduce_test |
Collective operation performance |
| Test |
Description |
hello_omp |
Basic OpenMP thread spawning |
parallel_loop |
Parallel for loop performance |
reduction |
Reduction operation bandwidth |
| Test |
Description |
stream |
STREAM memory bandwidth (Copy, Scale, Add, Triad) |
dgemm |
Dense matrix multiplication (GFLOPS) |
pi_montecarlo |
Monte Carlo Pi estimation throughput |
# Install dependencies (Ubuntu)
sudo apt-get install build-essential openmpi-bin libopenmpi-dev libomp-dev
# Build
make all
# Run all tests
./run_all_tests.sh
# Or run individual tests
./bin/stream
mpirun -np 4 ./bin/hello_mpi
| Variable |
Default |
Description |
MPI_PROCS |
4 |
Number of MPI processes |
OMP_THREADS |
$(nproc) |
Number of OpenMP threads |
The image is based on ubuntu:24.04 and includes:
- GCC compiler suite
- OpenMPI
- OpenMP (libomp)
MIT