An open API service indexing awesome lists of open source software.

https://github.com/thodkatz/sparse-bmm

A hydrib parallel implementation of sparse boolean matrix multiplication using OpenMP and OpenMPI
https://github.com/thodkatz/sparse-bmm

mpi openmp openmpi parallel

Last synced: about 1 month ago
JSON representation

A hydrib parallel implementation of sparse boolean matrix multiplication using OpenMP and OpenMPI

Awesome Lists containing this project

README

        

# Parallel Sparse Boolean Matrix Multiplication

Boolean Matrix Multiplication, using a custom blocked data structure similar to the CSR/CSC, is implemented for three different parallel configurations: 1) OpenMP, 2) OpenMPI and 3) OpenMP/OpenMPI. More about the project can be found at this [report](https://github.com/thodkatz/sparse-bmm/blob/master/report/report.pdf).

## Serial

```shell
make serial
./bin/serial matrices/A.mtx matrices/B.mtx matrices/F.mtx
```

## OpenMP

```shell
make openmp
export OMP_NUM_THREADS=
./bin/openmp matrices/A.mtx matrices/B.mtx matrices/F.mtx
```

## OpenMPI

```shell
make openmpi
mpirun -n ./bin/openmpi matrices/A.mtx matrices/B.mtx matrices/F.mtx
```

## Hybrid OpenMP/OpenMPI

```shell
make hybrid
export OMP_NUM_THREADS=
mpirun -n ./bin/openmpi matrices/A.mtx matrices/B.mtx matrices/F.mtx
```

## Input
To create random matrices:
```shell
mkdir matrices
cd test/

# edit the python file to choose the dimensions of the arrays
python mtxCreate.mtx
```

## Validation

After successfully executing one of the available versions, for validation run:

```shell
cd test/
python spgemm.py
```