README.md
July 23, 2025 ยท View on GitHub
ForDot: A Fortran library that overloads the dot_product function to enable efficient dot product with/without coarray.
Usage
use fordot
a = dot_product(u,v,coarray,option,nblock)
-
coarrayis an optional logical variable. Set it to.true.and use the-DUSE_COARRAYflag to enable coarray. -
nblockis an optional integer variable. -
optionsis an optional character variable. Available options are'm1'to'm4', and the default option is'm2'. -
Note: Use the flag
-DUSE_DO_CONCURRENTto enable do concurrent.
Requirements
- A Fortran Compiler
- BLAS Library
- Fortran Package Manager (fpm)
fpm Dependency
If you want to use ForDot as a dependency in your own fpm project,
you can easily include it by adding the following line to your fpm.toml file:
[dependencies]
fordot = {git="https://github.com/gha3mi/fordot.git"}
Runing Tests
Execute the following commands to run tests with specific compilers:
fpm @<compiler>-test
compiler: ifx, ifort, gfortran, nvfortran
For coarray testing use:
fpm @<compiler>-test-coarray
compiler: ifx, ifort
All compiler options are accessible in the fpm response file fpm.rsp.
Benchmarks
You can find benchmark results on ForBenchmark.
API Documentation
The most up-to-date API documentation for the master branch is available
here.
To generate the API documentation for ForDot using
ford run the following
command:
ford README.md
Contributing
Contributions to ForDot are welcome!
If you find any issues or would like to suggest improvements, please open an issue.
Citation
If you use ForDot in your work, please cite it using the following DOI:
@software{ghasemi_2024_10594971,
author = {Ghasemi, Seyed Ali},
title = {gha3mi/fordot: v0.1.0},
month = jan,
year = 2024,
publisher = {Zenodo},
version = {v0.1.0},
doi = {10.5281/zenodo.10594971},
url = {https://doi.org/10.5281/zenodo.10594971}
}