Skip to content

rzimmerdev/hpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

distributed-matrix

A point-wise matrix distances calculator, implemented in C/MP+MPI using distributed memory and parallel processing paradigms.

Index:

  1. Installation
  2. Usage
  3. Details

Installation

Implementation used: OpenMPI

$ sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev
$ sudo yum install openmpi openmpi-devel
$ export PATH=$PATH:/usr/lib/openmpi/bin
$ sudo dnf install openmpi openmpi-devel
$ source /etc/profile.d/modules.sh
$ module load mpi/openmpi-x86_64
$ brew install open-mpi

Download the wizard and install from the official Microsoft-MPI page, and add to the PATH environment variable if needed.

Usage

To test if the installation was successful, run:

$ make test # If successful, the output should be similar to:
MPI version: 3.1
OpenMP version (from macro _OPENMP): 201511

To compile and link all source code, and header files use:

$ make all

To run the main source file, use (where are arguments accepted by mpirun):

$ make run <N> <S> <T> [P=10]

Example:

$ make run N=100 S=42 T=4 
Distância Manhattan mínima: 0 (soma min: 57015) e máxima: 287 (soma max: 2130946)
Distância Euclidiana mínima: 0.00 (soma min: 39607.81) e máxima: 165.71 (soma max: 1250695.85)

Details

The Makefile also has a timing utility, which can be used to measure the execution time of the program. To use it, run:

$ make time <N> <S> <T> [P=10]

Example:

$ make time P=2 N=150 S=42 T=10
Calculating average time over 5 runs...
Average time: 5.778 seconds

About

Distributed C/OpenMP+MPI project for 3D matrix operations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •