|
Lightweight Parallel Foundations 1.0.1-alpha 2023-06-26T11:02:34Z
A high performance and model-compliant communication layer
|

Functions | |
| lpf_err_t | lpf_mpi_initialize_with_mpicomm (MPI_Comm comm, lpf_init_t *init) |
| lpf_err_t | lpf_mpi_initialize_over_tcp (const char *server, const char *port, int timeout, lpf_pid_t pid, lpf_pid_t nprocs, lpf_init_t *init) |
| lpf_err_t | lpf_mpi_finalize (lpf_init_t init) |
Variables | |
| const int | LPF_MPI_AUTO_INITIALIZE |
| lpf_err_t lpf_mpi_initialize_with_mpicomm | ( | MPI_Comm | comm, |
| lpf_init_t * | init | ||
| ) |
Initialises a lpf_init_t object with an MPI communicator for use with lpf_hook(). This function must be called collectively by all processes in the MPI communicator. An obvious use for this function is to allow existing MPI applications to use LPF codes.
| [in] | comm | The MPI communicator |
| [out] | init | The lpf_init_t object that can be used through lpf_hook(). |
| lpf_err_t lpf_mpi_initialize_over_tcp | ( | const char * | server, |
| const char * | port, | ||
| int | timeout, | ||
| lpf_pid_t | pid, | ||
| lpf_pid_t | nprocs, | ||
| lpf_init_t * | init | ||
| ) |
Initialises a lpf_init_t object over TCP/IP for use with lpf_hook(). This function must be called collectively by nprocs processes. On each process the parameters must be the same, except pid which must be a unique number ranging from to 0 to nprocs - 1. An obvious use for this function is to allow an arbitrary application to use LPF code.
| [in] | server | The Internet host that will execute this function with pid = 0. |
| [in] | port | The port number that the server will use. |
| [in] | timeout | Maximum number of milliseconds allowed to establish connection. If any of the clients fails to connect within that timeout, an error is returned and the MPI runtime is left in undefined state. Do not call MPI_Finalize() and use _exit() or _Exit() to exit. |
| [in] | pid | The process identifier must be a number in the range from 0 to and inclusive nprocs - 1. This number must be unique among the processes that calls function. The process with pid = 0, must be located on the Internet host server. |
| [in] | nprocs | The number of processes that shall be part of init. |
| [out] | init | The lpf_init_t object that can be used through lpf_hook(). |
| lpf_err_t lpf_mpi_finalize | ( | lpf_init_t | init | ) |
|
extern |
Whether the LPF library should automatically initialize itself. If so, it calls MPI_Init() itself and pauses the processes with PID != 0 until a call to lpf_exec(). When disabled, the user code should call MPI_Init() and arrange for processes to call either lpf_mpi_initialize_with_mpicomm() or lpf_mpi_initialize_over_tcp(), followed by lpf_hook().