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:673
send_ncallbacks
int send_ncallbacks(MDI_Comm comm)
Send the number of supported callbacks.
Definition: mdi_general.c:1086
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:837
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:619
get_node_vector
vector * get_node_vector(MDI_Comm comm)
Get the node vector associated with a particular communicator.
Definition: mdi_general.c:1341
send_node_list
int send_node_list(MDI_Comm comm)
Send the list of nodes.
Definition: mdi_general.c:1003
general_builtin_command
int general_builtin_command(const char *buf, MDI_Comm comm)
Respond to a general built-in command.
Definition: mdi_general.c:550
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:781
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:918
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:1115
dynamic_array_struct
Definition: mdi_global.h:78
get_node_info
int get_node_info(MDI_Comm comm)
Get information about the nodes of a particular code.
Definition: mdi_general.c:1135
send_ncommands
int send_ncommands(MDI_Comm comm)
Send the number of supported commands.
Definition: mdi_general.c:1057
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:722