diff --git a/src/mpi/f77/comm_compare_f.c b/src/mpi/f77/comm_compare_f.c index f3ca18f7e1..1a7a214b5f 100644 --- a/src/mpi/f77/comm_compare_f.c +++ b/src/mpi/f77/comm_compare_f.c @@ -48,5 +48,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_COMPARE, void mpi_comm_compare_f(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Comm c_comm1 = MPI_Comm_f2c ( *comm1 ); + MPI_Comm c_comm2 = MPI_Comm_f2c ( *comm2 ); + + *ierr = MPI_Comm_compare ( c_comm1, c_comm2, result ); } diff --git a/src/mpi/f77/comm_create_f.c b/src/mpi/f77/comm_create_f.c index 1fa4d0fc60..984b1a22a3 100644 --- a/src/mpi/f77/comm_create_f.c +++ b/src/mpi/f77/comm_create_f.c @@ -48,5 +48,10 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_CREATE, void mpi_comm_create_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Comm c_newcomm; + MPI_Comm c_comm = MPI_Comm_f2c (*comm); + MPI_Group c_group = MPI_Group_f2c(*group); + + *ierr = MPI_Comm_create (c_comm, c_group, &c_newcomm); + *newcomm = MPI_Comm_c2f (c_newcomm); } diff --git a/src/mpi/f77/comm_dup_f.c b/src/mpi/f77/comm_dup_f.c index f17b925370..f3796740ca 100644 --- a/src/mpi/f77/comm_dup_f.c +++ b/src/mpi/f77/comm_dup_f.c @@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_DUP, void mpi_comm_dup_f(MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Comm c_newcomm; + MPI_Comm c_comm = MPI_Comm_f2c( *comm ); + + *ierr = MPI_Comm_dup ( c_comm, &c_newcomm ); + *newcomm = MPI_Comm_c2f (c_newcomm); } diff --git a/src/mpi/f77/comm_free_f.c b/src/mpi/f77/comm_free_f.c index f89bf12ee3..9787748027 100644 --- a/src/mpi/f77/comm_free_f.c +++ b/src/mpi/f77/comm_free_f.c @@ -48,5 +48,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_FREE, void mpi_comm_free_f(MPI_Fint *comm, MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Comm c_comm = MPI_Comm_f2c (*comm); + + *ierr = MPI_Comm_free ( &c_comm ); + *comm = MPI_Comm_c2f (c_comm); } diff --git a/src/mpi/f77/comm_group_f.c b/src/mpi/f77/comm_group_f.c index f0b83c54d7..e1052feccb 100644 --- a/src/mpi/f77/comm_group_f.c +++ b/src/mpi/f77/comm_group_f.c @@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_GROUP, void mpi_comm_group_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Group c_group; + MPI_Comm c_comm = MPI_Comm_f2c( *comm ); + + *ierr = MPI_Comm_group( c_comm, &c_group); + *group = MPI_Group_c2f (c_group); } diff --git a/src/mpi/f77/comm_remote_group_f.c b/src/mpi/f77/comm_remote_group_f.c index e065562657..35a5eb5ebb 100644 --- a/src/mpi/f77/comm_remote_group_f.c +++ b/src/mpi/f77/comm_remote_group_f.c @@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_REMOTE_GROUP, void mpi_comm_remote_group_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Group c_group; + MPI_Comm c_comm = MPI_Comm_f2c ( *comm ); + + *ierr = MPI_Comm_remote_group ( c_comm, &c_group ); + *group = MPI_Group_c2f (c_group); } diff --git a/src/mpi/f77/comm_remote_size_f.c b/src/mpi/f77/comm_remote_size_f.c index f8f7ab709a..3c6b3345ba 100644 --- a/src/mpi/f77/comm_remote_size_f.c +++ b/src/mpi/f77/comm_remote_size_f.c @@ -48,5 +48,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_REMOTE_SIZE, void mpi_comm_remote_size_f(MPI_Fint *comm, MPI_Fint *size, MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Comm c_comm = MPI_Comm_f2c ( *comm ); + + *ierr = MPI_Comm_remote_size ( c_comm, size ); } diff --git a/src/mpi/f77/comm_split_f.c b/src/mpi/f77/comm_split_f.c index 8f90cf3161..341cdbce31 100644 --- a/src/mpi/f77/comm_split_f.c +++ b/src/mpi/f77/comm_split_f.c @@ -46,7 +46,12 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_SPLIT, #include "mpi/f77/profile/defines.h" #endif -void mpi_comm_split_f(MPI_Fint *comm, MPI_Fint *color, MPI_Fint *key, MPI_Fint *newcomm, MPI_Fint *ierr) +void mpi_comm_split_f(MPI_Fint *comm, MPI_Fint *color, MPI_Fint *key, MPI_Fint *newcomm, + MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Comm c_newcomm; + MPI_Comm c_comm = MPI_Comm_f2c ( *comm ); + + *ierr = MPI_Comm_split ( c_comm, (int) color, (int) key, &c_newcomm ); + *newcomm = MPI_Comm_c2f (c_newcomm); } diff --git a/src/mpi/f77/comm_test_inter_f.c b/src/mpi/f77/comm_test_inter_f.c index 23a83f412c..609bc70b3a 100644 --- a/src/mpi/f77/comm_test_inter_f.c +++ b/src/mpi/f77/comm_test_inter_f.c @@ -48,5 +48,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_TEST_INTER, void mpi_comm_test_inter_f(MPI_Fint *comm, MPI_Fint *flag, MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Comm c_comm = MPI_Comm_f2c ( *comm ); + + *ierr = MPI_Comm_test_inter ( c_comm, flag ); } diff --git a/src/mpi/f77/intercomm_create_f.c b/src/mpi/f77/intercomm_create_f.c index 789a5ed0ee..4323f2c2bc 100644 --- a/src/mpi/f77/intercomm_create_f.c +++ b/src/mpi/f77/intercomm_create_f.c @@ -46,7 +46,15 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INTERCOMM_CREATE, #include "mpi/f77/profile/defines.h" #endif -void mpi_intercomm_create_f(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) +void mpi_intercomm_create_f(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) { - /* This function not yet implemented */ + MPI_Comm c_newcomm; + MPI_Comm c_local_comm = MPI_Comm_f2c (*local_comm ); + MPI_Comm c_bridge_comm = MPI_Comm_f2c (*bridge_comm); + + *ierr = MPI_Intercomm_create ( c_local_comm, (int) *local_leader, c_bridge_comm, + (int) *remote_leader, (int) *tag, &c_newcomm ); + *newintercomm = MPI_Comm_c2f (c_newcomm); } diff --git a/src/mpi/f77/intercomm_merge_f.c b/src/mpi/f77/intercomm_merge_f.c index c71393f145..ba1d264bf6 100644 --- a/src/mpi/f77/intercomm_merge_f.c +++ b/src/mpi/f77/intercomm_merge_f.c @@ -46,7 +46,12 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INTERCOMM_MERGE, #include "mpi/f77/profile/defines.h" #endif -void mpi_intercomm_merge_f(MPI_Fint *intercomm, MPI_Fint *high, MPI_Fint *newintercomm, MPI_Fint *ierr) +void mpi_intercomm_merge_f(MPI_Fint *intercomm, MPI_Fint *high, MPI_Fint *newintracomm, + MPI_Fint *ierr) { - /* This function not yet implemented */ + MPI_Comm c_newcomm; + MPI_Comm c_intercomm = MPI_Comm_f2c(*intercomm); + + *ierr = MPI_Intercomm_merge (c_intercomm, (int) *high, &c_newcomm ); + *newintracomm = MPI_Comm_c2f (c_newcomm); }