EvolvingObjects
|
Job that will be launched an unknown amount of times, in worker side. More...
#include <eoMpi.h>
Public Member Functions | |
MultiJob (AssignmentAlgorithm &algo, int masterRank, JobStore< JobData > &store) |
Job that will be launched an unknown amount of times, in worker side.
As explained in eo::mpi documentation, jobs can happen either a well known amount of times or an unknown amount of times. This class implements the general case when the job is launched an unknown amount of times, for instance in a while loop. The master will run many jobs (or the same job many times), but the workers will launch it only once.
It uses the message Message::Kill as the termination message. This message can be launched with an EmptyJob, launched only by the master. If no Message::Kill is sent on the Channels::Commands, the worker will wait forever, which will cause a deadlock.