Merge branch 'master' into cmaes
This commit is contained in:
commit
6b48ec2108
5 changed files with 96 additions and 19 deletions
8
edo/NEWS
Normal file
8
edo/NEWS
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
* current release
|
||||
- alternative implementation of the multi-normal operators using the Eigen3 library
|
||||
|
||||
* release 0.0 (2011-09-15)
|
||||
- basic design for estimation of distribution algorithms and, more generally for randomized search heuristics
|
||||
- continuous EDA example
|
||||
- EDA using multi-normal distribution, implementation using the boost::ublas library
|
||||
|
||||
|
|
@ -33,11 +33,11 @@ In the edo/build/ directory:
|
|||
(Unix) > ctest
|
||||
Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial
|
||||
|
||||
In the directory "application", there are several directory such as eda_sa which instantiate EDA-SA solver.
|
||||
In the directory "application", there are several directory such as eda which instantiate EDA solver.
|
||||
|
||||
(Unix) After compilation you can run the binary "build/eda_sa" and see results. Parameters can be modified from command line.
|
||||
(Unix) After compilation you can run the binary "build/eda" and see results. Parameters can be modified from command line.
|
||||
|
||||
(Windows) Add argument "eda_sa.param" and execute the corresponding algorithms.
|
||||
(Windows) Add argument "eda.param" and execute the corresponding algorithms.
|
||||
Windows users, please refer to this tutorial: http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.VisualCTutorial
|
||||
|
||||
|
||||
|
|
|
|||
28
eo/NEWS
28
eo/NEWS
|
|
@ -1,4 +1,22 @@
|
|||
* current version
|
||||
- features:
|
||||
- delete the deprecated code parts (was marked as deprecated in the release 1.1)
|
||||
- eoSignal: a class to handle signal with eoCheckpoint instances
|
||||
- eoDetSingleBitFlip: bit flip mutation that changes exactly k bits while checking for duplicate
|
||||
- eoFunctorStat: a wrapper to turn any stand-alone function and into an eoStat
|
||||
- generilazed the output of an eoState: now you can change the format, comes with defaults formatting (latex and json)
|
||||
- eoWrongParamTypeException: a new exception to handle cases where a wrong template is given to eoParser::valueOf
|
||||
- added a getParam method to the eoParser, that raise an exception if the parameter has not been declared
|
||||
- eoParserLogger features are now included in the default eoParser
|
||||
- build system:
|
||||
- improvements of the build architecture
|
||||
- create PKGBUILD file for archlinux package manager
|
||||
- a FindEO module for CMake
|
||||
- bugfixes:
|
||||
- fixed regression with gcc 4.7
|
||||
- fixed compilation issues in Microsoft Visual C++, related to time measurement
|
||||
- added several asserts accross the framework (note: asserts are included only in debug mode)
|
||||
- lot of small bugfixes :-)
|
||||
|
||||
* release 1.2 (16. May. 2011)
|
||||
- fixed the incremental allocation issue in variation operators which were
|
||||
|
|
@ -20,11 +38,11 @@
|
|||
- GCC 4.3 compatibility
|
||||
- new versatile log system with several nested verbose levels
|
||||
- classes using intern verbose parameters marked as deprecated, please update your code accordingly if you use one of the following files:
|
||||
eo/src/eoCombinedInit.h
|
||||
eo/src/eoGenContinue.h
|
||||
eo/src/eoProportionalCombinedOp.h
|
||||
eo/src/utils/eoData.h
|
||||
eo/src/utils/eoStdoutMonitor.h
|
||||
eo/src/eoCombinedInit.h
|
||||
eo/src/eoGenContinue.h
|
||||
eo/src/eoProportionalCombinedOp.h
|
||||
eo/src/utils/eoData.h
|
||||
eo/src/utils/eoStdoutMonitor.h
|
||||
- an evaluator that throw an exception if a maximum eval numbers has been reached, independently of the number of generations
|
||||
- new monitor that can write on any ostream
|
||||
- new continuator that can catch POSIX system user signals
|
||||
|
|
|
|||
|
|
@ -58,14 +58,26 @@ void apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
|||
if (!eo::parallel.isDynamic())
|
||||
{
|
||||
#pragma omp parallel for if(eo::parallel.isEnabled()) //default(none) shared(_proc, _pop, size)
|
||||
#ifdef _MSC_VER
|
||||
//Visual Studio supports only OpenMP version 2.0 in which
|
||||
//an index variable must be of a signed integral type
|
||||
for (long long i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#else // _MSC_VER
|
||||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#pragma omp parallel for schedule(dynamic) if(eo::parallel.isEnabled())
|
||||
#ifdef _MSC_VER
|
||||
//Visual Studio supports only OpenMP version 2.0 in which
|
||||
//an index variable must be of a signed integral type
|
||||
for (long long i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#else // _MSC_VER
|
||||
//doesnot work with gcc 4.1.2
|
||||
//default(none) shared(_proc, _pop, size)
|
||||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( eo::parallel.enableResults() )
|
||||
|
|
|
|||
|
|
@ -21,27 +21,30 @@ Authors:
|
|||
Johann Dréo <johann.dreo@thalesgroup.com>
|
||||
*/
|
||||
|
||||
#ifndef __unix__
|
||||
#warning "Warning: class 'eoEvalUserTimeThrowException' is only available under UNIX systems (defining 'rusage' in 'sys/resource.h'), contributions for other systems are welcomed."
|
||||
#else
|
||||
#if !defined(__unix__) && !defined(_WINDOWS)
|
||||
#warning "Warning: class 'eoEvalUserTimeThrowException' is only available under UNIX (defining 'rusage' in 'sys/resource.h') or Win32 (defining 'GetProcessTimes' in 'WinBase.h') systems, contributions for other systems are welcomed."
|
||||
#else //!defined(__unix__) && !defined(_WINDOWS)
|
||||
|
||||
#ifndef __EOEVALUSERTIMETHROWEXCEPTION_H__
|
||||
#define __EOEVALUSERTIMETHROWEXCEPTION_H__
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <eoExceptions.h>
|
||||
|
||||
/** Check at each evaluation if a given CPU user time contract has been reached.
|
||||
*
|
||||
* Throw an eoMaxTimeException if the given max time has been reached.
|
||||
* Usefull if you want to end the search independently of generations.
|
||||
* This class uses (almost-)POSIX headers.
|
||||
* This class uses (almost-)POSIX or Win32 headers, depending on the platform.
|
||||
* It uses a computation of the user time used on the CPU. For a wallclock time measure, see eoEvalTimeThrowException
|
||||
*
|
||||
* @ingroup Evaluation
|
||||
*/
|
||||
|
||||
#include <eoExceptions.h>
|
||||
|
||||
#ifdef __unix__
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
template< class EOT >
|
||||
class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT >
|
||||
{
|
||||
|
|
@ -58,7 +61,7 @@ public:
|
|||
if( current >= _max ) {
|
||||
throw eoMaxTimeException( current );
|
||||
} else {
|
||||
func(eo);
|
||||
this->func(eo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -68,5 +71,41 @@ protected:
|
|||
struct rusage _usage;
|
||||
};
|
||||
|
||||
#else
|
||||
#ifdef _WINDOWS
|
||||
//here _WINDOWS is defined
|
||||
|
||||
#include <WinBase.h>
|
||||
|
||||
template< class EOT >
|
||||
class eoEvalUserTimeThrowException : public eoEvalFuncCounter< EOT >
|
||||
{
|
||||
public:
|
||||
eoEvalUserTimeThrowException( eoEvalFunc<EOT> & func, const long max ) : eoEvalFuncCounter<EOT>( func, "CPU-user"), _max(max) {}
|
||||
|
||||
virtual void operator() ( EOT & eo )
|
||||
{
|
||||
if( eo.invalid() ) {
|
||||
FILETIME dummy;
|
||||
GetProcessTimes(GetCurrentProcess(), &dummy, &dummy, &dummy, &_usage);
|
||||
|
||||
ULARGE_INTEGER current;
|
||||
current.LowPart = _usage.dwLowDateTime;
|
||||
current.HighPart = _usage.dwHighDateTime;
|
||||
if( current.QuadPart >= _max ) {
|
||||
throw eoMaxTimeException( current.QuadPart );
|
||||
} else {
|
||||
func(eo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
const long _max;
|
||||
FILETIME _usage;
|
||||
};
|
||||
|
||||
#endif // _WINDOWS
|
||||
#endif //__unix__
|
||||
#endif // __EOEVALUSERTIMETHROWEXCEPTION_H__
|
||||
#endif // __UNIX__
|
||||
#endif //!defined(__unix__) && !defined(_WINDOWS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue