Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[DOC] Fixed even more errors.
[simgrid.git] / src / smpi / smpi_replay.c
index 1f2d9a1..d92975d 100644 (file)
@@ -644,19 +644,15 @@ static void action_allToAll(const char *const *action) {
   int recv_size = parse_double(action[3]);
   MPI_Datatype MPI_CURRENT_TYPE2;
 
-  if(action[4]) {
+  if(action[4] && action[5]) {
     MPI_CURRENT_TYPE=decode_datatype(action[4]);
+    MPI_CURRENT_TYPE2=decode_datatype(action[5]);
   }
   else{
     MPI_CURRENT_TYPE=MPI_DEFAULT_TYPE;
-  }
-
-  if (action[5]){
-    MPI_CURRENT_TYPE2=decode_datatype(action[5]);
-  }
-  else {
     MPI_CURRENT_TYPE2=MPI_DEFAULT_TYPE;
   }
+
   void *send = smpi_get_tmp_sendbuffer(send_size*comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
   void *recv = smpi_get_tmp_recvbuffer(recv_size*comm_size* smpi_datatype_size(MPI_CURRENT_TYPE2));
 
@@ -756,7 +752,7 @@ static void action_gatherv(const char *const *action) {
   int i=0,recv_sum=0;
 
   MPI_Datatype MPI_CURRENT_TYPE2;
-  if(action[4+comm_size]) {
+  if(action[4+comm_size] && action[5+comm_size]) {
     MPI_CURRENT_TYPE=decode_datatype(action[4+comm_size]);
     MPI_CURRENT_TYPE2=decode_datatype(action[5+comm_size]);
   } else {
@@ -884,9 +880,9 @@ static void action_allgather(const char *const *action) {
 
   MPI_Datatype MPI_CURRENT_TYPE2;
 
-  if(action[4]) {
-    MPI_CURRENT_TYPE = decode_datatype(action[3]);
-    MPI_CURRENT_TYPE2 = decode_datatype(action[4]);
+  if(action[4] && action[5]) {
+    MPI_CURRENT_TYPE = decode_datatype(action[4]);
+    MPI_CURRENT_TYPE2 = decode_datatype(action[5]);
   } else {
     MPI_CURRENT_TYPE = MPI_DEFAULT_TYPE;
     MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;