2004-03-17 02:19:39 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-03-17 02:19:39 +03:00
|
|
|
|
|
|
|
#include "mpi.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "mpi/f77/bindings.h"
|
|
|
|
#include "group/group.h"
|
2004-03-17 02:19:39 +03:00
|
|
|
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
2004-03-17 02:19:39 +03:00
|
|
|
#pragma weak PMPI_GROUP_COMPARE = mpi_group_compare_f
|
|
|
|
#pragma weak pmpi_group_compare = mpi_group_compare_f
|
|
|
|
#pragma weak pmpi_group_compare_ = mpi_group_compare_f
|
|
|
|
#pragma weak pmpi_group_compare__ = mpi_group_compare_f
|
2004-06-07 19:33:53 +04:00
|
|
|
#elif OMPI_PROFILE_LAYER
|
|
|
|
OMPI_GENERATE_F77_BINDINGS (PMPI_GROUP_COMPARE,
|
2004-03-18 17:17:23 +03:00
|
|
|
pmpi_group_compare,
|
|
|
|
pmpi_group_compare_,
|
|
|
|
pmpi_group_compare__,
|
|
|
|
pmpi_group_compare_f,
|
|
|
|
(MPI_Fint *group1, MPI_Fint *group2,
|
|
|
|
MPI_Fint *result, MPI_Fint *ierror),
|
|
|
|
(group1,group2,result,ierror))
|
2004-03-17 02:19:39 +03:00
|
|
|
#endif
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#if OMPI_HAVE_WEAK_SYMBOLS
|
2004-03-18 17:17:23 +03:00
|
|
|
#pragma weak MPI_GROUP_COMPARE = mpi_group_compare_f
|
|
|
|
#pragma weak mpi_group_compare = mpi_group_compare_f
|
|
|
|
#pragma weak mpi_group_compare_ = mpi_group_compare_f
|
|
|
|
#pragma weak mpi_group_compare__ = mpi_group_compare_f
|
2004-03-17 02:19:39 +03:00
|
|
|
#endif
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#if ! OMPI_PROFILE_LAYER && ! OMPI_HAVE_WEAK_SYMBOLS
|
|
|
|
OMPI_GENERATE_F77_BINDINGS (MPI_GROUP_COMPARE,
|
2004-03-18 17:17:23 +03:00
|
|
|
mpi_group_compare,
|
|
|
|
mpi_group_compare_,
|
|
|
|
mpi_group_compare__,
|
|
|
|
mpi_group_compare_f,
|
|
|
|
(MPI_Fint *group1, MPI_Fint *group2,
|
|
|
|
MPI_Fint *result, MPI_Fint *ierror),
|
|
|
|
(group1,group2,result,ierror))
|
2004-03-17 02:19:39 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-04-20 22:50:43 +04:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#if OMPI_PROFILE_LAYER && ! OMPI_HAVE_WEAK_SYMBOLS
|
2004-07-18 00:10:03 +04:00
|
|
|
#include "mpi/f77/profile/defines.h"
|
2004-04-20 22:50:43 +04:00
|
|
|
#endif
|
|
|
|
|
2004-03-18 17:17:23 +03:00
|
|
|
void mpi_group_compare_f(MPI_Fint *group1, MPI_Fint *group2,
|
|
|
|
MPI_Fint *result, MPI_Fint *ierror)
|
2004-03-17 02:19:39 +03:00
|
|
|
{
|
|
|
|
/* local variables */
|
|
|
|
int c_result, c_error;
|
2004-06-07 19:33:53 +04:00
|
|
|
ompi_group_t *c_group1, *c_group2;
|
2004-03-17 02:19:39 +03:00
|
|
|
|
|
|
|
/* make the fortran to c representation conversion */
|
2004-03-18 17:17:23 +03:00
|
|
|
c_group1 = MPI_Group_f2c(*group1);
|
|
|
|
c_group2 = MPI_Group_f2c(*group2);
|
2004-03-17 02:19:39 +03:00
|
|
|
|
|
|
|
c_error = MPI_Group_compare(c_group1, c_group2, &c_result);
|
|
|
|
|
|
|
|
/* translate the results from c to fortran */
|
2004-03-18 17:17:23 +03:00
|
|
|
*ierror = (MPI_Fint) c_error;
|
|
|
|
*result = (MPI_Fint) c_result;
|
2004-03-17 02:19:39 +03:00
|
|
|
}
|