3#ifndef _BCP_MESSAGE_PVM_H
4#define _BCP_MESSAGE_PVM_H
8#if defined(COIN_HAS_PVM)
16 void check_error(
const int code,
const char* str)
const;
18 BCP_pvm_environment() {}
19 ~BCP_pvm_environment();
24 bool alive(
const int pid);
25 const int*
alive(
int num,
const int* pids);
28 void send(
const int target,
31 void multicast(
int num,
const int* targets,
33 void multicast(
int num,
const int* targets,
38 const double timeout);
44 const BCP_string& machine,
52 const BCP_vec<BCP_string>& machines,
BCP_message_tag
This enumerative constant describes the message tags different processes of BCP understand.
This is an abstract base class that describes the message passing environment.
virtual int register_process(USER_initialize *user_init)=0
A process can register (receive its process id) with the message passing environment.
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 int parent_process()=0
Return the process id of the parent process (the process that spawned the currnet process.
virtual bool alive(const int pid)=0
Test if the process given by the argument is alive or not.
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.
virtual void receive(const int source, const BCP_message_tag tag, BCP_buffer &buf, const double timeout)=0
Blocking receive with timeout.
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 int start_process(const BCP_string &exe, const bool debug)=0
Spawn a new process.
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.