Différences entre les versions de « EASEA command line »

De
Aller à la navigation Aller à la recherche
Ligne 6 : Ligne 6 :
 
''By default'', EASEA parallelizes the evaluation of the individuals on the cores of a multi-core CPU using [https://en.wikipedia.org/wiki/OpenMP OpenMP]. To try this out, cd to the the examples/weierstrass directory and run:
 
''By default'', EASEA parallelizes the evaluation of the individuals on the cores of a multi-core CPU using [https://en.wikipedia.org/wiki/OpenMP OpenMP]. To try this out, cd to the the examples/weierstrass directory and run:
  
$ easea weierstrass.ez<br>
+
$ easena weierstrass.ez<br>
 
$ make<br>
 
$ make<br>
 
$ ./weierstrass
 
$ ./weierstrass
Ligne 26 : Ligne 26 :
 
In order to try this out, still in the weierstrass directory, run:
 
In order to try this out, still in the weierstrass directory, run:
  
$ easea weierstrass.ez -cuda<br>
+
$ easena weierstrass.ez -cuda<br>
 
$ make<br>
 
$ make<br>
 
$ ./weierstrass
 
$ ./weierstrass
Ligne 38 : Ligne 38 :
 
Try this out in the regression directory with:
 
Try this out in the regression directory with:
  
$ easea regression.ez -gp<br>
+
$ easena regression.ez -gp<br>
 
$ make<br>
 
$ make<br>
 
$ ./regression
 
$ ./regression
Ligne 49 : Ligne 49 :
 
As above, but parallelized on an NVIDIA GPU card.
 
As above, but parallelized on an NVIDIA GPU card.
  
$ easea regression.ez -cuda_gp<br>
+
$ easena regression.ez -cuda_gp<br>
 
$ make<br>
 
$ make<br>
 
$./regression
 
$./regression
  
 
Compare the execution time to a single thread CPU execution to evaluate the obtained GPU acceleration.
 
Compare the execution time to a single thread CPU execution to evaluate the obtained GPU acceleration.
 +
 +
== -nsgaii option==
 +
This option makes EASENA use a template of Nondominated Sorting genetic algorithm II (tpl/NSGAII.tpl) for Multi-Objective Problems (MOPs).
 +
NSGA-II is a very popular Multi-Objective Evolutionary Algorithm (MOEA) in multi-objective optimization area. This algorithm makes offspring by using chosen crossover and mutation operators and selects individuals for a new generation by nondominated-sorting (NDS) and by crowding distance (CD) comparator.
 +
In order to compile your .ez file, for example dtlz1.ez (see folder examples/dtlz/dtlz1), following steps have to be done:
 +
$ easena -nsgaii dtlz1.ez<br>
 +
If you have successfully compiled you .ez file you can find .cpp, .h, Makefile and .prm files.
 +
And now, you can compile obtained .cpp files by using Makefile:
 +
$ make<br>
 +
And if an executable file is built seccessfully, you can run it:
 +
$ ./dtlz1
 +
 +
== -nsgaiii option==
 +
This option makes EASENA use a template of Nondominated Sorting genetic algorithm III (tpl/NSGAIII.tpl) for MOPs.
 +
NSGA-III extends NSGA-II to using reference points to handle many-objective problems.
 +
In order to compile your .ez file, the steps are following:
 +
$ easena -nsgaiii dtlz1.ez<br>
 +
$ make<br>
 +
$ ./dtlz1
 +
 +
== -asrea option==
 +
This option makes EASENA use a template of Archived-Based Stcochastic Ranking Evolutionary Algorithm (tpl/ASREA.tpl) for MOPs.
 +
This MOEA ranks the population by comparing individuals with members of an archive, that breaks complexity into O(man)
 +
(m being the number of objectives, a the size of the archive and n the population size).
 +
The principe of compilation is the same as in case of -nsgaii and _nsgaiii:
 +
$ easena -asrea dtlz1.ez<br>
 +
$ make<br>
 +
$ ./dtlz1
 +
 +
== -cdas option==
 +
This option makes EASENA use a template of Controlling Dominance Area of Solutions optimization algorithm (tpl/CDAS.tpl). CDAS controls the degree of expansion or contraction of the dominance area of solutions in order to improve the performance.
 +
Compilation steps are the same as in all multi-objective cases above:
 +
$ easena -cdas dtlz1.ez<br>
 +
$ make<br>
 +
$ ./dtlz1
  
 
== -memetic ==
 
== -memetic ==

Version du 12 juin 2019 à 09:54

Compiler Parameters

Out of the same .ez file, EASEA can create different source codes, depending on whether you want to use an NVIDIA GPU card or not, or whether you want to evolve structures (genetic programming) or optimise parameters (evolutionary strategies, genetic algorithms). It is also possible to create Covariance Matrix Adaptation Evolutionary Strategy (CMA-ES) code.

No option (default)

By default, EASEA parallelizes the evaluation of the individuals on the cores of a multi-core CPU using OpenMP. To try this out, cd to the the examples/weierstrass directory and run:

$ easena weierstrass.ez
$ make
$ ./weierstrass


If you want to see the obtained acceleration, compare the parallel evaluation execution time with evaluation using a single thread. For this, run:

$ OMP_NUM_THREADS=1 ./weierstrass

This should be slower.

-cuda option

EASEA can also automatically parallelize the evaluation function on the many cores of an NVIDIA card. If you want / need to clean up the directory, run:

$ make easeaclean

The -cuda command line option makes EASEA create .cu files to exploit the massive parallelism of GPU cards rather than .cpp files, that exploit the parallelism of CPU cores. The created Makefile is also different.

In order to try this out, still in the weierstrass directory, run:

$ easena weierstrass.ez -cuda
$ make
$ ./weierstrass

If your computer is equipped with an NVIDIA GPU card, you should experiment a nice acceleration. To evaluate the gain obtained by parallelizing on a GPU card, do as above: compare the execution time on the GPU with the time obtained on one thread of the CPU.

-gp option

This makes EASEA create individuals that store equations as trees, in order to model some data.
Try this out in the regression directory with:

$ easena regression.ez -gp
$ make
$ ./regression

To see the acceleration obtained by parallelizing on OpenMP, run with:
$ OMP_NUM_THREADS=1 ./regression

-cuda_gp option

As above, but parallelized on an NVIDIA GPU card.

$ easena regression.ez -cuda_gp
$ make
$./regression

Compare the execution time to a single thread CPU execution to evaluate the obtained GPU acceleration.

-nsgaii option

This option makes EASENA use a template of Nondominated Sorting genetic algorithm II (tpl/NSGAII.tpl) for Multi-Objective Problems (MOPs). NSGA-II is a very popular Multi-Objective Evolutionary Algorithm (MOEA) in multi-objective optimization area. This algorithm makes offspring by using chosen crossover and mutation operators and selects individuals for a new generation by nondominated-sorting (NDS) and by crowding distance (CD) comparator. In order to compile your .ez file, for example dtlz1.ez (see folder examples/dtlz/dtlz1), following steps have to be done: $ easena -nsgaii dtlz1.ez
If you have successfully compiled you .ez file you can find .cpp, .h, Makefile and .prm files. And now, you can compile obtained .cpp files by using Makefile: $ make
And if an executable file is built seccessfully, you can run it: $ ./dtlz1

-nsgaiii option

This option makes EASENA use a template of Nondominated Sorting genetic algorithm III (tpl/NSGAIII.tpl) for MOPs. NSGA-III extends NSGA-II to using reference points to handle many-objective problems. In order to compile your .ez file, the steps are following: $ easena -nsgaiii dtlz1.ez
$ make
$ ./dtlz1

-asrea option

This option makes EASENA use a template of Archived-Based Stcochastic Ranking Evolutionary Algorithm (tpl/ASREA.tpl) for MOPs. This MOEA ranks the population by comparing individuals with members of an archive, that breaks complexity into O(man) (m being the number of objectives, a the size of the archive and n the population size). The principe of compilation is the same as in case of -nsgaii and _nsgaiii: $ easena -asrea dtlz1.ez
$ make
$ ./dtlz1

-cdas option

This option makes EASENA use a template of Controlling Dominance Area of Solutions optimization algorithm (tpl/CDAS.tpl). CDAS controls the degree of expansion or contraction of the dominance area of solutions in order to improve the performance. Compilation steps are the same as in all multi-objective cases above: $ easena -cdas dtlz1.ez
$ make
$ ./dtlz1

-memetic

The idea behind this option is that you can modify the genome of the individual in the evaluation function, if you want to run a local optimizer there, such as a gradient descent, for instance.

-cmaes

Implements a CMA-ES algorithm to optimize continuous problems.

Miscellaneous parameters

-v

This will compile a file in verbose mode. Mainly used for debug purposes.

-tl

This true line compiling mode will locate errors differently. Useful it it seems to you that the error is not located where the easea compiler tells you it is.