Go to the documentation of this file.
57 virtual bool alive(
const int pid) = 0;
61 virtual const int*
alive(
int num,
const int* pids) = 0;
105 const double timeout) = 0;
121 const bool debug) = 0;
125 const bool debug) = 0;
virtual bool start_processes(const BCP_string &exe, const int proc_num, const BCP_vec< BCP_string > &machines, const bool debug, int *ids)=0
Spawn proc_num processes on the machines given by the third argument, all with the same executable.
virtual void send(const int target, const BCP_message_tag tag)=0
Send an empty message (message tag only) to the process given by the frist argument.
virtual int register_process(USER_initialize *user_init)=0
A process can register (receive its process id) with the message passing environment.
virtual int num_procs()
Return the number of processes.
BCP_message_tag
This enumerative constant describes the message tags different processes of BCP understand.
virtual ~BCP_message_environment()
Being virtual, the destructor invokes the destructor for the real type of the object being deleted.
virtual bool start_processes(const BCP_string &exe, const int proc_num, const bool debug, int *ids)=0
Spawn proc_num processes, all with the same executable.
virtual void multicast(int num, const int *targets, const BCP_message_tag tag, const BCP_buffer &buf)=0
Send the message in the buffer with the given message tag to all processes in the process array.
virtual const int * alive(int num, const int *pids)=0
Test if the processes given by the process array in the argument are alive or not.
virtual int start_process(const BCP_string &exe, const bool debug)=0
Spawn a new process.
virtual int parent_process()=0
Return the process id of the parent process (the process that spawned the currnet process.
virtual void send(const int target, const BCP_message_tag tag, const BCP_buffer &buf)=0
Send the message in the buffer with the given message tag to the process given by the first argument.
virtual bool probe(const int source, const BCP_message_tag tag)=0
Probe if there are any messages from the given process with the given message tag.
This class is a very simple impelementation of a constant length string.
This class is an abstract base class for the initializer class the user has to provide.
virtual void multicast(int num, const int *targets, const BCP_message_tag tag)=0
Send an empty message (message tag only) to all the processes in the process array.
virtual bool alive(const int pid)=0
Test if the process given by the argument is alive or not.
virtual void receive(const int source, const BCP_message_tag tag, BCP_buffer &buf, const double timeout)=0
Blocking receive with timeout.
virtual int start_process(const BCP_string &exe, const BCP_string &machine, const bool debug)=0
Spawn a new process on the machine specified by the second argument.
This is an abstract base class that describes the message passing environment.
This class describes the message buffer used for all processes of BCP.