GAlib-mpi
GAlib-mpi copied to clipboard
Get the other three Genetic Algorithms work with MPI
In order to Get the other three Genetic Algorithms work with MPI
GASStateGA.C:
GAIncGA.C:
ADD
// Pass mpi_tasks and mpi_rank to the population class.
pop->mpi_tasks(vmpi_tasks);
pop->mpi_rank(vmpi_rank);
AFTER
GARandomSeed(seed);
GADemeGA.C: ADD // Pass mpi_tasks and mpi_rank to the population class. pop->mpi_tasks(vmpi_tasks); pop->mpi_rank(vmpi_rank); AFTER deme[i]->initialize();
What's more: I recommend change the default BITBASE in binary-to-decimal phenotype from long int to long long int ,cuz most platform of gcc support long long int nowadays.
gabincvt.C:
ifndef BITBASE
define BITBASE long long int
endif
gaconfig.h: