Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement MPI_Comm_test_inter.
authorAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 09:19:47 +0000 (11:19 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 18:03:31 +0000 (20:03 +0200)
Answer is no, as we don't support intercommunicators.

src/smpi/bindings/smpi_mpi.cpp
src/smpi/bindings/smpi_pmpi_comm.cpp

index 62bfcaf..2777e0d 100644 (file)
@@ -137,6 +137,7 @@ WRAPPED_PMPI_CALL_ERRHANDLER_COMM(int,MPI_Comm_size,(MPI_Comm comm, int *size),(
 WRAPPED_PMPI_CALL_ERRHANDLER_COMM(int,MPI_Comm_split,(MPI_Comm comm, int color, int key, MPI_Comm* comm_out),(comm, color, key, comm_out))
 WRAPPED_PMPI_CALL_ERRHANDLER_COMM(int,MPI_Comm_split_type,(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm),(comm, split_type, key, info, newcomm))
 WRAPPED_PMPI_CALL_ERRHANDLER_COMM(int,MPI_Comm_create_group,(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm* comm_out),(comm, group, tag, comm_out))
+WRAPPED_PMPI_CALL_ERRHANDLER_COMM(int,MPI_Comm_test_inter,(MPI_Comm comm, int* flag) ,(comm, flag))
 WRAPPED_PMPI_CALL_ERRHANDLER_COMM(int,MPI_Comm_call_errhandler,(MPI_Comm comm,int errorcode),(comm, errorcode))
 WRAPPED_PMPI_CALL(int,MPI_Comm_create_errhandler,( MPI_Comm_errhandler_fn *function, MPI_Errhandler *errhandler),( function, errhandler))
 WRAPPED_PMPI_CALL_ERRHANDLER_COMM(int,MPI_Comm_get_errhandler,(MPI_Comm comm, MPI_Errhandler* errhandler) ,(comm, errhandler))
@@ -407,7 +408,6 @@ UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_remote_group,(MPI_Comm comm, MPI_Gr
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_remote_size,(MPI_Comm comm, int* size) ,(comm, size))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_spawn,(const char *command, char **argv, int maxprocs, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *intercomm, int* array_of_errcodes),( command, argv, maxprocs, info, root, comm, intercomm, array_of_errcodes))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_spawn_multiple,(int count, char **array_of_commands, char*** array_of_argv, int* array_of_maxprocs, MPI_Info* array_of_info, int root, MPI_Comm comm, MPI_Comm *intercomm, int* array_of_errcodes), (count, array_of_commands, array_of_argv, array_of_maxprocs, array_of_info, root, comm, intercomm, array_of_errcodes))
-UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Comm_test_inter,(MPI_Comm comm, int* flag) ,(comm, flag))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int, MPI_Dist_graph_create, (MPI_Comm comm_old, int n, const int* sources, const int* degrees, const int* destinations, const int* weights, MPI_Info info, int reorder, MPI_Comm* comm_dist_graph), (comm_old, n, sources, degrees, destinations, weights, info, reorder, comm_dist_graph))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int, MPI_Dist_graph_create_adjacent, (MPI_Comm comm_old, int indegree, const int* sources, const int* sourceweights, int outdegree, const int* destinations, const int* destweights, MPI_Info info, int reorder, MPI_Comm* comm_dist_graph), (comm_old, indegree, sources, sourceweights, outdegree, destinations, destweights, info, reorder, comm_dist_graph))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int, MPI_Dist_graph_neighbors, (MPI_Comm comm, int maxindegree, int* sources, int* sourceweights, int maxoutdegree, int* destinations, int* destweights), (comm, maxindegree, sources, sourceweights, maxoutdegree, destinations, destweights))
index 0057999..4b17184 100644 (file)
@@ -208,6 +208,13 @@ int PMPI_Comm_free_keyval(int* keyval) {
   return PMPI_Keyval_free(keyval);
 }
 
+int PMPI_Comm_test_inter(MPI_Comm comm, int* flag){
+  if(flag == nullptr)
+    return MPI_ERR_ARG;
+  *flag=false;
+  return MPI_SUCCESS;
+}
+
 int PMPI_Attr_delete(MPI_Comm comm, int keyval) {
   CHECK_COMM(1)
   if(keyval == MPI_TAG_UB||keyval == MPI_HOST||keyval == MPI_IO ||keyval == MPI_WTIME_IS_GLOBAL||keyval == MPI_APPNUM