SwiftMPI

A Pure Swift Implementation of the Message Passing Interface

Documentation & Papers

📄 Research Paper

Complete technical paper describing the architecture, implementation details, performance characteristics, and use cases of SwiftMPI.

View PDF

📊 Presentation

Beamer presentation with overview, architecture, features, usage examples, performance benchmarks, and future roadmap.

View PDF

📚 API Reference

Complete API reference manual with function documentation, usage examples, and complete working examples for all SwiftMPI operations.

View PDF

Key Metrics

100%
Pure Swift
<1ms
Small Message Latency
0
External Dependencies
MPI
Standard Compatible

Performance Benchmarks

Comparison with MPICH

SwiftMPI demonstrates competitive performance compared to the industry-standard MPICH implementation. The following table shows key performance metrics and characteristics.

Metric SwiftMPI MPICH Notes
Implementation Language Pure Swift C/C++ Type-safe
Small Message Latency (1-100 ints) 0.1-1ms 0.05-0.8ms Comparable
Medium Message Throughput (1K-10K ints) Linear scaling Linear scaling Excellent
Large Message Bandwidth (100K+ ints) Good utilization Optimal utilization Good
External Dependencies None (Foundation + Network) System libraries Zero deps
Platform Support macOS, iOS, tvOS, watchOS Linux, macOS, Windows Apple ecosystem
Type Safety Compile-time checked Runtime checked Advantage
Memory Safety Swift ARC Manual management Automatic
Collective Operations Full support Full support Complete
Non-blocking Operations Async/await ready Traditional async Modern

Key Advantages

  • Type Safety: Full compile-time type checking with Swift's type system
  • No External Dependencies: Pure Swift implementation using only Foundation and Network frameworks
  • Modern Language Features: Leverages Swift's concurrency, error handling, and memory safety
  • Cross-Platform: Works on macOS, iOS, tvOS, and watchOS
  • Performance: Competitive latency and throughput for most use cases

Source Code

The complete SwiftMPI implementation is available on GitHub. Explore the code, contribute, or use it in your projects.

View on GitHub

Acknowledgments

We gratefully acknowledge the support and resources provided by

Argonne National Laboratory

Special thanks for the inspiration and reference implementation from the MPICH project.