Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
have the smpif90 file replace the main program clause by our own for f90
[simgrid.git] / src / smpi / smpi_f77.c
index de9bc89..c181e6d 100644 (file)
@@ -79,7 +79,7 @@ void mpi_init__(int* ierr) {
    comm_lookup = xbt_dynar_new(sizeof(MPI_Comm), NULL);
    new_comm(MPI_COMM_WORLD);
 
-   request_lookup = xbt_dict_new();
+   request_lookup = xbt_dict_new_homogeneous(NULL);
 
    datatype_lookup = xbt_dynar_new(sizeof(MPI_Datatype), NULL);
    new_datatype(MPI_BYTE);
@@ -101,6 +101,9 @@ void mpi_init__(int* ierr) {
    new_datatype(MPI_UINT16_T);
    new_datatype(MPI_UINT32_T);
    new_datatype(MPI_UINT64_T);
+   new_datatype(MPI_2FLOAT);
+   new_datatype(MPI_2DOUBLE);
+
 
    op_lookup = xbt_dynar_new(sizeof(MPI_Op), NULL);
    new_op(MPI_MAX);
@@ -148,6 +151,10 @@ double mpi_wtime__(void) {
    return MPI_Wtime();
 }
 
+double mpi_wtick__(void) {
+  return MPI_Wtick();
+}
+
 void mpi_comm_dup__(int* comm, int* newcomm, int* ierr) {
   MPI_Comm tmp;
 
@@ -194,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;
@@ -304,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) {
@@ -311,6 +334,13 @@ void mpi_allgather__(void* sendbuf, int* sendcount, int* sendtype,
                         recvbuf, *recvcount, get_datatype(*recvtype), get_comm(*comm));
 }
 
+void mpi_allgatherv__(void* sendbuf, int* sendcount, int* sendtype,
+                     void* recvbuf, int* recvcount,int* displs, int* recvtype,
+                     int* comm, int* ierr) {
+  *ierr = MPI_Allgatherv(sendbuf, *sendcount, get_datatype(*sendtype),
+                        recvbuf, recvcount, displs, get_datatype(*recvtype), get_comm(*comm));
+}
+
 void mpi_scan__(void* sendbuf, void* recvbuf, int* count, int* datatype,
                 int* op, int* comm, int* ierr) {
   *ierr = MPI_Scan(sendbuf, recvbuf, *count, get_datatype(*datatype),
@@ -322,3 +352,32 @@ void mpi_alltoall__(void* sendbuf, int* sendcount, int* sendtype,
   *ierr = MPI_Alltoall(sendbuf, *sendcount, get_datatype(*sendtype),
                        recvbuf, *recvcount, get_datatype(*recvtype), get_comm(*comm));
 }
+
+void mpi_test__ (int * request, int *flag, MPI_Status * status, int* ierr){
+  MPI_Request req = find_request(*request);
+  *ierr= MPI_Test(&req, flag, status);
+}
+void mpi_get_processor_name__(char *name, int *resultlen, int* ierr){
+  *ierr = MPI_Get_processor_name(name, resultlen);
+}
+
+void mpi_get_count__(MPI_Status * status, int* datatype, int *count, int* ierr){
+  *ierr = MPI_Get_count(status, get_datatype(*datatype), count);
+}
+
+void mpi_type_extent__(int* datatype, MPI_Aint * extent, int* ierr){
+  *ierr= MPI_Type_extent(get_datatype(*datatype),  extent);
+}
+
+void mpi_type_ub__(int* datatype, MPI_Aint * disp, int* ierr){
+  *ierr= MPI_Type_ub(get_datatype(*datatype), disp);
+}
+
+void mpi_type_lb__(int* datatype, MPI_Aint * extent, int* ierr){
+  *ierr= MPI_Type_extent(get_datatype(*datatype), extent);
+}
+
+void mpi_type_size__(int* datatype, int *size, int* ierr)
+{
+  *ierr = MPI_Type_size(get_datatype(*datatype), size);
+}