This source file includes following definitions.
- ompi_comm_get_info_f
1
2
3
4
5
6
7
8
9
10
11
12 #include "ompi_config.h"
13
14 #include "ompi/mpi/fortran/mpif-h/bindings.h"
15 #include "ompi/attribute/attribute.h"
16 #include "ompi/communicator/communicator.h"
17
18 #if OMPI_BUILD_MPI_PROFILING
19 #if OPAL_HAVE_WEAK_SYMBOLS
20 #pragma weak PMPI_COMM_GET_INFO = ompi_comm_get_info_f
21 #pragma weak pmpi_comm_get_info = ompi_comm_get_info_f
22 #pragma weak pmpi_comm_get_info_ = ompi_comm_get_info_f
23 #pragma weak pmpi_comm_get_info__ = ompi_comm_get_info_f
24
25 #pragma weak PMPI_Comm_get_info_f = ompi_comm_get_info_f
26 #pragma weak PMPI_Comm_get_info_f08 = ompi_comm_get_info_f
27 #else
28 OMPI_GENERATE_F77_BINDINGS (PMPI_COMM_GET_INFO,
29 pmpi_comm_get_info,
30 pmpi_comm_get_info_,
31 pmpi_comm_get_info__,
32 pompi_comm_get_info_f,
33 (MPI_Fint *comm, MPI_Fint *info_used, MPI_Fint *ierr),
34 (comm, info_used, ierr) )
35 #endif
36 #endif
37
38 #if OPAL_HAVE_WEAK_SYMBOLS
39 #pragma weak MPI_COMM_GET_INFO = ompi_comm_get_info_f
40 #pragma weak mpi_comm_get_info = ompi_comm_get_info_f
41 #pragma weak mpi_comm_get_info_ = ompi_comm_get_info_f
42 #pragma weak mpi_comm_get_info__ = ompi_comm_get_info_f
43
44 #pragma weak MPI_Comm_get_info_f = ompi_comm_get_info_f
45 #pragma weak MPI_Comm_get_info_f08 = ompi_comm_get_info_f
46 #else
47 #if ! OMPI_BUILD_MPI_PROFILING
48 OMPI_GENERATE_F77_BINDINGS (MPI_COMM_GET_INFO,
49 mpi_comm_get_info,
50 mpi_comm_get_info_,
51 mpi_comm_get_info__,
52 ompi_comm_get_info_f,
53 (MPI_Fint *comm, MPI_Fint *info_used, MPI_Fint *ierr),
54 (comm, info_used, ierr) )
55 #else
56 #define ompi_comm_get_info_f pompi_comm_get_info_f
57 #endif
58 #endif
59
60
61 void ompi_comm_get_info_f(MPI_Fint *comm, MPI_Fint *info_used, MPI_Fint *ierr)
62 {
63 int c_ierr;
64 MPI_Comm c_comm = PMPI_Comm_f2c(*comm);
65 MPI_Info c_info;
66
67 c_ierr = PMPI_Comm_get_info(c_comm, &c_info);
68 if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
69
70 if (MPI_SUCCESS == c_ierr) {
71 *info_used = PMPI_Info_c2f(c_info);
72 }
73 }