CUDAMPILIB is a CPU+GPU cluster runtime for running OpenMP/CUDA-style programs across multiple MPI nodes. Rank 0 runs the application manager, while remote MPI processes act as GPU workers. The runtime supports CUDA streams, CPU execution, dynamic batch sizing, and power-aware execution.
- Linux
- MPI compiler/runtime (
mpicc,mpirun) - OpenMP
- CUDA and NVML
- cuDNN for the CNN example (Optional)
- Intel MKL for the RNN example (Optional)
c-cmaessources for the CMA-ES power-capping optimizer (Optional)
The build script currently expects CUDA under /usr/local/cuda-13.0 and looks
for c-cmaes/src either next to cudampilib or in the repository root.
Build from the library directory:
cd cudampilib
./compileCompiled application and worker binaries are written to cudampilib/build.
The main launcher is cudampilib/run_scripts/run-app:
cd cudampilib
./run_scripts/run-app <app> <mode> <nodes-or-node-list> [app options]Modes:
B: use the first N machines fromhostfileC: use selected hostfile line numbers, followed byAH: print launcher help
Example using the first 8 machines from hostfile:
./run_scripts/run-app cnn B 8 --cpu-enabled=1 --number-of-streams=2 --batch-size=100 --cpu-power-scaling=0 --initial-cpu-batch-size-scaling=0Example using selected machines:
./run_scripts/run-app vecadd C 1 2 4 A --cpu-enabled=1 --number-of-streams=2 --batch-size=100Available application names include vecadd, vecmaxdiv, collatz,
patternsearch, twinprime, rnn, cnn, and montecarlo.
Before running on a cluster, update cudampilib/hostfile for your machines.
Power capping is configured with cudampilib/powercap.conf. The strategy key
selects the policy, and global_powercap sets a total wattage budget for the
global-budget strategies.
See doc/POWER_CAPPING_STRATEGIES.md for the full strategy documentation and configuration examples.
Power-cap writes usually require permission to set NVML GPU limits and write CPU RAPL sysfs files.
cudampilib/: runtime, build script, launch scripts, and examplespython_scripts/: experiment and analysis utilitiesdoc/: project notes and power-capping strategy documentation
MIT License. See cudampilib/LICENSE.