Git Product home page Git Product logo

ruoyugao / scikit-opt-gpu Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 1004 KB

We implemented our own sequential version of GA, PSO, SA and ACA using C++ (some using Eigen3 as matrix operation backend) and the parallelized version with CUDA support. All of them are much faster than the popular lib scikit-opt.

License: MIT License

CMake 3.25% C++ 65.25% Cuda 28.92% Shell 0.02% Python 2.57%
ant-colony-optimization cuda-support genetic-algorithm simulated-annealing particle-swam-optimization

scikit-opt-gpu's Introduction

License Platform GitHub version Cuda version Cmake version gcc version py version

loc commit visitors lang

Links

test_file(ACA) โ†’ link

Our report(Fixed some typo mistakes) โ†’ link

Usage

  1. Load gcc 9.2 and git 2.6 from CIMS cluster
module load gcc-9.2
module load git-2.6.3
module load cmake-3
module load cuda-11.4

If you want to test the python version of this lib, please refer to the url above and do

module load python-3.7
pip install scikit-opt
  1. Clone this repo and build it
git clone https://github.com/ruoyuGao/scikit-opt-gpu.git
cd scikit-opt-gpu
mkdir build
cd build

You can use any cmake flags to build the project as long as it compiles. However, If you are on CIMS cluster please use the following flags or gcc-9.2 can't be used. CMAKE will automatically go to /usr/local/gcc whose version is 4.8.5.

cmake -DCMAKE_C_COMPILER=/usr/local/stow/gcc-9.2/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/stow/gcc-9.2/bin/g++ ..
make -j4
  1. Run executable file
# GA sequential version
./mainGaSeq iteration pop_size cross_prob mutate_prob
# GA cuda version
./GA_gpu iteration pop_size cross_prob mutate_prob
# PSO sequntial version
./main particleNum maxIteration verbose
# PSO cuda version
./mainCuda particleNum maxIteration verbose
# SA sequential version
./mainSA num_of_initalSolutions maxOuterIteration maxInnerIteration verbose
# SA cuda version
./mainSACuda num_of_initalSolutions maxOuterIteration maxInnerIteration verbose
# ACA sequential version
./mainACA_seq num_ants max_iters filename
# ACA cuda version
./mainACA_cuda num_ants max_iters filename

scikit-opt-gpu's People

Contributors

kraftoreo avatar ruoyugao avatar synozhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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