Molssi Driver Interface Library
mdi_general.h
Go to the documentation of this file.
1 
6 #ifndef MDI_GENERAL
7 #define MDI_GENERAL
8 
9 #include "mdi.h"
10 #include "mdi_global.h"
11 
13 extern int (*execute_command)(const char*, MDI_Comm);
14 
15 int general_init(const char* options);
17 int general_send(const void* buf, int count, MDI_Datatype datatype, MDI_Comm comm);
18 int general_recv(void* buf, int count, MDI_Datatype datatype, MDI_Comm comm);
19 int general_send_command(const char* buf, MDI_Comm comm);
20 int general_recv_command(char* buf, MDI_Comm comm);
21 int general_builtin_command(const char* buf, MDI_Comm comm);
22 
23 int register_node(vector* node_vec, const char* node_name);
24 int register_command(vector* node_vec, const char* node_name, const char* command_name);
25 int register_callback(vector* node_vec, const char* node_name, const char* callback_name);
26 
27 int send_command_list(MDI_Comm comm);
28 int send_callback_list(MDI_Comm comm);
29 int send_node_list(MDI_Comm comm);
30 int send_ncommands(MDI_Comm comm);
31 int send_ncallbacks(MDI_Comm comm);
32 int send_nnodes(MDI_Comm comm);
33 int get_node_info(MDI_Comm comm);
34 vector* get_node_vector(MDI_Comm comm);
35 
36 #endif
register_node
int register_node(vector *node_vec, const char *node_name)
Register a node.
Definition: mdi_general.c:655
send_ncallbacks
int send_ncallbacks(MDI_Comm comm)
Send the number of supported callbacks.
Definition: mdi_general.c:1042
general_recv
int general_recv(void *buf, int count, MDI_Datatype datatype, MDI_Comm comm)
Receive a message through the MDI connection.
Definition: mdi_general.c:384
mdi_global.h
Global structures used by MDI.
execute_command
int(* execute_command)(const char *, MDI_Comm)
Function pointer to the generic execute_command function.
send_command_list
int send_command_list(MDI_Comm comm)
Send the list of supported commands.
Definition: mdi_general.c:819
general_recv_command
int general_recv_command(char *buf, MDI_Comm comm)
Receive a command of length MDI_COMMAND_LENGTH through the MDI connection.
Definition: mdi_general.c:607
get_node_vector
vector * get_node_vector(MDI_Comm comm)
Get the node vector associated with a particular communicator.
Definition: mdi_general.c:1291
send_node_list
int send_node_list(MDI_Comm comm)
Send the list of nodes.
Definition: mdi_general.c:967
general_builtin_command
int general_builtin_command(const char *buf, MDI_Comm comm)
Respond to a general built-in command.
Definition: mdi_general.c:546
general_accept_communicator
int general_accept_communicator()
Accept a new MDI communicator.
Definition: mdi_general.c:316
register_callback
int register_callback(vector *node_vec, const char *node_name, const char *callback_name)
Register a callback on a specified node.
Definition: mdi_general.c:763
general_init
int general_init(const char *options)
Initialize communication through the MDI library.
Definition: mdi_general.c:25
send_callback_list
int send_callback_list(MDI_Comm comm)
Send the list of callbacks.
Definition: mdi_general.c:891
general_send_command
int general_send_command(const char *buf, MDI_Comm comm)
Send a command of length MDI_COMMAND_LENGTH through the MDI connection.
Definition: mdi_general.c:489
general_send
int general_send(const void *buf, int count, MDI_Datatype datatype, MDI_Comm comm)
Send a message through the MDI connection.
Definition: mdi_general.c:336
send_nnodes
int send_nnodes(MDI_Comm comm)
Send the number of supported nodes.
Definition: mdi_general.c:1072
dynamic_array_struct
Definition: mdi_global.h:80
get_node_info
int get_node_info(MDI_Comm comm)
Get information about the nodes of a particular code.
Definition: mdi_general.c:1092
send_ncommands
int send_ncommands(MDI_Comm comm)
Send the number of supported commands.
Definition: mdi_general.c:1012
register_command
int register_command(vector *node_vec, const char *node_name, const char *command_name)
Register a command on a specified node.
Definition: mdi_general.c:704