00001
00002
00003 #ifndef _BCP_MESSAGE_PVM_H
00004 #define _BCP_MESSAGE_PVM_H
00005
00006 #include "BcpConfig.h"
00007
00008 #if defined(COIN_HAS_PVM)
00009
00010 #include "BCP_message.hpp"
00011
00012
00013
00014 class BCP_pvm_environment : public BCP_message_environment {
00015 private:
00016 void check_error(const int code, const char* str) const;
00017 public:
00018 BCP_pvm_environment() {}
00019 ~BCP_pvm_environment();
00020
00021 int register_process(USER_initialize* user_init);
00022 int parent_process();
00023
00024 bool alive(const int pid);
00025 const int* alive(int num, const int* pids);
00026
00027 void send(const int target, const BCP_message_tag tag);
00028 void send(const int target,
00029 const BCP_message_tag tag, const BCP_buffer& buf);
00030
00031 void multicast(int num, const int* targets,
00032 const BCP_message_tag tag);
00033 void multicast(int num, const int* targets,
00034 const BCP_message_tag tag, const BCP_buffer& buf);
00035
00036 void receive(const int source,
00037 const BCP_message_tag tag, BCP_buffer& buf,
00038 const double timeout);
00039 bool probe(const int source, const BCP_message_tag tag);
00040
00041 int start_process(const BCP_string& exe,
00042 const bool debug);
00043 int start_process(const BCP_string& exe,
00044 const BCP_string& machine,
00045 const bool debug);
00046 bool start_processes(const BCP_string& exe,
00047 const int proc_num,
00048 const bool debug,
00049 int* ids);
00050 bool start_processes(const BCP_string& exe,
00051 const int proc_num,
00052 const BCP_vec<BCP_string>& machines,
00053 const bool debug,
00054 int* ids);
00055
00056
00057
00058 };
00059
00060 #endif
00061
00062 #endif