2004-01-25 04:51:49 +03:00
|
|
|
/*
|
|
|
|
* $HEADERS$
|
|
|
|
*/
|
|
|
|
#include "lam_config.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "mpi.h"
|
|
|
|
#include "mpi/interface/c/bindings.h"
|
2004-02-27 22:22:14 +03:00
|
|
|
#include "mpi/group/group.h"
|
2004-01-25 04:51:49 +03:00
|
|
|
|
|
|
|
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
|
|
|
#pragma weak MPI_Group_f2c = PMPI_Group_f2c
|
|
|
|
#endif
|
|
|
|
|
2004-02-27 22:22:14 +03:00
|
|
|
MPI_Group MPI_Group_f2c(MPI_Fint group_f) {
|
|
|
|
/* local variable */
|
|
|
|
lam_group_t *group_c;
|
|
|
|
int group_index;
|
|
|
|
|
|
|
|
group_index=(int)group_f;
|
|
|
|
|
|
|
|
/* error checks */
|
|
|
|
if( MPI_PARAM_CHECK ) {
|
|
|
|
if( 0 > group_index ) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
if( group_index >= lam_group_f_to_c_table->size ) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
group_c=lam_group_f_to_c_table->addr[group_index];
|
|
|
|
|
|
|
|
return (MPI_Group) group_c;
|
2004-01-25 04:51:49 +03:00
|
|
|
}
|