This source file includes following definitions.
- ompi_comm_dup_with_info_f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #include "ompi_config.h"
26
27 #include "ompi/mpi/fortran/mpif-h/bindings.h"
28
29 #if OMPI_BUILD_MPI_PROFILING
30 #if OPAL_HAVE_WEAK_SYMBOLS
31 #pragma weak PMPI_COMM_DUP_WITH_INFO = ompi_comm_dup_with_info_f
32 #pragma weak pmpi_comm_dup_with_info = ompi_comm_dup_with_info_f
33 #pragma weak pmpi_comm_dup_with_info_ = ompi_comm_dup_with_info_f
34 #pragma weak pmpi_comm_dup_with_info__ = ompi_comm_dup_with_info_f
35
36 #pragma weak PMPI_Comm_dup_with_info_f = ompi_comm_dup_with_info_f
37 #pragma weak PMPI_Comm_dup_with_info_f08 = ompi_comm_dup_with_info_f
38 #else
39 OMPI_GENERATE_F77_BINDINGS (PMPI_COMM_DUP_WITH_INFO,
40 pmpi_comm_dup_with_info,
41 pmpi_comm_dup_with_info_,
42 pmpi_comm_dup_with_info__,
43 pompi_comm_dup_with_info_f,
44 (MPI_Fint *comm, MPI_Fint *info, MPI_Fint *newcomm, MPI_Fint *ierr),
45 (comm, info, newcomm, ierr) )
46 #endif
47 #endif
48
49 #if OPAL_HAVE_WEAK_SYMBOLS
50 #pragma weak MPI_COMM_DUP_WITH_INFO = ompi_comm_dup_with_info_f
51 #pragma weak mpi_comm_dup_with_info = ompi_comm_dup_with_info_f
52 #pragma weak mpi_comm_dup_with_info_ = ompi_comm_dup_with_info_f
53 #pragma weak mpi_comm_dup_with_info__ = ompi_comm_dup_with_info_f
54
55 #pragma weak MPI_Comm_dup_with_info_f = ompi_comm_dup_with_info_f
56 #pragma weak MPI_Comm_dup_with_info_f08 = ompi_comm_dup_with_info_f
57 #else
58 #if ! OMPI_BUILD_MPI_PROFILING
59 OMPI_GENERATE_F77_BINDINGS (MPI_COMM_DUP_WITH_INFO,
60 mpi_comm_dup_with_info,
61 mpi_comm_dup_with_info_,
62 mpi_comm_dup_with_info__,
63 ompi_comm_dup_with_info_f,
64 (MPI_Fint *comm, MPI_Fint *info, MPI_Fint *newcomm, MPI_Fint *ierr),
65 (comm, info, newcomm, ierr) )
66 #else
67 #define ompi_comm_dup_with_info_f pompi_comm_dup_with_info_f
68 #endif
69 #endif
70
71
72 void ompi_comm_dup_with_info_f(MPI_Fint *comm, MPI_Fint *info, MPI_Fint *newcomm, MPI_Fint *ierr)
73 {
74 int c_ierr;
75 MPI_Comm c_newcomm;
76 MPI_Comm c_comm = PMPI_Comm_f2c(*comm);
77 MPI_Info c_info;
78
79 c_info = PMPI_Info_f2c(*info);
80
81 c_ierr = PMPI_Comm_dup_with_info(c_comm, c_info, &c_newcomm);
82 if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
83
84 if (MPI_SUCCESS == c_ierr) {
85 *newcomm = PMPI_Comm_c2f(c_newcomm);
86 }
87 }