Line |
Branch |
Exec |
Source |
1 |
|
|
/*********************************************************************************/ |
2 |
|
|
/* Copyright 2009-2021 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 |
|
|
#include "apis/dlb.h" |
21 |
|
|
#include "support/debug.h" |
22 |
|
|
|
23 |
|
|
#define DLB_API_F_ALIAS( NameF, Params) \ |
24 |
|
|
void NameF##_ Params __attribute__((alias(#NameF))); \ |
25 |
|
|
void NameF##__ Params __attribute__((alias(#NameF))) |
26 |
|
|
|
27 |
|
|
#pragma GCC visibility push(default) |
28 |
|
|
|
29 |
|
|
#ifdef MPI_LIB |
30 |
|
|
#include <mpi.h> |
31 |
|
|
#include "LB_MPI/process_MPI.h" |
32 |
|
|
void mpi_barrier_(MPI_Comm *, int *) __attribute__((weak)); |
33 |
|
|
void dlb_mpi_node_barrier(void) { |
34 |
|
|
if (is_mpi_ready()) { |
35 |
|
|
int ierror; |
36 |
|
|
MPI_Comm mpi_comm_node = getNodeComm(); |
37 |
|
|
if (mpi_barrier_) { |
38 |
|
|
mpi_barrier_(&mpi_comm_node, &ierror); |
39 |
|
|
} else { |
40 |
|
|
warning("MPI_Barrier symbol could not be found. Please report a ticket."); |
41 |
|
|
} |
42 |
|
|
} |
43 |
|
|
} |
44 |
|
|
#else |
45 |
|
✗ |
void dlb_mpi_node_barrier(void) {} |
46 |
|
|
#endif |
47 |
|
|
DLB_API_F_ALIAS(dlb_mpi_node_barrier, (void)); |
48 |
|
|
|
49 |
|
|
#pragma GCC visibility pop |
50 |
|
|
|