GPU-based Parallel Particle Swarm Optimization
Our project is based on the following paper:
https://ieeexplore.ieee.org/document/4983119
In this project, we will look at 4 dimensions:
50, 100, 150, 200
In this project, we will look at 4 swarm populations:
400, 1200, 2000, 2800
f1: (-100, 100)^D
f2: (-10, 10)^D
f3: (-600, 600)^D
f4: (-10, 10)^D
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.
-
Load the cuda module:
prompt% module load cuda
-
Delete the previously compiled example:
prompt% make clean
-
Compile the example:
prompt% make
The Makefile contains many useful bits of information on how to compile a CUDA code
-
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
-
Compile program with gcc
prompt% gcc -Wall -g -o spsocpu spsocpu.c -lm
-
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