Added fortran to c sections when needed.
Reviewer: Tim Woodall This commit was SVN r1183.
Этот коммит содержится в:
родитель
5baf8cb46b
Коммит
5c60beffa4
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_DIFFERENCE = mpi_group_difference_f
|
||||
@ -48,5 +49,16 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_DIFFERENCE,
|
||||
|
||||
void mpi_group_difference_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgroup, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group1, *c_group2, *c_newgroup;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group1 = MPI_Group_f2c(*group1);
|
||||
c_group2 = MPI_Group_f2c(*group2);
|
||||
c_newgroup = MPI_Group_f2c(*newgroup);
|
||||
|
||||
*ierr = MPI_Group_difference(c_group1, c_group2, &c_newgroup);
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
if (*ierr == LAM_SUCCESS)
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_EXCL = mpi_group_excl_f
|
||||
@ -48,5 +49,14 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_EXCL,
|
||||
|
||||
void mpi_group_excl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranks, MPI_Fint *newgroup, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group, *c_newgroup;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group = MPI_Group_f2c(*group);
|
||||
c_newgroup = MPI_Group_f2c(*newgroup);
|
||||
|
||||
*ierr = MPI_Group_excl(c_group, *n, ranks, &c_newgroup);
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_FREE = mpi_group_free_f
|
||||
@ -48,5 +49,14 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_FREE,
|
||||
|
||||
void mpi_group_free_f(MPI_Fint *group, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group = MPI_Group_f2c(*group);
|
||||
|
||||
*ierr = MPI_Group_free( &c_group );
|
||||
|
||||
if(*ierr == LAM_SUCCESS)
|
||||
*group = 0;
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_INCL = mpi_group_incl_f
|
||||
@ -48,5 +49,15 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_INCL,
|
||||
|
||||
void mpi_group_incl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranks, MPI_Fint *newgroup, MPI_Fint *ierr)
|
||||
{
|
||||
/* local variables */
|
||||
lam_group_t *c_group, *c_newgroup;
|
||||
|
||||
/* make the fortran to c representation conversion */
|
||||
c_group = MPI_Group_f2c(*group);
|
||||
c_newgroup = MPI_Group_f2c(*newgroup);
|
||||
|
||||
*ierr = MPI_Group_incl(c_group, *ranks, n, &c_newgroup);
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_INTERSECTION = mpi_group_intersection_f
|
||||
@ -48,5 +49,15 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_INTERSECTION,
|
||||
|
||||
void mpi_group_intersection_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgroup, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group1, *c_group2, *c_newgroup;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group1 = MPI_Group_f2c(*group1);
|
||||
c_group2 = MPI_Group_f2c(*group2);
|
||||
c_newgroup = MPI_Group_f2c(*newgroup);
|
||||
|
||||
*ierr = MPI_Group_intersection(c_group1, c_group2, &c_newgroup);
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_RANGE_EXCL = mpi_group_range_excl_f
|
||||
@ -20,7 +21,7 @@ LAM_GENERATE_F77_BINDINGS (PMPI_GROUP_RANGE_EXCL,
|
||||
pmpi_group_range_excl_,
|
||||
pmpi_group_range_excl__,
|
||||
pmpi_group_range_excl_f,
|
||||
(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranges3, MPI_Fint *newgroup, MPI_Fint *ierr),
|
||||
(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3], MPI_Fint *newgroup, MPI_Fint *ierr),
|
||||
(group, n, ranges3, newgroup, ierr) )
|
||||
#endif
|
||||
|
||||
@ -37,7 +38,7 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_RANGE_EXCL,
|
||||
mpi_group_range_excl_,
|
||||
mpi_group_range_excl__,
|
||||
mpi_group_range_excl_f,
|
||||
(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranges3, MPI_Fint *newgroup, MPI_Fint *ierr),
|
||||
(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3], MPI_Fint *newgroup, MPI_Fint *ierr),
|
||||
(group, n, ranges3, newgroup, ierr) )
|
||||
#endif
|
||||
|
||||
@ -46,7 +47,16 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_RANGE_EXCL,
|
||||
#include "mpi/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_group_range_excl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranges3, MPI_Fint *newgroup, MPI_Fint *ierr)
|
||||
void mpi_group_range_excl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3], MPI_Fint *newgroup, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group, *c_newgroup;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group = MPI_Group_f2c(*group);
|
||||
c_newgroup = MPI_Group_f2c(*newgroup);
|
||||
|
||||
*ierr = MPI_Group_range_excl(c_group, *n, ranges, &c_newgroup);
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_RANGE_INCL = mpi_group_range_incl_f
|
||||
@ -20,8 +21,8 @@ LAM_GENERATE_F77_BINDINGS (PMPI_GROUP_RANGE_INCL,
|
||||
pmpi_group_range_incl_,
|
||||
pmpi_group_range_incl__,
|
||||
pmpi_group_range_incl_f,
|
||||
(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranges3, MPI_Fint *newgroup, MPI_Fint *ierr),
|
||||
(group, n, ranges3, newgroup, ierr) )
|
||||
(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3], MPI_Fint *newgroup, MPI_Fint *ierr),
|
||||
(group, n, ranges, newgroup, ierr) )
|
||||
#endif
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS
|
||||
@ -37,8 +38,8 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_RANGE_INCL,
|
||||
mpi_group_range_incl_,
|
||||
mpi_group_range_incl__,
|
||||
mpi_group_range_incl_f,
|
||||
(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranges3, MPI_Fint *newgroup, MPI_Fint *ierr),
|
||||
(group, n, ranges3, newgroup, ierr) )
|
||||
(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3], MPI_Fint *newgroup, MPI_Fint *ierr),
|
||||
(group, n, ranges, newgroup, ierr) )
|
||||
#endif
|
||||
|
||||
|
||||
@ -46,7 +47,17 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_RANGE_INCL,
|
||||
#include "mpi/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_group_range_incl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranges3, MPI_Fint *newgroup, MPI_Fint *ierr)
|
||||
void mpi_group_range_incl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3], MPI_Fint *newgroup, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group, *c_newgroup;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group = MPI_Group_f2c(*group);
|
||||
c_newgroup = MPI_Group_f2c(*newgroup);
|
||||
|
||||
*ierr = MPI_Group_range_incl(c_group, *n, ranges, &c_newgroup);
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_RANK = mpi_group_rank_f
|
||||
@ -48,5 +49,10 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_RANK,
|
||||
|
||||
void mpi_group_rank_f(MPI_Fint *group, MPI_Fint *rank, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group = MPI_Group_f2c(*group);
|
||||
|
||||
*ierr = MPI_Group_rank(c_group, rank);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_SIZE = mpi_group_size_f
|
||||
@ -48,5 +49,10 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_SIZE,
|
||||
|
||||
void mpi_group_size_f(MPI_Fint *group, MPI_Fint *size, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group = MPI_Group_f2c(*group);
|
||||
|
||||
*ierr = MPI_Group_size(c_group, size);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_TRANSLATE_RANKS = mpi_group_translate_ranks_f
|
||||
@ -48,5 +49,11 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_TRANSLATE_RANKS,
|
||||
|
||||
void mpi_group_translate_ranks_f(MPI_Fint *group1, MPI_Fint *n, MPI_Fint *ranks1, MPI_Fint *group2, MPI_Fint *ranks2, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group1, *c_group2;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group1 = MPI_Group_f2c(*group1);
|
||||
c_group2 = MPI_Group_f2c(*group2);
|
||||
|
||||
*ierr = MPI_Group_translate_ranks(c_group1, *n, ranks1, c_group2, ranks2);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "group/group.h"
|
||||
|
||||
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILE_LAYER
|
||||
#pragma weak PMPI_GROUP_UNION = mpi_group_union_f
|
||||
@ -48,5 +49,15 @@ LAM_GENERATE_F77_BINDINGS (MPI_GROUP_UNION,
|
||||
|
||||
void mpi_group_union_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgroup, MPI_Fint *ierr)
|
||||
{
|
||||
lam_group_t *c_group1, *c_group2, *c_newgroup;
|
||||
|
||||
/* Make the fortran to c representation conversion */
|
||||
c_group1 = MPI_Group_f2c(*group1);
|
||||
c_group2 = MPI_Group_f2c(*group2);
|
||||
c_newgroup = MPI_Group_f2c(*newgroup);
|
||||
|
||||
*ierr = MPI_Group_union(c_group1, c_group2, &c_newgroup);
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user