ntpoly
A massively parallel library for computing the functions of sparse matrices.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 6 committers (16.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.3%) to scientific vocabulary
Keywords
Repository
A massively parallel library for computing the functions of sparse matrices.
Basic Info
- Host: GitHub
- Owner: william-dawson
- License: mit
- Language: Fortran
- Default Branch: master
- Homepage: https://william-dawson.github.io/NTPoly/
- Size: 15.6 MB
Statistics
- Stars: 22
- Watchers: 4
- Forks: 10
- Open Issues: 6
- Releases: 29
Topics
Metadata Files
ReadMe.md
Project Overview
NTPoly is a massively parallel library for computing the functions of sparse, Hermitian matrices based on polynomial expansions. For sufficiently sparse matrices, most of the matrix functions in NTPoly can be computed in linear time.
Set Up Guide
NTPoly is freely available and open source under the MIT license. It can be downloaded from the Github repository. We of course recommend that you download a release version to get started.
Installing NTPoly requires the following software:
- A Fortran Compiler.
- An MPI Installation (MPI-3 Standard+).
- CMake (Version 3.2+).
- BLAS: for multiplying dense matrices, if they emerge in the calculation.
- LAPACK: for dense solvers.
The following optional software can greatly enhance the NTPoly experience:
- A C++ Compiler for building C++ bindings.
- Ford: for building documentation.
- Doxygen: for building C++ documentation.
- SWIG (Version 3.0+): for building the Python bindings.
- Python (Version 2.7+): if you would like python bindings.
- MPI4PY: for testing.
- SciPy: for testing.
- NumPy: for testing.
- EigenExa: for dense, parallel calculations.
NTPoly uses CMake as a build system. First, take a look in the Targets
directory. You'll find a list of .cmake files which have example
configurations on popular systems. You should copy one of these files, and
create your own mymachine.cmake file. Then, cd into the Build directory, and
type:
cmake -DCMAKETOOLCHAINFILE=../Targets/mymachine.cmake ..
After that you can build using:
make
And for the documentation:
make doc
If you aren't cross compiling and have built the python bindings, you can perform local tests using:
make test
There are a few options you can pass to CMake to modify the build. A few
useful standard options are:
* -DCMAKE_BUILD_TYPE= Debug or Release.
* -DCMAKE_INSTALL_PREFIX= followed by the path to your desired install
directory.
There are also some custom options special for NTPoly:
* -DFORTRAN_ONLY= set to Yes if you only want to build the Fortran bindings.
* -DNOSWIG= set to Yes if you don't want to build Python bindings.
* -DUSE_MPIH= on some systems, there is no use mpi feature for Fortran,
just #include "mpi.h". You can set this option to activate the later.
* -DNOIALLGATHER= on older MPI implementations, there is no non blocking
collective operations. You can disable this feature using this option, but
beware this might reduce performance.
Online documentation is also available. Further details about the library can be found on the Wiki.
Basic Theory
The theory of matrix functions is a long studied branch of matrix algebra. Matrix functions have a wide range of applications, including graph problems, differential equations, and materials science. Common examples of matrix functions include the matrix exponential:
f(A) = e^A.
from the study of networks, or the inverse square root:
f(A) = A^(-1/2)
from quantum chemistry. NTPoly is a massively parallel library that can be used to compute a variety of matrix using polynomial expansions. Consider for example the Taylor series expansion of a function f(x) .
f(x) = f(0) + f'(0)x + f''(0)x^2/2! + ...
We can imagine expanding this from the function of a single variable, to a function of a matrix:
f(A) = f(0) + f'(0)A + f''(0)A^2/2! + ...
where matrices can be summed using matrix addition, and raised to a power using matrix multiplication. At the heart of NTPoly are polynomial expansions like this. We implement not only Taylor expansions, but also Chebyshev polynomial expansions, and other specialized expansions based on the function of interest.
When the input matrix A and the output matrix f(A) are sparse, we can replace the dense matrix addition and multiplication routines with sparse matrix routines. This allows us to use NTPoly to efficiently compute many functions of sparse matrices.
Getting Start With Examples
In the examples directory, there are a number of different example programs that use NTPoly. You can check the ReadMe.md file in each example directory to learn how to build and run each example. The simplest example is PremadeMatrix, which includes sample output you can compare to.
Feature Outline
The following features and methods have been implemented in NTPoly:
- General Polynomials
- Standard Polynomials
- Chebyshev Polynomials
- Hermite Polynomials
- Transcendental Functions
- Trigonometric Functions
- Exponential and Logarithm
- Matrix Roots
- Square Root and Inverse Square Root
- Matrix p th Root
- Quantum Chemistry
- Density Matrix Purification
- Chemical Potential Calculation
- Geometry Optimization
- Other
- Matrix Inverse/Moore-Penrose Pseudo Inverse
- Sign Function/Polar Decomposition
- Interface to Dense Eigen/Singular Value Decomposition
- Load Balancing Matrices
- File I/O
Citation
A description of the techniques used in NTPoly can be found in the following Computer Physics Communications paper:
Dawson, William, and Takahito Nakajima. "Massively parallel sparse matrix function calculations with NTPoly." Computer Physics Communications (2017).
Please cite this paper in accordance to the practices in your field.
How To Contribute
To begin contributing to NTPoly, take a look at the Wiki pages. The Contributing Guide provides an overview of best development practices. Additionally, there is a Adding New Functionality page which documents how one would go about adding a matrix function to NTPoly.
Owner
- Login: william-dawson
- Kind: user
- Website: https://william-dawson.github.io/
- Repositories: 4
- Profile: https://github.com/william-dawson
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Dawson"
given-names: "William"
orcid: "https://orcid.org/0000-0003-4480-8565"
- family-names: "Nakajima"
given-names: "Takahito"
title: "NTPoly"
version: 2.6.0
doi: 10.1016/j.cpc.2017.12.010
date-released: 2017-12-11
url: "https://github.com/william-dawson/NTPoly"
preferred-citation:
type: article
authors:
- family-names: "Dawson"
given-names: "William"
orcid: "https://orcid.org/0000-0003-4480-8565"
- family-names: "Nakajima"
given-names: "Takahito"
doi: "10.1016/j.cpc.2017.12.010"
journal: "Computer Physics Communications"
month: 12
start: 154 # First page number
end: 165 # Last page number
title: "Massively parallel sparse matrix function calculations with NTPoly"
volume: 225
year: 2018
GitHub Events
Total
- Issues event: 1
- Watch event: 2
- Delete event: 2
- Issue comment event: 1
- Push event: 6
- Pull request event: 3
- Create event: 1
Last Year
- Issues event: 1
- Watch event: 2
- Delete event: 2
- Issue comment event: 1
- Push event: 6
- Pull request event: 3
- Create event: 1
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| William Dawson | w****n@r****p | 495 |
| william-dawson | w****n@g****m | 88 |
| William Dawson | d****n@f****p | 27 |
| Victor Yu | w****9@d****u | 10 |
| William Dawson | d****n@f****p | 10 |
| Kokookster | 6****r@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 2 years ago
All Time
- Total issues: 18
- Total pull requests: 97
- Average time to close issues: 4 months
- Average time to close pull requests: 5 days
- Total issue authors: 5
- Total pull request authors: 3
- Average comments per issue: 1.78
- Average comments per pull request: 0.11
- Merged pull requests: 92
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 5
- Pull requests: 25
- Average time to close issues: 25 days
- Average time to close pull requests: 12 days
- Issue authors: 3
- Pull request authors: 1
- Average comments per issue: 1.8
- Average comments per pull request: 0.16
- Merged pull requests: 24
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- william-dawson (14)
- barracuda156 (2)
- Kokookster (1)
- maxwell-gisborne (1)
- thierry-FreeBSD (1)
- yaoyi92 (1)
- jsboer (1)
- awvwgk (1)
- viperML (1)
Pull Request Authors
- william-dawson (100)
- vyu16 (3)
- Kokookster (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 2
- Total dependent repositories: 0
- Total versions: 2
conda-forge.org: ntpoly
- Homepage: https://william-dawson.github.io/NTPoly/
- License: MIT
-
Latest release: 2.7.1
published almost 4 years ago
Rankings
Dependencies
- actions/checkout v1 composite
- actions/upload-artifact v1 composite
- conda-incubator/setup-miniconda v2 composite
- doxygen
- pip
- pyyaml
- scipy
- swig