Giter Site home page Giter Site logo

shi27feng / binaryspgemm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pavlidic/binary-spgemm

0.0 0.0 0.0 1.15 MB

An MPI+OpenMP hybrid implementation of Gustavson's Sparse Matrix Multiplication for Boolean CSR matrices

C 91.81% MATLAB 7.74% Makefile 0.45%

binaryspgemm's Introduction

Binary-SpGEMM

An MPI+OpenMP hybrid implementation of Gustavson's Sparse Matrix Multiplication for Boolean CSR matrices

Only final/ and Matlab/ are intended for use, old/ has some old code that is there for archiving purposes.

Compilation

Go to final/ and do make

Usage

For performance testing the algorithm:

mpirun/srun -n number_of_tasks SpGEMM_mpi_omp path_to_matrix block_size number_of_threads times_to_run

number_of_tasks*path_to_matrix*block_size needs to equal the input's size n.

It can easily be extended to support matrices of any size by adding one row of the remaining workload to each thread but that was out of the scope of this assignment.

It prints in order:

tasks, threads, total_cpus/threads, blocksize, matrix path, input size n, input nnz, output nnz, mean time, median time, fastest time

Validity

For testing the validity of the algorithm, use Matlab/test_SpGEMM(n,d) where n is the size of the n*n random input sparse matrix and d is aproximately the non zero elements per row that the matrix will have.

For testing the validity of the Hybrid MPI+OpenMP implementation, do make test in final/. It will run both the Hybrid and serial code on a test matrix in Matlab/ and print either a confirm message if it they produce the same matrix or an error message otherwise.

old/ has the code of the serial implementation + previous implementations that used blocking but were much slower.

binaryspgemm's People

Contributors

pavlidic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.