Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add two functions to fortran bindings, needed by specfem
authorAugustin Degomme <degomme@idpann.imag.fr>
Wed, 28 Nov 2012 08:58:41 +0000 (09:58 +0100)
committerAugustin Degomme <degomme@idpann.imag.fr>
Fri, 30 Nov 2012 14:25:55 +0000 (15:25 +0100)
src/smpi/private.h
src/smpi/smpi_f77.c

index 4219adb..0898994 100644 (file)
@@ -286,6 +286,9 @@ void mpi_scatter__(void* sendbuf, int* sendcount, int* sendtype,
 void mpi_gather__(void* sendbuf, int* sendcount, int* sendtype,
                   void* recvbuf, int* recvcount, int* recvtype,
                   int* root, int* comm, int* ierr);
+void mpi_gatherv__(void* sendbuf, int* sendcount, int* sendtype,
+                  void* recvbuf, int* recvcounts, int* displs, int* recvtype,
+                  int* root, int* comm, int* ierr);
 void mpi_allgather__(void* sendbuf, int* sendcount, int* sendtype,
                      void* recvbuf, int* recvcount, int* recvtype,
                      int* comm, int* ierr);
@@ -304,5 +307,10 @@ void mpi_get_count__(MPI_Status * status, int* datatype, int *count, int* ierr);
 void mpi_type_extent__(int* datatype, MPI_Aint * extent, int* ierr);
 void mpi_type_lb__(int* datatype, MPI_Aint * extent, int* ierr);
 void mpi_type_ub__(int* datatype, MPI_Aint * extent, int* ierr);
+void mpi_sendrecv__(void* sendbuf, int* sendcount, int* sendtype, int* dst,
+                int* sendtag, void *recvbuf, int* recvcount,
+                int* recvtype, int* src, int* recvtag,
+                int* comm, MPI_Status* status, int* ierr);
+
 
 #endif
index ffe8916..c181e6d 100644 (file)
@@ -201,6 +201,15 @@ void mpi_send__(void* buf, int* count, int* datatype, int* dst,
                     get_comm(*comm));
 }
 
+void mpi_sendrecv__(void* sendbuf, int* sendcount, int* sendtype, int* dst,
+                int* sendtag, void *recvbuf, int* recvcount,
+                int* recvtype, int* src, int* recvtag,
+                int* comm, MPI_Status* status, int* ierr) {
+   *ierr = MPI_Sendrecv(sendbuf, *sendcount, get_datatype(*sendtype), *dst,
+       *sendtag, recvbuf, *recvcount,get_datatype(*recvtype), *src, *recvtag,
+       get_comm(*comm), status);
+}
+
 void mpi_recv_init__(void *buf, int* count, int* datatype, int* src, int* tag,
                      int* comm, int* request, int* ierr) {
   MPI_Request req;
@@ -311,6 +320,13 @@ void mpi_gather__(void* sendbuf, int* sendcount, int* sendtype,
                      recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
 }
 
+void mpi_gatherv__(void* sendbuf, int* sendcount, int* sendtype,
+                  void* recvbuf, int* recvcounts, int* displs, int* recvtype,
+                  int* root, int* comm, int* ierr) {
+  *ierr = MPI_Gatherv(sendbuf, *sendcount, get_datatype(*sendtype),
+                     recvbuf, recvcounts, displs, get_datatype(*recvtype), *root, get_comm(*comm));
+}
+
 void mpi_allgather__(void* sendbuf, int* sendcount, int* sendtype,
                      void* recvbuf, int* recvcount, int* recvtype,
                      int* comm, int* ierr) {