Skip to content

HubertStr/GPU_SPSO

Repository files navigation

GPU_SPSO

GPU-based Parallel Particle Swarm Optimization

Link of the paper

Our project is based on the following paper:
https://ieeexplore.ieee.org/document/4983119

Objective functions:

f1: This is an image.

f2: This is an image.

f3: This is an image.

f4: This is an image.

Constraints

Dimensions

In this project, we will look at 4 dimensions:
50, 100, 150, 200

Swarm population

In this project, we will look at 4 swarm populations:
400, 1200, 2000, 2800

Domains

f1: (-100, 100)^D
f2: (-10, 10)^D
f3: (-600, 600)^D
f4: (-10, 10)^D

Two different ways of running the algorithm

Two methods will be implemented:

  • Method1: Uses cuRAND to generate pseudorandom numbers on the GPU. The computations are done on GPU. The corresponding file is named main.cu.
  • Method2: Random numbers are generated on CPU, as well as the computations. This method is used as a comparison. The corresponding file is named main_CPU.c.

How to run on Pace

For the GPU code:

  1. Load the cuda module:

    prompt% module load cuda
    
  2. Delete the previously compiled example:

    prompt% make clean
    
  3. Compile the example:

    prompt% make
    

    The Makefile contains many useful bits of information on how to compile a CUDA code

  4. Submit the example to PBS. As the example is based on f1, submit the corresponding file:

    prompt% qsub run_f1.pbs -q pace-ice-gpu
    

For the CPU code:

  1. Compile program with gcc

    prompt% gcc -Wall -g -o spsocpu spsocpu.c -lm
    
  2. Run program with the selected parameters and store output in a text file

    prompt% ./spsocpu 2800 2500 10 -10 0.2 0.3 .5 2 >> output.txt
    

About

GPU-based Parallel Particle Swarm Optimization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published