Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve behavior of SD_application_reinit. Now, you can schedule tasks
[simgrid.git] / src / smpi / smpi_pmpi.c
index abd6b90..1e4dc07 100644 (file)
@@ -897,9 +897,10 @@ int PMPI_Request_free(MPI_Request * request)
   int retval;
 
   smpi_bench_end();
-  if (request == MPI_REQUEST_NULL) {
+  if (*request == MPI_REQUEST_NULL) {
     retval = MPI_ERR_ARG;
   } else {
+    if((*request)->flags & PERSISTENT)(*request)->refcount--;
     smpi_mpi_request_free(request);
     retval = MPI_SUCCESS;
   }
@@ -2070,6 +2071,12 @@ int PMPI_Error_class(int errorcode, int* errorclass) {
   return MPI_SUCCESS;
 }
 
+
+int PMPI_Initialized(int* flag) {
+   *flag=(smpi_process_data()!=NULL);
+   return MPI_SUCCESS;
+}
+
 /* The following calls are not yet implemented and will fail at runtime. */
 /* Once implemented, please move them above this notice. */
 
@@ -2282,6 +2289,4 @@ int PMPI_Dims_create(int nnodes, int ndims, int* dims) {
    return not_yet_implemented();
 }
 
-int PMPI_Initialized(int* flag) {
-   return not_yet_implemented();
-}
+