Lightweight Parallel Foundations 1.0.1-alpha 2023-06-26T11:02:34Z
A high performance and model-compliant communication layer
mpi.h
Go to the documentation of this file.
1
2/*
3 * Copyright 2021 Huawei Technologies Co., Ltd.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef LPFLIB_MPI_H
19#define LPFLIB_MPI_H
20
21#include <lpf/core.h>
22#include <mpi.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
56extern const int LPF_MPI_AUTO_INITIALIZE ;
57
58
78
117 const char * server, const char * port, int timeout,
118 lpf_pid_t pid, lpf_pid_t nprocs,
119 lpf_init_t * init );
120
121
122/* Releases all resources associated with a #lpf_init_t object that was initialised using
123 * lpf_mpi_initialize_with_mpicomm(). This function must be called collectively by all
124 * processes that participated in the initialization.
125
126 * \param[in] init The #lpf_init_t object that was created through
127 * lpf_mpi_initialize_with_mpicomm().
128 *
129 * \returns #LPF_SUCCESS
130 * when resources were successfully released.
131 *
132 * \returns #LPF_ERR_FATAL
133 * when the system encountered an unrecoverable error.
134 */
136
144#ifdef __cplusplus
145}
146#endif
147
148#endif
typedef lpf_init_t
Definition: core.h:919
typedef lpf_pid_t
Definition: core.h:786
typedef lpf_err_t
Definition: core.h:871
const int LPF_MPI_AUTO_INITIALIZE
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)
lpf_err_t lpf_mpi_initialize_with_mpicomm(MPI_Comm comm, lpf_init_t *init)