Added packet size to parallel parser and default argument to static assignment.
This commit is contained in:
parent
472b86bc68
commit
d805800731
3 changed files with 6 additions and 1 deletions
|
|
@ -114,13 +114,14 @@ namespace eo
|
|||
init( workers, runs );
|
||||
}
|
||||
|
||||
StaticAssignmentAlgorithm( int runs )
|
||||
StaticAssignmentAlgorithm( int runs = 0 )
|
||||
{
|
||||
std::vector<int> workers;
|
||||
for(int i = 1; i < Node::comm().size(); ++i)
|
||||
{
|
||||
workers.push_back( i );
|
||||
}
|
||||
|
||||
init( workers, runs );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ eoParallel::eoParallel() :
|
|||
_nthreads( 0, "parallelize-nthreads", "Define the number of threads you want to use, nthreads = 0 means you want to use all threads available", '\0' ),
|
||||
_enableResults( false, "parallelize-enable-results", "Enable the generation of results", '\0' ),
|
||||
_doMeasure( false, "parallelize-do-measure", "Do some measures during execution", '\0' ),
|
||||
_packetSize( 1U, "parallelize-packet-size", "Number of elements which should be sent at a time during a parallel evaluation based on message passing.", '\0'),
|
||||
_t_start(0)
|
||||
{
|
||||
}
|
||||
|
|
@ -90,6 +91,7 @@ void eoParallel::_createParameters( eoParser& parser )
|
|||
parser.processParam( _nthreads, section );
|
||||
parser.processParam( _enableResults, section );
|
||||
parser.processParam( _doMeasure, section );
|
||||
parser.processParam( _packetSize, section );
|
||||
}
|
||||
|
||||
void make_parallel(eoParser& parser)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public:
|
|||
std::string prefix() const;
|
||||
|
||||
inline unsigned int nthreads() const { return _nthreads.value(); }
|
||||
inline unsigned int packetSize() const { return _packetSize.value(); }
|
||||
|
||||
inline bool enableResults() const { return _enableResults.value(); }
|
||||
inline bool doMeasure() const { return _doMeasure.value(); }
|
||||
|
|
@ -68,6 +69,7 @@ private:
|
|||
eoValueParam<bool> _isDynamic;
|
||||
eoValueParam<std::string> _prefix;
|
||||
eoValueParam<unsigned int> _nthreads;
|
||||
eoValueParam<unsigned int> _packetSize;
|
||||
eoValueParam<bool> _enableResults;
|
||||
eoValueParam<bool> _doMeasure;
|
||||
double _t_start;
|
||||
|
|
|
|||
Reference in a new issue