Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix build
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 15 Feb 2019 14:50:43 +0000 (15:50 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 15 Feb 2019 14:50:43 +0000 (15:50 +0100)
src/kernel/activity/MailboxImpl.cpp
src/mc/mc_request.cpp
src/mc/mc_state.cpp
src/smpi/mpi/smpi_request.cpp

index 9aaa5e6..8ad9e02 100644 (file)
@@ -93,10 +93,10 @@ smx_activity_t MailboxImpl::iprobe(int type, int (*match_fun)(void*, void*, Comm
   CommImpl::Type smx_type;
   if (type == 1) {
     this_comm = CommImplPtr(new CommImpl(CommImpl::Type::SEND));
   CommImpl::Type smx_type;
   if (type == 1) {
     this_comm = CommImplPtr(new CommImpl(CommImpl::Type::SEND));
-    smx_type  = CommImpl::Type::SEND;
+    smx_type  = CommImpl::Type::RECEIVE;
   } else {
     this_comm = CommImplPtr(new CommImpl(CommImpl::Type::RECEIVE));
   } else {
     this_comm = CommImplPtr(new CommImpl(CommImpl::Type::RECEIVE));
-    smx_type  = CommImpl::Type::RECEIVE;
+    smx_type  = CommImpl::Type::SEND;
   }
   smx_activity_t other_synchro = nullptr;
   if (permanent_receiver_ != nullptr && not done_comm_queue_.empty()) {
   }
   smx_activity_t other_synchro = nullptr;
   if (permanent_receiver_ != nullptr && not done_comm_queue_.empty()) {
index d1d1409..0ac8355 100644 (file)
@@ -75,11 +75,11 @@ bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2)
         simcall_comm_wait__get__timeout(r2) <= 0)
       return false;
 
         simcall_comm_wait__get__timeout(r2) <= 0)
       return false;
 
-    if ((r1->call == SIMCALL_COMM_ISEND) && (synchro2->type == SIMIX_COMM_SEND) &&
+    if ((r1->call == SIMCALL_COMM_ISEND) && (synchro2->type == kernel::activity::CommImpl::Type::SEND) &&
         (synchro2->src_buff_ != simcall_comm_isend__get__src_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
       return false;
 
         (synchro2->src_buff_ != simcall_comm_isend__get__src_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
       return false;
 
-    if ((r1->call == SIMCALL_COMM_IRECV) && (synchro2->type == SIMIX_COMM_RECEIVE) &&
+    if ((r1->call == SIMCALL_COMM_IRECV) && (synchro2->type == kernel::activity::CommImpl::Type::RECEIVE) &&
         (synchro2->dst_buff_ != simcall_comm_irecv__get__dst_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
       return false;
   }
         (synchro2->dst_buff_ != simcall_comm_irecv__get__dst_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
       return false;
   }
index f18e7ea..a689df8 100644 (file)
@@ -117,7 +117,8 @@ static inline smx_simcall_t MC_state_get_request_for_process(simgrid::mc::State*
       simgrid::kernel::activity::CommImpl* act = temp_act.getBuffer();
       if (act->src_actor_.get() && act->dst_actor_.get())
         state->transition.argument = 0;
       simgrid::kernel::activity::CommImpl* act = temp_act.getBuffer();
       if (act->src_actor_.get() && act->dst_actor_.get())
         state->transition.argument = 0;
-      else if (act->src_actor_.get() == nullptr && act->type == SIMIX_COMM_READY && act->detached == 1)
+      else if (act->src_actor_.get() == nullptr && act->type == simgrid::kernel::activity::CommImpl::Type::READY &&
+               act->detached == 1)
         state->transition.argument = 0;
       else
         state->transition.argument = -1;
         state->transition.argument = 0;
       else
         state->transition.argument = -1;
index 9f1a9d8..f0f5184 100644 (file)
@@ -491,7 +491,7 @@ void Request::start()
           XBT_DEBUG("SSEND : Is there a corresponding recv already posted in the small mailbox %s?",
                     mailbox->get_cname());
           action = mailbox->iprobe(1, &match_send, static_cast<void*>(this));
           XBT_DEBUG("SSEND : Is there a corresponding recv already posted in the small mailbox %s?",
                     mailbox->get_cname());
           action = mailbox->iprobe(1, &match_send, static_cast<void*>(this));
-          if (action != nullptr) {
+          if (action == nullptr) {
             XBT_DEBUG("No, we are first, send to large mailbox");
             mailbox = process->mailbox();
           }
             XBT_DEBUG("No, we are first, send to large mailbox");
             mailbox = process->mailbox();
           }