C++ API#
Functions callable by users of the MolSSI Driver Interface.
Functions
-
int MDI_Init(int *argc, char ***argv)#
Initialize communication through the MDI library.
If using the “-method MPI” option, this function must be called by all ranks. The function returns
0
on a success.- Parameters:
argc – [inout] Pointer to the number of arguments.
argv – [inout] Pointer to the argument vector.
-
int MDI_Init_with_argv(int *argc, char ***argv)#
Initialize communication through the MDI library.
If using the “-method MPI” option, this function must be called by all ranks. The function returns
0
on a success.- Parameters:
argc – [inout] Pointer to the number of arguments.
argv – [inout] Pointer to the argument vector.
-
int MDI_Init_code()#
Initialize a code structure for the MDI library.
The function returns
0
on a success.
-
int MDI_Init_with_options(const char *options)#
Initialize communication through the MDI library.
If using the “-method MPI” option, this function must be called by all ranks. The function returns
0
on a success.- Parameters:
options – [in] Options describing the communication method used to connect to codes.
world_comm – [inout] On input, the MPI communicator that spans all of the codes. On output, the MPI communicator that spans the single code corresponding to the calling rank. Only used if the “-method MPI” option is provided.
-
int MDI_Initialized(int *flag)#
Indicates whether MDI_Init has been called.
- Parameters:
flag – [out] Flag is true if and only if MDI_Init has been called.
-
int MDI_Check_for_communicator(int *flag)#
Check if a new communicator is available.
The function returns whether there is currently a new communicator that can be accepted via MDI_Accept_communicator. If new communicators are available, the function returns
1
. Otherwise, it returns0
.
-
int MDI_Accept_Communicator(MDI_Comm *comm)#
Accept a new MDI communicator.
The function returns an MDI_Comm that describes a connection between two codes. If no new communicators are available, the function returns
MDI_COMM_NULL
.
-
int MDI_Accept_communicator(MDI_Comm *comm)#
Accept a new MDI communicator.
The function returns an MDI_Comm that describes a connection between two codes. If no new communicators are available, the function returns
MDI_COMM_NULL
.
-
int MDI_Send(const void *buf, int count, MDI_Datatype datatype, MDI_Comm comm)#
Send data through the MDI connection.
If running with MPI, this function must be called only by rank
0
. The function returns0
on a success.- Parameters:
buf – [in] Pointer to the data to be sent.
count – [in] Number of values (integers, double precision floats, characters, etc.) to be sent.
datatype – [in] MDI handle (MDI_INT, MDI_DOUBLE, MDI_CHAR, etc.) corresponding to the type of data to be sent.
comm – [in] MDI communicator associated with the intended recipient code.
-
int MDI_Recv(void *buf, int count, MDI_Datatype datatype, MDI_Comm comm)#
Receive data through the MDI connection.
If running with MPI, this function must be called only by rank
0
. The function returns0
on a success.- Parameters:
buf – [in] Pointer to the buffer where the received data will be stored.
count – [in] Number of values (integers, double precision floats, characters, etc.) to be received.
datatype – [in] MDI handle (MDI_INT, MDI_DOUBLE, MDI_CHAR, etc.) corresponding to the type of data to be received.
comm – [in] MDI communicator associated with the connection to the sending code.
-
int MDI_Send_Command(const char *buf, MDI_Comm comm)#
Send a command of length
MDI_COMMAND_LENGTH
through the MDI connection.If running with MPI, this function must be called only by rank
0
. The function returns0
on a success.- Parameters:
buf – [in] Pointer to the data to be sent.
comm – [in] MDI communicator associated with the intended recipient code.
-
int MDI_Send_command(const char *buf, MDI_Comm comm)#
Send a command of length
MDI_COMMAND_LENGTH
through the MDI connection.If running with MPI, this function must be called only by rank
0
. The function returns0
on a success.- Parameters:
buf – [in] Pointer to the data to be sent.
comm – [in] MDI communicator associated with the intended recipient code.
-
int MDI_Recv_Command(char *buf, MDI_Comm comm)#
Receive a command of length
MDI_COMMAND_LENGTH
through the MDI connection.If running with MPI, this function must be called only by rank
0
. The function returns0
on a success.- Parameters:
buf – [in] Pointer to the buffer where the received data will be stored.
comm – [in] MDI communicator associated with the connection to the sending code.
-
int MDI_Recv_command(char *buf, MDI_Comm comm)#
Receive a command of length
MDI_COMMAND_LENGTH
through the MDI connection.If running with MPI, this function must be called only by rank
0
. The function returns0
on a success.- Parameters:
buf – [in] Pointer to the buffer where the received data will be stored.
comm – [in] MDI communicator associated with the connection to the sending code.
-
int MDI_Conversion_Factor(const char *in_unit, const char *out_unit, double *conv)#
Determine the conversion factor between two units.
The function determines the conversion factor from
in_unit
toout_unit
. The function requires thatin_unit
andout_unit
be members of the same category of unit (i.e. charge, energy, force, etc.). For example, callingMDI_Conversion_Factor
("kilojoule_per_mol"
,"atomic_unit_of_energy"
) will return the conversion factor from kilojoule/mol to hartrees. The function returns0
on a success.All quantities communicated through MDI must be represented using atomic units. When unit conversions are necessary, this function should be used to obtain the conversion factors, as this will ensure that all drivers and engines use conversion factors that are self-consistent across codes. Use of conversion factors that are not self-consistent can result in numerical instabilities.
The following is a list of the unit categories, along with the names of the units associated with each category:
charge
atomic_unit_of_charge
coulomb
energy
atomic_unit_of_energy
calorie
electron_volt
hartree
inverse_meter_energy
joule
kelvin_energy
kilocalorie
kilocalorie_per_mol
kilojoule
kilojoule_per_mol
rydberg
force
atomic_unit_of_force
newton
length
angstrom
atomic_unit_of_length
bohr
meter
nanometer
picometer
mass
atomic_mass_unit
atomic_unit_of_mass
gram
kilogram
time
atomic_unit_of_time
picosecond
second
All conversion factors were acquired from the NIST CODATA, except the conversion factors for calorie, kilocalorie, and kilocalorie_per_mol, which were obtained from the NIST Guide to the SI.
- Parameters:
in_unit – [in] Name of the unit to convert from.
out_unit – [in] Name of the unit to convert to.
conv – [out] Conversion factor from in_unit to out_unit
-
int MDI_Conversion_factor(const char *in_unit, const char *out_unit, double *conv)#
Determine the conversion factor between two units.
The function determines the conversion factor from
in_unit
toout_unit
. The function requires thatin_unit
andout_unit
be members of the same category of unit (i.e. charge, energy, force, etc.). For example, callingMDI_Conversion_Factor
("kilojoule_per_mol"
,"atomic_unit_of_energy"
) will return the conversion factor from kilojoule/mol to hartrees. The function returns0
on a success.All quantities communicated through MDI must be represented using atomic units. When unit conversions are necessary, this function should be used to obtain the conversion factors, as this will ensure that all drivers and engines use conversion factors that are self-consistent across codes. Use of conversion factors that are not self-consistent can result in numerical instabilities.
The following is a list of the unit categories, along with the names of the units associated with each category:
charge
atomic_unit_of_charge
coulomb
energy
atomic_unit_of_energy
calorie
electron_volt
hartree
inverse_meter_energy
joule
kelvin_energy
kilocalorie
kilocalorie_per_mol
kilojoule
kilojoule_per_mol
rydberg
force
atomic_unit_of_force
newton
length
angstrom
atomic_unit_of_length
bohr
meter
nanometer
picometer
mass
atomic_mass_unit
atomic_unit_of_mass
gram
kilogram
time
atomic_unit_of_time
picosecond
second
All conversion factors were acquired from the NIST CODATA, except the conversion factors for calorie, kilocalorie, and kilocalorie_per_mol, which were obtained from the NIST Guide to the SI.
- Parameters:
in_unit – [in] Name of the unit to convert from.
out_unit – [in] Name of the unit to convert to.
conv – [out] Conversion factor from in_unit to out_unit
-
int MDI_String_to_atomic_number(const char *element_symbol, int *atomic_number)#
-
int MDI_Get_Role(int *role)#
Get the role of the code.
The function returns
0
on a success.- Parameters:
role – [out] Role of the code (either
MDI_DRIVER
orMDI_ENGINE
)
-
int MDI_Get_role(int *role)#
Get the role of the code.
The function returns
0
on a success.- Parameters:
role – [out] Role of the code (either
MDI_DRIVER
orMDI_ENGINE
)
-
int MDI_Get_method(int *method, MDI_Comm comm)#
Get the communication method of a communicator.
The function returns
0
on a success.- Parameters:
method – [out] Role of the code (either
MDI_TCP
,MDI_MPI
,MDI_TEST
, orMDI_PLUGIN
)comm – [in] MDI communicator for which the library will return the communication method.
-
int MDI_Get_communicator(MDI_Comm *comm, int index)#
Get the previously accepted MDI communicator at a specific index in the array of all communicators.
The function returns
0
on a success.- Parameters:
comm – [out] Value of the communicator. If no communicator exists at the given index, returns
MDI_COMM_NULL
.index – [in] Request the i’th communicator in the list of accepted and valid communicators. The list begins at
0
.
-
void MDI_Set_World_Size(int world_size_in)#
Set the size of MPI_COMM_WORLD.
This function is only used if the linked program uses MPI4PY.
-
void MDI_Set_World_Rank(int world_rank_in)#
Set the rank of this process within MPI_COMM_WORLD.
This function is only used if the linked program uses MPI4PY.
-
int MDI_Get_intra_rank(int *intra_rank_out)#
Get the rank of this process within the MPI intra-communicator for the current code.
This function is only used by the Fortran wrapper
-
int MDI_Register_Node(const char *node_name)#
Register a node.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node.
-
int MDI_Register_node(const char *node_name)#
Register a node.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node.
-
int MDI_Check_Node_Exists(const char *node_name, MDI_Comm comm, int *flag)#
Check whether a node is supported on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
flag – [out] On return, 1 if the node is supported and 0 otherwise.
-
int MDI_Check_node_exists(const char *node_name, MDI_Comm comm, int *flag)#
Check whether a node is supported on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
flag – [out] On return, 1 if the node is supported and 0 otherwise.
-
int MDI_Get_NNodes(MDI_Comm comm, int *nnodes)#
Get the number of nodes on a specified engine.
The function returns
0
on a success.- Parameters:
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
nnodes – [out] On return, the number of nodes supported by the engine.
-
int MDI_Get_nnodes(MDI_Comm comm, int *nnodes)#
Get the number of nodes on a specified engine.
The function returns
0
on a success.- Parameters:
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
nnodes – [out] On return, the number of nodes supported by the engine.
-
int MDI_Get_Node(int index, MDI_Comm comm, char *name)#
Get the name of a node on a specified engine.
The function returns
0
on a success.- Parameters:
index – [in] Index of the node on the specified engine.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
name – [out] On return, the name of the node
-
int MDI_Get_node(int index, MDI_Comm comm, char *name)#
Get the name of a node on a specified engine.
The function returns
0
on a success.- Parameters:
index – [in] Index of the node on the specified engine.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
name – [out] On return, the name of the node
-
int MDI_Register_Command(const char *node_name, const char *command_name)#
Register a command on a specified node.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node on which the command will be registered.
command_name – [in] Name of the command.
-
int MDI_Register_command(const char *node_name, const char *command_name)#
Register a command on a specified node.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node on which the command will be registered.
command_name – [in] Name of the command.
-
int MDI_Check_Command_Exists(const char *node_name, const char *command_name, MDI_Comm comm, int *flag)#
Check whether a command is supported on specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the command’s node.
command_name – [in] Name of the command.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
flag – [out] On return, 1 if the command is supported and 0 otherwise.
-
int MDI_Check_command_exists(const char *node_name, const char *command_name, MDI_Comm comm, int *flag)#
Check whether a command is supported on specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the command’s node.
command_name – [in] Name of the command.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
flag – [out] On return, 1 if the command is supported and 0 otherwise.
-
int MDI_Get_NCommands(const char *node_name, MDI_Comm comm, int *ncommands)#
Get the number of commands supported for a specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
nnodes – [out] On return, the number of commands supported on the specified engine on the specified node.
-
int MDI_Get_ncommands(const char *node_name, MDI_Comm comm, int *ncommands)#
Get the number of commands supported for a specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
nnodes – [out] On return, the number of commands supported on the specified engine on the specified node.
-
int MDI_Get_Command(const char *node_name, int index, MDI_Comm comm, char *name)#
Get the name of a command on a specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node on which the command is located.
index – [in] Index of the command on the specified node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
name – [out] On return, the name of the command
-
int MDI_Get_command(const char *node_name, int index, MDI_Comm comm, char *name)#
Get the name of a command on a specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node on which the command is located.
index – [in] Index of the command on the specified node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
name – [out] On return, the name of the command
-
int MDI_Register_Callback(const char *node_name, const char *callback_name)#
Register a callback on a specified node.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node on which the callback will be registered.
callback_name – [in] Name of the callback.
-
int MDI_Register_callback(const char *node_name, const char *callback_name)#
Register a callback on a specified node.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node on which the callback will be registered.
callback_name – [in] Name of the callback.
-
int MDI_Check_Callback_Exists(const char *node_name, const char *callback_name, MDI_Comm comm, int *flag)#
Check whether a callback exists on specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the callbacks’s node.
command_name – [in] Name of the callback.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
flag – [out] On return, 1 if the callback is supported and 0 otherwise.
-
int MDI_Check_callback_exists(const char *node_name, const char *callback_name, MDI_Comm comm, int *flag)#
Check whether a callback exists on specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the callbacks’s node.
command_name – [in] Name of the callback.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
flag – [out] On return, 1 if the callback is supported and 0 otherwise.
-
int MDI_Get_NCallbacks(const char *node_name, MDI_Comm comm, int *ncallbacks)#
Get the number of callbacks on a specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
ncallbacks – [out] On return, the number of callbacks on the specified node on the specified engine.
-
int MDI_Get_ncallbacks(const char *node_name, MDI_Comm comm, int *ncallbacks)#
Get the number of callbacks on a specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
ncallbacks – [out] On return, the number of callbacks on the specified node on the specified engine.
-
int MDI_Get_Callback(const char *node_name, int index, MDI_Comm comm, char *name)#
Get the name of a callback on a specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node on which the callback is located.
index – [in] Index of the callback on the specified node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
name – [out] On return, the name of the callback
-
int MDI_Get_callback(const char *node_name, int index, MDI_Comm comm, char *name)#
Get the name of a callback on a specified node on a specified engine.
The function returns
0
on a success.- Parameters:
node_name – [in] Name of the node on which the callback is located.
index – [in] Index of the callback on the specified node.
comm – [in] MDI communicator of the engine. If comm is set to MDI_COMM_NULL, the function will check for the calling engine.
name – [out] On return, the name of the callback
-
int MDI_MPI_get_world_comm(void *world_comm)#
Obtain the MPI communicator that spans the single code corresponding to the calling rank.
The function returns
0
on a success.- Parameters:
world_comm – [out] On output, the MPI communicator that spans the single code corresponding to the calling rank.
-
int MDI_MPI_set_world_comm(void *world_comm)#
Set the MPI communicator that spans the single code corresponding to the calling rank.
The function returns
0
on a success.- Parameters:
world_comm – [out] The MPI communicator that spans the single code corresponding to the calling rank.
-
int MDI_Launch_plugin(const char *plugin_name, const char *options, void *mpi_comm_ptr, MDI_Driver_node_callback_t driver_node_callback, void *driver_callback_object)#
Launch an MDI plugin instance.
The function returns
0
on a success.- Parameters:
plugin_name – [in] Name of the plugin.
options – [in] Command-line options for the plugin.
mpi_comm_ptr – [in] Pointer to an MPI intra-communicator that spans all ranks that will run this plugin instance.
driver_node_callback – [in] Function pointer to the driver code that will be executed on this engine.
driver_callback_object – [in] Pointer to the object instance of which driver_node_callback is a class member. Should be set void if driver_node_callback is not a member of a class.
-
int MDI_Open_plugin(const char *plugin_name, const char *options, void *mpi_comm_ptr, MDI_Comm *mdi_comm_ptr)#
Open an MDI plugin instance in the background.
The function returns
0
on a success.- Parameters:
plugin_name – [in] Name of the plugin.
options – [in] Command-line options for the plugin.
mpi_comm_ptr – [in] Pointer to an MPI intra-communicator that spans all ranks that will run this plugin instance.
mdi_comm_ptr – [out] Pointer to an MDI communicator for communication with the launched plugin.
-
int MDI_Close_plugin(MDI_Comm mdi_comm)#
Close an MDI plugin instance.
The function returns
0
on a success.- Parameters:
plugin_name – [in] Name of the plugin.
options – [in] Command-line options for the plugin.
mpi_comm_ptr – [in] Pointer to an MPI intra-communicator that spans all ranks that will run this plugin instance.
mdi_comm_ptr – [out] Pointer to an MDI communicator for communication with the launched plugin.
-
int MDI_Set_Execute_Command_Func(int (*generic_command)(const char*, MDI_Comm, void*), void *class_object)#
Set the callback MDI uses for MDI_Execute_Command.
The function returns
0
on a success.- Parameters:
execute_command – [in] Function pointer to the generic execute_command function
-
int MDI_Set_execute_command_func(int (*generic_command)(const char*, MDI_Comm, void*), void *class_object)#
Set the callback MDI uses for MDI_Execute_Command.
The function returns
0
on a success.- Parameters:
execute_command – [in] Function pointer to the generic execute_command function
-
int MDI_Set_plugin_state(void *state)#
-
int MDI_Set_plugin_state_internal(void *state)#
Set the language-based callback for when a code is destroyed.
This is only intended to be used internally by the MDI Library
-
int MDI_Set_on_destroy_code(int (*func)(int))#
Set the language-based callback for when a code is destroyed.
This is currently only used by Fortran plugins
-
int MDI_Get_Current_Code()#
Get the current code.
-
int MDI_Plugin_get_argc(int *argc_ptr)#
Get plugin_argc.
-
int MDI_Plugin_get_argv(char ***argv_ptr)#
Get plugin_argv.
-
int MDI_Plugin_get_args(char **args_ptr)#
Get plugin_unedited_options.
-
int MDI_Plugin_get_arg(int index, char **arg_ptr)#
Get a specific element from plugin_argv.
-
int MDI_Get_python_plugin_mpi_world_ptr(void **python_plugin_mpi_world_ptr_ptr, void *state_in)#
Get the Python plugin MPI communicator.
-
int MDI_Set_Mpi4py_Recv_Callback(int (*mpi4py_recv)(void*, int, int, int, MDI_Comm))#
Set the callback MDI uses for MPI_Recv when using mpi4py.
The function returns
0
on a success.- Parameters:
mpi4py_recv – [in] Function pointer to the mpi4py_recv callback
-
int MDI_Set_Mpi4py_Send_Callback(int (*mpi4py_send)(void*, int, int, int, MDI_Comm))#
Set the callback MDI uses for MPI_Send when using mpi4py.
The function returns
0
on a success.- Parameters:
mpi4py_send – [in] Function pointer to the mpi4py_send callback
-
int MDI_Set_Mpi4py_Allgather_Callback(int (*mpi4py_allgather)(void*, void*))#
Set the callback MDI uses for gathering MDI versions when using mpi4py.
The function returns
0
on a success.- Parameters:
mpi4py_allgather – [in] Function pointer to the mpi4py_allgather callback
-
int MDI_Set_Mpi4py_Gather_Names_Callback(int (*mpi4py_gather_names)(void*, void*, int*, int*))#
Set the callback MDI uses for gathering code names when using mpi4py.
The function returns
0
on a success.- Parameters:
mpi4py_gather_names – [in] Function pointer to the mpi4py_gather_names callback
-
int MDI_Set_Mpi4py_Split_Callback(int (*mpi4py_split)(int, int, MDI_Comm, int))#
Set the callback MDI uses for MPI_Split when using mpi4py.
The function returns
0
on a success.- Parameters:
mpi4py_split – [in] Function pointer to the mpi4py_split callback
-
int MDI_Set_Mpi4py_Rank_Callback(int (*mpi4py_rank)(int))#
Set the callback MDI uses for MPI_Comm_rank when using mpi4py.
The function returns
0
on a success.- Parameters:
mpi4py_rank – [in] Function pointer to the mpi4py_rank callback
-
int MDI_Set_Mpi4py_Size_Callback(int (*mpi4py_size)(int))#
Set the callback MDI uses for MPI_Comm_size when using mpi4py.
The function returns
0
on a success.- Parameters:
mpi4py_size – [in] Function pointer to the mpi4py_size callback
-
int MDI_Set_Mpi4py_Barrier_Callback(int (*mpi4py_barrier)(int))#
Set the callback MDI uses for MPI_Barrier when using mpi4py.
The function returns
0
on a success.- Parameters:
mpi4py_barrier – [in] Function pointer to the mpi4py_barrier callback
-
int MDI_Set_Launch_Plugin_Callback(int (*launch_plugin)(void*, void*, void*, int))#
Set the callback MDI uses for MDI_Plugin_init when the driver is in Python.
The function returns
0
on a success.- Parameters:
launch_plugin – [in] Function pointer to the launch_plugin callback
-
int MDI_Set_plugin_language(int language, void *plugin_state)#
Set the language of an MDI plugin.
The function returns
0
on a success.- Parameters:
language – [in] Language of the plugin
-
int MDI_Set_language_execute_command(int (*execute_command)(void*, MDI_Comm, void*))#
Set the language execute_command function needed by a language wrapper.
The function returns
0
on a success.- Parameters:
execute_command – [in] Execute command callback
-
int MDI_Get_language_execute_command(MDI_Execute_command_callback_t *language_execute_command, MDI_Comm comm)#
Get the language execute_command function needed by a language wrapper.
The function returns a function pointer to the execute_command function.
- Parameters:
execute_command – [out] Execute command callback
comm – [in] MDI communicator
-
int MDI_Get_language_driver_callback(MDI_Driver_node_callback_f90_t *language_driver_callback)#
Get the language driver callback needed by a language wrapper.
The function returns a function pointer to the driver callback function.
- Parameters:
callback – [out] Driver callback
comm – [in] MDI communicator
-
int MDI_Set_language_driver_callback(MDI_Driver_node_callback_f90_t callback)#
Set the language-specific driver_callback function needed by a language wrapper.
The function returns
0
on a success.- Parameters:
callback – [in] Driver callback
Variables
-
const int MDI_MAJOR_VERSION = MDI_MAJOR_VERSION_#
MDI major version number.
-
const int MDI_MINOR_VERSION = MDI_MINOR_VERSION_#
MDI minor version number.
-
const int MDI_PATCH_VERSION = MDI_PATCH_VERSION_#
MDI patch version number.
-
const int MDI_COMMAND_LENGTH = MDI_COMMAND_LENGTH_#
length of an MDI command in characters
-
const int MDI_NAME_LENGTH = MDI_NAME_LENGTH_#
length of an MDI name in characters
-
const int MDI_LABEL_LENGTH = MDI_LABEL_LENGTH_#
length of an MDI label in characters
-
const MDI_Comm MDI_COMM_NULL = MDI_COMM_NULL_#
value of a null communicator
-
const int MDI_INT = MDI_INT_#
integer data type
-
const int MDI_INT8_T = MDI_INT8_T_#
int8_t data type
-
const int MDI_INT16_T = MDI_INT16_T_#
int16_t data type
-
const int MDI_INT32_T = MDI_INT32_T_#
int32_t data type
-
const int MDI_INT64_T = MDI_INT64_T_#
int64_t data type
-
const int MDI_UINT8_T = MDI_UINT8_T_#
uint8_t data type
-
const int MDI_UINT16_T = MDI_UINT16_T_#
uint16_t data type
-
const int MDI_UINT32_T = MDI_UINT32_T_#
uint32_t data type
-
const int MDI_UINT64_T = MDI_UINT64_T_#
uint64_t data type
-
const int MDI_DOUBLE = MDI_DOUBLE_#
double precision float data type
-
const int MDI_CHAR = MDI_CHAR_#
character data type
-
const int MDI_FLOAT = MDI_FLOAT_#
single precision float data type
-
const int MDI_BYTE = MDI_BYTE_#
character data type
-
const int MDI_TCP = MDI_TCP_#
TCP/IP communication method.
-
const int MDI_MPI = MDI_MPI_#
MPI communication method.
-
const int MDI_LINK = MDI_LINK_#
Library communication method (deprecated)
-
const int MDI_PLUGIN = MDI_LINK_#
Library communication method.
-
const int MDI_TEST = MDI_TEST_#
Test communication method.
-
const int MDI_DRIVER = MDI_DRIVER_#
Driver role type.
-
const int MDI_ENGINE = MDI_ENGINE_#
Engine role type.