GithubHelp home page GithubHelp logo

jangmys / benchparallelmeta Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 3.7 MB

A comparative study of high-productivity high-performance programming languages for parallel metaheuristics

Makefile 0.95% C++ 34.40% Julia 15.30% Shell 3.84% Python 23.60% C 7.78% Chapel 14.12%
julia-language chapel-language numba cpp

benchparallelmeta's Introduction

BenchParallelMeta

This repository contains the source code for the comparative study presented in the paper

Jan Gmys, Tiago Carneiro, Nouredine Melab, El-Ghazali Talbi, Daniel Tuyttens, A comparative study of high-productivity high-performance programming languages for parallel metaheuristics, Swarm and Evolutionary Computation

=================

Content

Parallel implementations in C++/OpenMP, Julia, Python-Numba and Chapel:

  1. For the 3-dimensional Quadratic Assignment Problem (Q3AP)

    • Q3AP-ILS: Iterated Local Search (ILS) metaheuristic using multi-threaded parallel neighborhood evaluations.
    • Q3AP-GA: Genetic Algorithm, hybridized with Parallel Local Search.
  2. ParallelBatchEval: A micro-benchmark evaluating the performance of parallel batch evaluation of solutions for different batchsizes and different cost functions:

    • Permutation Flowshop Scheduling Problem (PFSP)
    • Quadratic Assignment Problem (QAP)
    • Traveling Salesman Problem (TSP)
    • Q3AP

=================

How to run

ILS

Python

  • no numba, instance nug12-d, 10 ILS iterations
    • python3 ./ilsQ3AP_numpy.py nug12 10
  • no numba + multiprocessing
    • python3 ./ilsQ3AP_numpy_par.py nug12 10
  • with numba
    • sequential: python3 ./ilsQ3AP_numba_seq.py nug12 100
    • parallel: python3 ./ilsQ3AP_numba_seq.py nug12 100

To set the number of threads in the parallel numba version

  • ex.: export NUMBA_NUM_THREADS=4
  • OpenMP environment variables should be unset as they may interfere

Julia

  • sequential (nug12-d, 100 iterations)

    • julia ./ils_q3ap_seq.jl nug12 100
  • parallel (8 threads)

    • export JULIA_NUM_THREADS=8
    • julia ./ils_q3ap_par.jl nug12 100

C

  • compile:
    • make
  • run with 8 threads (nug12-d, 100 iterations)
    • OMP_NUM_THREADS=8 ./ils nug12 100

ParallelBatchEval

Python

3 arguments required: problem | instance| batchsize

Examples:

  • python3 ./bench.py TSP berlin52 1000
  • python3 ./bench.py FSP ta020 10000
  • python3 ./bench.py QAP nug15 100
  • python3 ./bench.py Q3AP nug12 1000

Julia

3 arguments required: problem | instance| batchsize

Examples:

  • julia ./bench.jl TSP berlin52 1000

C

  • make
  • ./bench -z p=fsp,i=ta120 -b 1000
  • ./bench --help gives some help

benchparallelmeta's People

Contributors

jangmys avatar

Stargazers

 avatar  avatar  avatar  avatar  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.