updating repository. Removing .Plo and .Po files that are generated automatically
[openmpi-llc.git] / ompi / mpi / f77 / group_intersection_f.c
blob5c4116dbb739379d609e9e42ca2f1b3d1a1565f6
1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * $COPYRIGHT$
14 * Additional copyrights may follow
16 * $HEADER$
19 #include "ompi_config.h"
21 #include "ompi/mpi/f77/bindings.h"
22 #include "ompi/group/group.h"
24 #if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
25 #pragma weak PMPI_GROUP_INTERSECTION = mpi_group_intersection_f
26 #pragma weak pmpi_group_intersection = mpi_group_intersection_f
27 #pragma weak pmpi_group_intersection_ = mpi_group_intersection_f
28 #pragma weak pmpi_group_intersection__ = mpi_group_intersection_f
29 #elif OMPI_PROFILE_LAYER
30 OMPI_GENERATE_F77_BINDINGS (PMPI_GROUP_INTERSECTION,
31 pmpi_group_intersection,
32 pmpi_group_intersection_,
33 pmpi_group_intersection__,
34 pmpi_group_intersection_f,
35 (MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgroup, MPI_Fint *ierr),
36 (group1, group2, newgroup, ierr) )
37 #endif
39 #if OMPI_HAVE_WEAK_SYMBOLS
40 #pragma weak MPI_GROUP_INTERSECTION = mpi_group_intersection_f
41 #pragma weak mpi_group_intersection = mpi_group_intersection_f
42 #pragma weak mpi_group_intersection_ = mpi_group_intersection_f
43 #pragma weak mpi_group_intersection__ = mpi_group_intersection_f
44 #endif
46 #if ! OMPI_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER
47 OMPI_GENERATE_F77_BINDINGS (MPI_GROUP_INTERSECTION,
48 mpi_group_intersection,
49 mpi_group_intersection_,
50 mpi_group_intersection__,
51 mpi_group_intersection_f,
52 (MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgroup, MPI_Fint *ierr),
53 (group1, group2, newgroup, ierr) )
54 #endif
57 #if OMPI_PROFILE_LAYER && ! OMPI_HAVE_WEAK_SYMBOLS
58 #include "ompi/mpi/f77/profile/defines.h"
59 #endif
61 void mpi_group_intersection_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgroup, MPI_Fint *ierr)
63 ompi_group_t *c_group1, *c_group2, *c_newgroup;
65 /* Make the fortran to c representation conversion */
66 c_group1 = MPI_Group_f2c(*group1);
67 c_group2 = MPI_Group_f2c(*group2);
69 *ierr = OMPI_INT_2_FINT(MPI_Group_intersection(c_group1, c_group2,
70 &c_newgroup));
72 /* translate the results from c to fortran */
73 if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
74 *newgroup = c_newgroup->grp_f_to_c_index;