goghino/genetic_algorithm — pull request #2 by dmikushin (2014-09-20 19:44:46+00:00)
Title: Do not use derived type in scatter, which makes GPU-aware MPI to do something pathetic

4 MPI processes on a single GTX680M GPU:

$ ~/forge/openmpi-1.8.2/install/bin/mpirun -np 4 ./multi input.txt
Reading file - success!
Reading file - success!
Reading file - success!
Reading file - success!
------------------------------------------------------------
Finished! Found Solution:
c0 = -5.00837
c1 = 2.97569
c2 = 4.04596
c3 = -2.00163
Best fitness: 1.91609
Generations: 1500
Time for GPU calculation + communication equals 45.8716 seconds

No derived type:

$ ~/forge/openmpi-1.8.2/install/bin/mpirun -np 4 ./multi input.txt
Reading file - success!
Reading file - success!
Reading file - success!
Reading file - success!
------------------------------------------------------------
Finished! Found Solution:
c0 = -0.477092
c1 = 0.0605992
c2 = 0.007356
c3 = 0.18418
Best fitness: 882.376
Generations: 1500
Time for GPU calculation + communication equals 36.2553 seconds