This source file includes following definitions.
- ompi_intercomm_create_f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include "ompi_config.h"
23
24 #include "ompi/mpi/fortran/mpif-h/bindings.h"
25
26 #if OMPI_BUILD_MPI_PROFILING
27 #if OPAL_HAVE_WEAK_SYMBOLS
28 #pragma weak PMPI_INTERCOMM_CREATE = ompi_intercomm_create_f
29 #pragma weak pmpi_intercomm_create = ompi_intercomm_create_f
30 #pragma weak pmpi_intercomm_create_ = ompi_intercomm_create_f
31 #pragma weak pmpi_intercomm_create__ = ompi_intercomm_create_f
32
33 #pragma weak PMPI_Intercomm_create_f = ompi_intercomm_create_f
34 #pragma weak PMPI_Intercomm_create_f08 = ompi_intercomm_create_f
35 #else
36 OMPI_GENERATE_F77_BINDINGS (PMPI_INTERCOMM_CREATE,
37 pmpi_intercomm_create,
38 pmpi_intercomm_create_,
39 pmpi_intercomm_create__,
40 pompi_intercomm_create_f,
41 (MPI_Fint *local_comm, MPI_Fint *local_leader, MPI_Fint *bridge_comm, MPI_Fint *remote_leader, MPI_Fint *tag, MPI_Fint *newintercomm, MPI_Fint *ierr),
42 (local_comm, local_leader, bridge_comm, remote_leader, tag, newintercomm, ierr) )
43 #endif
44 #endif
45
46 #if OPAL_HAVE_WEAK_SYMBOLS
47 #pragma weak MPI_INTERCOMM_CREATE = ompi_intercomm_create_f
48 #pragma weak mpi_intercomm_create = ompi_intercomm_create_f
49 #pragma weak mpi_intercomm_create_ = ompi_intercomm_create_f
50 #pragma weak mpi_intercomm_create__ = ompi_intercomm_create_f
51
52 #pragma weak MPI_Intercomm_create_f = ompi_intercomm_create_f
53 #pragma weak MPI_Intercomm_create_f08 = ompi_intercomm_create_f
54 #else
55 #if ! OMPI_BUILD_MPI_PROFILING
56 OMPI_GENERATE_F77_BINDINGS (MPI_INTERCOMM_CREATE,
57 mpi_intercomm_create,
58 mpi_intercomm_create_,
59 mpi_intercomm_create__,
60 ompi_intercomm_create_f,
61 (MPI_Fint *local_comm, MPI_Fint *local_leader, MPI_Fint *bridge_comm, MPI_Fint *remote_leader, MPI_Fint *tag, MPI_Fint *newintercomm, MPI_Fint *ierr),
62 (local_comm, local_leader, bridge_comm, remote_leader, tag, newintercomm, ierr) )
63 #else
64 #define ompi_intercomm_create_f pompi_intercomm_create_f
65 #endif
66 #endif
67
68
69 void ompi_intercomm_create_f(MPI_Fint *local_comm, MPI_Fint *local_leader,
70 MPI_Fint *bridge_comm,
71 MPI_Fint *remote_leader, MPI_Fint *tag,
72 MPI_Fint *newintercomm,
73 MPI_Fint *ierr)
74 {
75 int c_ierr;
76 MPI_Comm c_newcomm;
77 MPI_Comm c_local_comm = PMPI_Comm_f2c (*local_comm );
78 MPI_Comm c_bridge_comm = PMPI_Comm_f2c (*bridge_comm);
79
80 c_ierr = PMPI_Intercomm_create(c_local_comm,
81 OMPI_FINT_2_INT(*local_leader),
82 c_bridge_comm,
83 OMPI_FINT_2_INT(*remote_leader),
84 OMPI_FINT_2_INT(*tag),
85 &c_newcomm);
86 if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
87
88 if (MPI_SUCCESS == c_ierr) {
89 *newintercomm = PMPI_Comm_c2f (c_newcomm);
90 }
91 }