Sparta is a high-performance, element-wise sparse tensor contraction software on multicore CPU with heterogeneous memory. The sparse tensor contraction is critical to the overall performance of scientific applications, such as quantum chemistry and quantum physics. Sparta is implemented based on the open-sourced Hierarchical Parallel Tensor Infrastructure (HiParTI) library (https://gitlab.com/tensorworld/hiparti), which supports fast essential sparse tensor operations with matrices and vectors and tensor decompositions on multicore CPU and GPU architectures.
- GNU Compiler (GCC) (>=v7.5)
- CMake (>=v3.0)
- OpenBLAS
- NUMA
You may use the following steps to install the required libraries:
- OpenBLAS
git clone https://github.com/xianyi/OpenBLAS
cd OpenBLAS
make -j
mkdir path/to/OpenBLAS_install
make install PREFIX=path/to/OpenBLAS_install
- Append
export OpenBLAS_DIR=path/to/OpenBLAS_install
to~/.bashrc
- CMake
sudo apt-get install cmake
- NUMA
sudo apt-get install libnuma-dev
sudo apt-get install numactl
git clone https://gitlab.com/jiawenliu64/sparta
(Sparta)git clone https://gitlab.com/jiawenliu64/ial
(IAL)git clone https://gitlab.com/jiawenliu64/tensors
(Datasets)
cd sparta
&./build.sh
You can execute the commands, e.g., export SPARTA_DIR=path/to/sparta
, prior to the execution or append these commands to ~/.bashrc
.
SPARTA_DIR
(path/to/sparta, e.g., /home/ae/sparta)IAL_SRC
(path/to/IAL, e.g., /home/ae/ial/src)TENSOR_DIR
(path/to/tensors, /home/ae/tensors)
You can execute a command like "export EXPERIMENT_MODES=x" to set up the environment variable for different test purposes. (This step has been included in our scripts below, so you don't need to explicitly specify it.)
export EXPERIMENT_MODES=0
: COOY + SPAexport EXPERIMENT_MODES=1
: COOY + HtAexport EXPERIMENT_MODES=3
: HtY + HtAexport EXPERIMENT_MODES=4
: HtY + HtA on Optane
- On a general multicore CPU server with Linux:
./sparta/run/test_run.sh
- On a server with Intel Optane DC PMM:
./sparta/run_optane/test_run.sh
You can check the parameters options with path/to/sparta/build/ttt --help
Options: -X FIRST INPUT TENSOR
-Y FIRST INPUT TENSOR
-Z OUTPUT TENSOR (Optinal)
-m NUMBER OF CONTRACT MODES
-x CONTRACT MODES FOR TENSOR X (0-based)
-y CONTRACT MODES FOR TENSOR Y (0-based)
-t NTHREADS, --nt=NT (Optinal)
--help
- Jiawen Liu (Contact: jliu265@ucmerced.edu)
- Dong Li (Contact: dli35@ucmerced.edu)
- Jiajia Li (Contact: Jiajia.Li@pnnl.gov)