Code Monkey home page Code Monkey logo

conv-it's Introduction

conv-it

Introduction

conv-it is a C++/C++11 program for computing iterative convolution of integer matrices.

I wrote it from scratch as an assignment for the Algorithms and Parallel Computing course I attended at Politecnico di Milano. Its purpose was to apply different parallelization methods to the same program. That's why there are five different versions and their respective executable files:

  1. conv_it_st: single-threaded program
  2. conv_it_omp: parallelism is achieved via OpenMP
  3. conv_it_mpi: MPI is used to distribute workload among processors
  4. conv_it_hybrid: enhanced by both OpenMP and MPI
  5. conv_it_cuda: runs on CUDA-capable GPUs

Instructions

Before compiling

Make sure you've installed g++(supporting -std=c++11), make, OpenMP, MPI and CUDA (where available).

Compiling

Once you have downloaded a copy of the repository run

make compile

This will create all five executables mentioned above. If you're interested in only one of them, select the appropriate target e.g.

make conv_it_cuda

Testing

To launch an automated test, type

make test

You can change the settings of the test (such as version, number of threads/processes) by modifying directly the file runAll.sh.

Passing arguments

In order to run properly, every conv_it executable needs the following arguments:

  1. no. of iterations
  2. no. of rows in the input matrix
  3. no. of columns in the input matrix
  4. no. of rows in the kernel
  5. no. of columns in the kernel
  6. name of the file containing the input matrix
  7. name of the file containing the kernel
  8. name of the output file

All files must contain space-separated integer values representing the entries of the matrix.

OpenMP needs you to set the OMP_NUM_THREADS variable.

MPI is enabled by launching the executable with

mpirun -np P executable argument1 argument2 ...

where P is the number of processes.


Tested on Ubuntu 16.04 LTS with gcc 5.4.0, GNU Make 4.1, OpenMPI 1.10.2, CUDA 9.2

Copyright © 2018 Francesco Primon.

conv-it's People

Contributors

fprimon avatar

Watchers

 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.