Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_STATUS_IGNORE = null, actually.
authorAugustin Degomme <adegomme@users.noreply.github.com>
Tue, 10 Dec 2019 18:50:24 +0000 (19:50 +0100)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Tue, 10 Dec 2019 19:10:52 +0000 (20:10 +0100)
src/smpi/bindings/smpi_pmpi_file.cpp
src/smpi/mpi/smpi_file.cpp

index 7d3bfdb..ca7484f 100644 (file)
@@ -29,7 +29,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
   CHECK_BUFFER(2, buf, count)                                                                                          \
   CHECK_COUNT(3, count)                                                                                                \
   CHECK_TYPE(4, datatype)                                                                                              \
   CHECK_BUFFER(2, buf, count)                                                                                          \
   CHECK_COUNT(3, count)                                                                                                \
   CHECK_TYPE(4, datatype)                                                                                              \
-  CHECK_NULL(5, MPI_ERR_ARG, status)
 
 #define CHECK_FILE_INPUT_OFFSET                                                                                        \
   CHECK_FILE(1, fh)                                                                                                    \
 
 #define CHECK_FILE_INPUT_OFFSET                                                                                        \
   CHECK_FILE(1, fh)                                                                                                    \
@@ -37,7 +36,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
   CHECK_OFFSET(3, offset)                                                                                                 \
   CHECK_COUNT(4, count)                                                                                                \
   CHECK_TYPE(5, datatype)                                                                                              \
   CHECK_OFFSET(3, offset)                                                                                                 \
   CHECK_COUNT(4, count)                                                                                                \
   CHECK_TYPE(5, datatype)                                                                                              \
-  CHECK_NULL(6, MPI_ERR_ARG, status)
 
 extern MPI_Errhandler SMPI_default_File_Errhandler;
 
 
 extern MPI_Errhandler SMPI_default_File_Errhandler;
 
index c743cf9..966a5fc 100644 (file)
@@ -143,7 +143,8 @@ namespace smpi{
       fh->file_->seek(position+movesize, SEEK_SET);
     }
     XBT_VERB("Position after read in MPI_File %s : %llu",fh->file_->get_path(), fh->file_->tell());
       fh->file_->seek(position+movesize, SEEK_SET);
     }
     XBT_VERB("Position after read in MPI_File %s : %llu",fh->file_->get_path(), fh->file_->tell());
-    status->count=count*datatype->size();
+    if(status != MPI_STATUS_IGNORE)
+      status->count=count*datatype->size();
     return MPI_SUCCESS;
   }
 
     return MPI_SUCCESS;
   }
 
@@ -202,7 +203,8 @@ namespace smpi{
       fh->file_->seek(position+movesize, SEEK_SET);
     }
     XBT_VERB("Position after write in MPI_File %s : %llu",fh->file_->get_path(), fh->file_->tell());
       fh->file_->seek(position+movesize, SEEK_SET);
     }
     XBT_VERB("Position after write in MPI_File %s : %llu",fh->file_->get_path(), fh->file_->tell());
-    status->count=count*datatype->size();
+    if(status != MPI_STATUS_IGNORE)
+      status->count=count*datatype->size();
     return MPI_SUCCESS;
   }
 
     return MPI_SUCCESS;
   }