DelphiMatrixBenchmark is the desktop client application used in the HPC-Delphi research project to run, validate, and compare matrix multiplication implementations across multiple execution models:
- sequential baseline
- shared-memory parallelism (PPL, OTL, OpenMP)
- vectorized/SIMD kernels (VectorSIMD, AVX2)
- optimized linear algebra backends (ALGLIB, LinAlg/CBLAS, mrMath, MKL)
- distributed-memory MPI variants (MPI configuration)
The application provides a GUI to select algorithms, set benchmark parameters, execute repeated runs, and visualize results in both tabular and chart form.
- Unified benchmark runner for heterogeneous implementations under a common interface (
IMultiplier). - Automatic result validation against a deterministic reference computation before accepting timings.
- Configurable workload: matrix dimensions (
M,K,N), worker threads (T), repetitions (S). - Comparative visualization in VCL UI (
TStringGrid+ TeeChart bar plots). - Two build configurations with explicit dependency boundaries:
Release: local/shared-memory algorithmsMPI: adds distributed algorithms and MPI runtime coordination
flowchart TD
subgraph MPI_Mode[Only in MPI configuration]
MPIINIT[DelphiMatrixBenchmark.dpr<br/>MPI_Init · rank split]
end
MPIINIT -->|rank 0| UI
MPIINIT -->|worker ranks| IMPL
UI[Form.pas<br/>VCL GUI] --> CFG[Benchmark/Config.pas<br/>M,K,N,T,S]
UI --> FAC[Matrix/Factory.pas<br/>Algorithm registry]
UI --> RUN[Benchmark/Runner.pas<br/>Execution loop]
FAC --> IMPL[Matrix/MultImpls.pas<br/>IMultiplier implementations]
RUN --> IMPL
RUN --> VAL[Benchmark/Validator.pas<br/>Correctness check]
RUN --> RES[Benchmark/Result.pas<br/>Total/Avg/Min/Max]
IMPL --> CORE1[Native Delphi<br/>Base / PPL / OTL / ASM]
IMPL --> CORE2[HPC-Delphi DLLs<br/>OffC / VectorSIMD / MKL]
IMPL --> CORE3[Third-party libs<br/>ALGLIB / LinAlg / mrMath / OptiVec]
RUN --> MPILIB[mpi_delphi + MSMPI<br/>(MPI config only)]
IMPL --> MPILIB
DelphiMatrixBenchmark/
│
├── Benchmark/
│ ├── Config.pas # Benchmark input parameters
│ ├── Result.pas # Benchmark output model
│ ├── Runner.pas # Execution orchestration
│ └── Validator.pas # Numerical correctness validation
│
├── Matrix/
│ ├── Factory.pas # Name -> IMultiplier factory
│ ├── Multiplier.pas # IMultiplier interface
│ ├── MultImpls.pas # Concrete algorithm implementations
│ └── Utils.pas # Matrix helpers
│
├── Form.pas / Form.dfm # GUI and interaction logic
├── DelphiMatrixBenchmark.dpr
├── DelphiMatrixBenchmark.dproj
├── CITATION.cff
├── LICENSE
└── README.md
The project is developed and validated in the following environment:
- Operating System: Windows 11 (64-bit)
- IDE: RAD Studio / Delphi 12.1
- Target platform:
Win64 - MPI runtime (MPI config only): Microsoft MPI (MSMPI)
This project uses two explicit dependency profiles (Release and MPI).
The key idea is:
Releaseincludes local/shared-memory algorithms and their extra third-party libraries.MPIincludes distributed algorithms and MPI stack, without requiring Release-only third-party libraries.
| Type | Component | Release | MPI | Why |
|---|---|---|---|---|
| Toolkit | RAD Studio / Delphi 12.1 (Win64) | ✅ | ✅ | Build system / IDE |
| Library (HPC-Delphi) | offc_delphi |
✅ | ✅ | Core + MPI hybrid (MPI+OffC-OMP+AVX2) |
| Library (HPC-Delphi) | vector_simd_delphi |
✅ | ✅ | Core + MPI hybrid (MPI+PPL+VectorSIMD) |
| Library (HPC-Delphi) | mkl_delphi |
✅ | ✅ | Core + MPI hybrid (MPI+OffC-MKL) |
| Library (HPC-Delphi) | mpi_delphi |
❌ | ✅ | Delphi bindings for MPI primitives |
| Library (third-party) | ALGLIB | ✅ | ❌ | Release-only implementations |
| Library (third-party) | Winsoft Linear Algebra (LinAlg) | ✅ | ❌ | Release-only implementations |
| Library (third-party) | mrMath / FastMath units | ✅ | ❌ | Release-only implementations |
| Library (third-party) | OptiVec | ✅ | ❌ | Release-only implementations |
| Library (third-party) | OmniThreadLibrary (OTL) | ✅ | ❌ | Release-only implementations |
| Library (UI) | TeeChart VCL | ✅ | ✅ | Result visualization |
| Toolkit | Intel oneAPI Base Toolkit | ✅ | ✅ | MKL/OpenMP environment |
| Runtime | MSMPI Runtime | ❌ | ✅ | Required to execute MPI binaries |
offc_delphivector_simd_delphimkl_delphimpi_delphi(MPI only)
- RAD Studio / Delphi 12.1 (Win64)
- Intel oneAPI Base Toolkit
- Microsoft MPI SDK (MPI only)
- Microsoft MPI Runtime (MPI only)
Configure search paths in:
Project -> Options -> Building -> Delphi Compiler -> Search path
path\to\offc_delphi\interface
path\to\vector_simd_delphi\interface
path\to\mkl_delphi\interface
path\to\alglib-delphi\wrapper
path\to\linalg\Delphi12-Win64
path\to\mrMath
path\to\OptiVec_for_Delphi\win64\Lib8
path\to\FastMath\FastMath
path\to\mpi_delphi\interface
Note: these profiles are intentionally separated so MPI builds do not require Release-only third-party libraries.
The project defines two Win64 configurations with exclusive algorithm sets.
- Compiler define:
RELEASE - Available implementations:
Base,OffC-BasePPL,OTL,OffC-OMPVectorSIMD,OffC-AVX2,ASMPPL+VectorSIMD,OffC-OMP+AVX2ALGLIB,LINALG,mrmath,OffC-MKL
- Requires Release-only third-party dependencies listed above.
- Compiler define:
MPI - Available implementations:
MPI+BaseMPI+PPL+VectorSIMDMPI+OffC-OMP+AVX2MPI+OffC-MKL
- Requires common dependencies listed above and
mpi_delphi+ MSMPI. - Runtime behavior (
DelphiMatrixBenchmark.dpr):- rank 0 hosts GUI and orchestrates runs
- worker ranks execute broadcasted MPI algorithms
To run the executable successfully, all required DLLs must be discoverable by Windows. Choose one of the following methods:
During active development, this avoids copying DLLs after every rebuild.
Add these directories to your Windows Path environment variable:
path\to\offc_delphi\buildpath\to\vector_simd_delphi\buildpath\to\mkl_delphi\buildpath\to\alglib-delphi\wrapper(Release only)path\to\mpi_delphi\build(MPI only)
Copy required DLLs into the selected build output directory:
Win64\Release\Win64\MPI\
At minimum:
offc_delphi.dllvector_simd_delphi.dllmkl_delphi.dllalglib405_64hpc.dll(Release only)mpi_delphi.dll(MPI only)- MSMPI runtime available in system
PATH(e.g.,msmpi.dll) (MPI only)
- Open
DelphiMatrixBenchmark.dprojin RAD Studio. - Set Target Platform to
Win64. - Select Build Configuration =
Release. - Verify common +
Release-only search paths listed above. - Ensure required runtime DLLs are discoverable using one of these options:
- add their directories to system
Path(development), or - copy them into
Win64\Release\(distribution).
- add their directories to system
- Confirm at least:
offc_delphi.dll,vector_simd_delphi.dll,mkl_delphi.dll,alglib405_64hpc.dll. - Build project: Project -> Build DelphiMatrixBenchmark.
- Select Build Configuration =
MPI. - Confirm
mpi_delphi\interfaceis present in search path. - Ensure MSMPI runtime is installed.
- Ensure required DLLs are discoverable using one of these options:
- add their directories to system
Path(including MSMPI runtime), or - copy all required DLLs to
Win64\MPI\.
- add their directories to system
- Confirm at least:
mpi_delphi.dll- MSMPI runtime available in
PATH(e.g.,msmpi.dll) offc_delphi.dllforMPI+OffC-OMP+AVX2vector_simd_delphi.dllforMPI+PPL+VectorSIMDmkl_delphi.dllforMPI+OffC-MKL
- Build project.
Run using mpiexec (example with 4 ranks):
mpiexec -n 4 Win64\MPI\DelphiMatrixBenchmark.exe- Launch the executable (
ReleaseorMPIbuild output). - Configure benchmark parameters:
M,K,N(matrix dimensions)T(thread count for relevant algorithms)S(number of repetitions)
- Select one or more algorithm implementations.
- Execute benchmark.
- Review:
- tabular metrics:
Total,Avg,Min,Max - comparative bar chart
- tabular metrics:
The runner validates numerical correctness before accepting timing results.
Some third-party dependencies used in this project may not be permanently available to all users:
- some were used under trial/evaluation licenses for the paper,
- some are open source,
- some are free-to-use but not open source.
Because of this, certain compute/linear-algebra implementations may be unavailable in other environments.
If one or more compute/linear-algebra dependencies are missing, the project can still be compiled by disabling those implementations.
Edit Matrix/Factory.pas:
- remove the corresponding name(s) from
TFactory.GetAvailable - remove the corresponding
else if Name = '...' then Result := ...branch(es) fromTFactory.CreateByName
Edit Matrix/MultImpls.pas:
- remove unavailable unit(s) from the
usesclause - remove or comment class declarations and implementations tied to those unit(s)
Dependency -> code mapping
-
ALGLIB
- Unit:
XALGLIB - Class:
TALGLIB - Factory name:
'ALGLIB'
- Unit:
-
Winsoft Linear Algebra
- Unit:
LinAlg - Class:
TLinearAlgebra - Factory name:
'LINALG'
- Unit:
-
OptiVec
- Units:
vecLib,VDstd,VDmath - Class:
TOptiVecVectorLib - Factory name:
'OptiVec-VectorLib'
- Units:
-
mrMath / FastMath-dependent paths
- Units:
FMAMatrixMultOperationsx64,FMAMatrixMultTransposedOperationsx64 - Classes:
Tmrmath,TASM - Factory names:
'mrmath','ASM'
- Units:
-
OmniThreadLibrary (OTL)
- Unit:
OTLParallel - Class:
TOTL - Factory name:
'OTL'
- Unit:
If you use this software in your research, please cite it using the metadata provided in CITATION.cff.
This project is licensed under the MIT License. See LICENSE for details.