Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 20 Mar 2017 15:15:44 +0000 (16:15 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 20 Mar 2017 15:15:44 +0000 (16:15 +0100)
examples/msg/cloud-migration/cloud-migration.tesh
examples/msg/cloud-simple/cloud-simple.tesh
src/plugins/vm/VirtualMachineImpl.cpp
src/xbt/xbt_os_thread.c

index 2c11900..3e06598 100644 (file)
@@ -1,24 +1,18 @@
 $ $SG_TEST_EXENV ${bindir:=.}/cloud-migration ${srcdir:=.}/small_platform.xml --log=no_loc "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (1:master_@Fafard) Test: Migrate a VM with 1000 Mbytes RAM
 > [  0.000000] (3:__pr_mig_tx:VM0(Fafard-Tremblay)@Fafard) use the default max_downtime value 30ms
-> [132.740093] (0:maestro@) FIXME: may need a proper handling, 1
 > [132.765801] (1:master_@Fafard) VM0 migrated: Fafard->Tremblay in 132.766 s
 > [132.765801] (1:master_@Fafard) Test: Migrate a VM with 100 Mbytes RAM
 > [132.765801] (5:__pr_mig_tx:VM0(Fafard-Tremblay)@Fafard) use the default max_downtime value 30ms
-> [146.086085] (0:maestro@) FIXME: may need a proper handling, 1
 > [146.111793] (1:master_@Fafard) VM0 migrated: Fafard->Tremblay in 13.346 s
 > [146.111793] (1:master_@Fafard) Test: Migrate two VMs at once from PM0 to PM1
 > [146.111793] (9:__pr_mig_tx:VM0(Fafard-Tremblay)@Fafard) use the default max_downtime value 30ms
 > [146.111793] (11:__pr_mig_tx:VM1(Fafard-Tremblay)@Fafard) use the default max_downtime value 30ms
-> [411.540563] (0:maestro@) FIXME: may need a proper handling, 1
-> [411.540563] (0:maestro@) FIXME: may need a proper handling, 1
 > [411.566271] (8:mig_wrk@Fafard) VM1 migrated: Fafard->Tremblay in 265.454 s
 > [411.566271] (6:mig_wrk@Fafard) VM0 migrated: Fafard->Tremblay in 265.454 s
 > [10146.111793] (1:master_@Fafard) Test: Migrate two VMs at once to different PMs
 > [10146.111793] (15:__pr_mig_tx:VM0(Fafard-Tremblay)@Fafard) use the default max_downtime value 30ms
 > [10146.111793] (17:__pr_mig_tx:VM1(Fafard-Bourassa)@Fafard) use the default max_downtime value 30ms
-> [10362.613818] (0:maestro@) FIXME: may need a proper handling, 1
 > [10362.620589] (14:mig_wrk@Fafard) VM1 migrated: Fafard->Bourassa in 216.509 s
-> [10411.521626] (0:maestro@) FIXME: may need a proper handling, 1
 > [10411.547334] (12:mig_wrk@Fafard) VM0 migrated: Fafard->Tremblay in 265.436 s
 > [20146.111793] (0:maestro@) Bye (simulation time 20146.1)
index aacc78f..1f719e8 100644 (file)
@@ -54,6 +54,5 @@ $ $SG_TEST_EXENV ${bindir:=.}/cloud-simple$EXEEXT --log=no_loc ${srcdir:=.}/smal
 > [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 49.010000] [msg_vm/WARNING] use the default max_downtime value 30ms
 > [Bourassa:comm_rx:(36) 49.204993] [msg_test/INFO] VM0:comm_tx to Bourassa:comm_rx => 0.204993 sec
 > [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(40) 191.674258] [msg_vm/WARNING] use the default max_downtime value 30ms
-> [334.199056] [surf_vm/CRITICAL] FIXME: may need a proper handling, 1
 > [Fafard:master_:(1) 339.199251] [msg_test/INFO] ## Test 6 (ended)
 > [339.199251] [msg_test/INFO] Bye (simulation time 339.199)
index 356403d..fc5c0c0 100644 (file)
@@ -250,9 +250,6 @@ void VirtualMachineImpl::setPm(s4u::Host* destination)
   /* create a cpu action bound to the pm model at the destination. */
   surf::CpuAction* new_cpu_action = static_cast<surf::CpuAction*>(destination->pimpl_cpu->execution_start(0));
 
-  surf::Action::State state = action_->getState();
-  if (state != surf::Action::State::done)
-    XBT_CRITICAL("FIXME: may need a proper handling, %d", static_cast<int>(state));
   if (action_->getRemainsNoUpdate() > 0)
     XBT_CRITICAL("FIXME: need copy the state(?), %f", action_->getRemainsNoUpdate());
 
index 6208210..7bd87a6 100644 (file)
@@ -404,13 +404,15 @@ xbt_os_sem_t xbt_os_sem_init(unsigned int value)
 #else                           /* damn, no sem_init(). Reimplement it */
 
   xbt_os_mutex_acquire(next_sem_ID_lock);
-  res->name = bprintf("/%d", ++next_sem_ID);
+  res->name = bprintf("/sg-%d", ++next_sem_ID);
   xbt_os_mutex_release(next_sem_ID_lock);
 
+  sem_unlink(res->name);
   res->ps = sem_open(res->name, O_CREAT, 0644, value);
   if ((res->ps == (sem_t *) SEM_FAILED) && (errno == ENAMETOOLONG)) {
     /* Old darwins only allow 13 chars. Did you create *that* amount of semaphores? */
     res->name[13] = '\0';
+    sem_unlink(res->name);
     res->ps = sem_open(res->name, O_CREAT, 0644, value);
   }
   if (res->ps == (sem_t *) SEM_FAILED)