Lightweight Parallel Foundations
1.0.1-alpha 2023-06-26T11:02:34Z
A high performance and model-compliant communication layer
home
yzelman
Documents
lpf
include
lpf
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
25
extern
"C"
{
26
#endif
27
56
extern
const
int
LPF_MPI_AUTO_INITIALIZE
;
57
58
77
lpf_err_t
lpf_mpi_initialize_with_mpicomm
( MPI_Comm comm,
lpf_init_t
* init );
78
116
lpf_err_t
lpf_mpi_initialize_over_tcp
(
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
*/
135
lpf_err_t
lpf_mpi_finalize
(
lpf_init_t
init );
136
144
#ifdef __cplusplus
145
}
146
#endif
147
148
#endif
core.h
lpf_init_t
typedef lpf_init_t
Definition:
core.h:919
lpf_pid_t
typedef lpf_pid_t
Definition:
core.h:786
lpf_err_t
typedef lpf_err_t
Definition:
core.h:871
LPF_MPI_AUTO_INITIALIZE
const int LPF_MPI_AUTO_INITIALIZE
lpf_mpi_initialize_over_tcp
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_mpi_finalize
lpf_err_t lpf_mpi_finalize(lpf_init_t init)
lpf_mpi_initialize_with_mpicomm
lpf_err_t lpf_mpi_initialize_with_mpicomm(MPI_Comm comm, lpf_init_t *init)
mpi.h
Generated by
1.9.6