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 
12 int general_init_code();
13 int general_init(const char* options);
15 int general_send(const void* buf, int count, MDI_Datatype datatype, MDI_Comm comm);
16 int general_recv(void* buf, int count, MDI_Datatype datatype, MDI_Comm comm);
17 int general_send_command(const char* buf, MDI_Comm comm);
18 int general_recv_command(char* buf, MDI_Comm comm);
19 int general_builtin_command(const char* buf, MDI_Comm comm, int* flag);
20 
21 int register_node(vector* node_vec, const char* node_name);
22 int register_command(vector* node_vec, const char* node_name, const char* command_name);
23 int register_callback(vector* node_vec, const char* node_name, const char* callback_name);
24 
25 int send_command_list(MDI_Comm comm);
26 int send_callback_list(MDI_Comm comm);
27 int send_node_list(MDI_Comm comm);
28 int send_ncommands(MDI_Comm comm);
29 int send_ncallbacks(MDI_Comm comm);
30 int send_nnodes(MDI_Comm comm);
31 int get_node_info(MDI_Comm comm);
32 int get_node_vector(MDI_Comm comm, vector** vector_ptr);
33 
34 #endif
register_node
int register_node(vector *node_vec, const char *node_name)
Register a node.
Definition: mdi_general.c:808
send_ncallbacks
int send_ncallbacks(MDI_Comm comm)
Send the number of supported callbacks.
Definition: mdi_general.c:1320
get_node_vector
int get_node_vector(MDI_Comm comm, vector **vector_ptr)
Get the node vector associated with a particular communicator.
Definition: mdi_general.c:1597
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:450
mdi_global.h
Global structures used by MDI.
general_builtin_command
int general_builtin_command(const char *buf, MDI_Comm comm, int *flag)
Respond to a general built-in command.
Definition: mdi_general.c:644
send_command_list
int send_command_list(MDI_Comm comm)
Send the list of supported commands.
Definition: mdi_general.c:1020
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:725
send_node_list
int send_node_list(MDI_Comm comm)
Send the list of nodes.
Definition: mdi_general.c:1216
general_init_code
int general_init_code()
Initialize a new code.
Definition: mdi_general.c:23
general_accept_communicator
int general_accept_communicator()
Accept a new MDI communicator.
Definition: mdi_general.c:358
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:946
general_init
int general_init(const char *options)
Initialize communication through the MDI library.
Definition: mdi_general.c:57
send_callback_list
int send_callback_list(MDI_Comm comm)
Send the list of callbacks.
Definition: mdi_general.c:1116
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:566
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:391
send_nnodes
int send_nnodes(MDI_Comm comm)
Send the number of supported nodes.
Definition: mdi_general.c:1357
dynamic_array_struct
Definition: mdi_global.h:87
get_node_info
int get_node_info(MDI_Comm comm)
Get information about the nodes of a particular code.
Definition: mdi_general.c:1384
send_ncommands
int send_ncommands(MDI_Comm comm)
Send the number of supported commands.
Definition: mdi_general.c:1283
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:869