Dynamic Load Balance 3.6.1+32-59d1
mpi_core.h
Go to the documentation of this file.
1/*********************************************************************************/
2/* Copyright 2009-2025 Barcelona Supercomputing Center */
3/* */
4/* This file is part of the DLB library. */
5/* */
6/* DLB is free software: you can redistribute it and/or modify */
7/* it under the terms of the GNU Lesser General Public License as published by */
8/* the Free Software Foundation, either version 3 of the License, or */
9/* (at your option) any later version. */
10/* */
11/* DLB is distributed in the hope that it will be useful, */
12/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14/* GNU Lesser General Public License for more details. */
15/* */
16/* You should have received a copy of the GNU Lesser General Public License */
17/* along with DLB. If not, see <https://www.gnu.org/licenses/>. */
18/*********************************************************************************/
19
20#ifndef HANDLE_MPI_H
21#define HANDLE_MPI_H
22
23#include "mpi/mpi_calls_coded.h"
24
25#include <unistd.h>
26#include <mpi.h>
27
28extern int _mpi_rank; /* MPI rank */
29extern int _mpi_size; /* MPI size */
30extern int _node_id; /* Node ID */
31extern int _num_nodes; /* Number of nodes */
32extern int _process_id; /* Process ID per node */
33extern int _mpis_per_node; /* Numer of MPI processes per node */
34
35void before_mpi(mpi_call_t mpi_call);
36void after_mpi(mpi_call_t mpi_call);
37int is_mpi_ready(void);
38void finalize_mpi_core(void);
39MPI_Comm getWorldComm(void);
40MPI_Comm getNodeComm(void);
41MPI_Comm getInterNodeComm(void);
42MPI_Datatype get_mpi_int64_type(void);
43
44#endif /* HANDLE_MPI_H */
int _mpis_per_node
Definition: mpi_core.c:46
void finalize_mpi_core(void)
Definition: mpi_core.c:307
MPI_Datatype get_mpi_int64_type(void)
Definition: mpi_core.c:327
void before_mpi(mpi_call_t mpi_call)
Definition: mpi_core.c:239
int _process_id
Definition: mpi_core.c:49
int _mpi_size
Definition: mpi_core.c:45
int _num_nodes
Definition: mpi_core.c:48
int _mpi_rank
Definition: mpi_core.c:44
void after_mpi(mpi_call_t mpi_call)
Definition: mpi_core.c:269
MPI_Comm getWorldComm(void)
Definition: mpi_core.c:315
int _node_id
Definition: mpi_core.c:47
MPI_Comm getNodeComm(void)
Definition: mpi_core.c:319
MPI_Comm getInterNodeComm(void)
Definition: mpi_core.c:323
int is_mpi_ready(void)
Definition: mpi_core.c:302