EASEA command line

De
Aller à la navigation Aller à la recherche

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:

$ easea 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:

$ easea 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:

$ easea 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.

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

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

-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.