MSG
- Fix MSG_task_get_remaining_work_ratio() to return 1.0 for tasks that have
not started.
+ - Remove parameter of MSG_process_killall().
+ Resetting the PID was bogus anyway (several actors could have the same PID).
Documentation
- Use a graphical TOC to make it easier to find the documentation you need
TRACING
- Remove unused run-time parameter "tracing/onelink-only".
+ Fixed bugs:
+ - #254: Something seems wrong with s4u::Actor::kill(aid_t)
+
SimGrid (3.18) Released December 24 2017
The "Ho Ho Ho! SimGrid 4 beta is coming to town" release.
>[ 10.000000] (killer@Tremblay) Resume the victim A
>[ 10.000000] (victim A@Fafard) OK, OK. Let's work
>[ 12.000000] (killer@Tremblay) Kill the victim A (pid=2)
+>[ 12.000000] (victim A@Fafard) I have been killed!
>[ 12.000000] (killer@Tremblay) Kill victimB (pid=3), even if it's already dead
>[ 13.000000] (killer@Tremblay) Killing everybody but myself
->[ 13.000000] (victim A@Fafard) I have been killed!
>[ 13.000000] (killer@Tremblay) OK, goodbye now. I commit a suicide (pid=1).
>[ 13.000000] (maestro@) Simulation time 13
XBT_PUBLIC(void) MSG_process_detach();
XBT_PUBLIC(void) MSG_process_kill(msg_process_t process);
-XBT_PUBLIC(int) MSG_process_killall(int reset_PIDs);
+XBT_PUBLIC(int) MSG_process_killall();
XBT_PUBLIC(msg_error_t) MSG_process_migrate(msg_process_t process, msg_host_t host);
XBT_PUBLIC(void) MSG_process_yield();
std::map<std::string, std::string>* properties);
#endif
-XBT_PUBLIC(void) simcall_process_killall(int reset_pid);
+XBT_PUBLIC(void) simcall_process_killall();
XBT_PUBLIC(void) SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const char *msg);
/** \ingroup msg_simulation
* \brief Kill all running process
- * \param reset_PIDs should we reset the PID numbers. A negative
- * number means no reset and a positive number will be used to set the PID
- * of the next newly created process.
*/
-int MSG_process_killall(int reset_PIDs)
+int MSG_process_killall()
{
- simcall_process_killall(reset_PIDs);
+ simcall_process_killall();
return 0;
}
void Actor::killAll()
{
- simcall_process_killall(1);
-}
-
-void Actor::killAll(int resetPid)
-{
- simcall_process_killall(resetPid);
+ simcall_process_killall();
}
std::map<std::string, std::string>* Actor::getProperties()
}
-void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid) {
- SIMIX_process_killall(simcall->issuer, reset_pid);
+void simcall_HANDLER_process_killall(smx_simcall_t simcall)
+{
+ SIMIX_process_killall(simcall->issuer);
}
/**
* \brief Kills all running processes.
* \param issuer this one will not be killed
*/
-void SIMIX_process_killall(smx_actor_t issuer, int reset_pid)
+void SIMIX_process_killall(smx_actor_t issuer)
{
for (auto const& kv : simix_global->process_list)
if (kv.second != issuer)
SIMIX_process_kill(kv.second, issuer);
-
- if (reset_pid > 0)
- simix_process_maxpid = reset_pid;
}
void SIMIX_process_change_host(smx_actor_t actor, sg_host_t dest)
XBT_PRIVATE void SIMIX_process_runall();
XBT_PRIVATE void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer);
-XBT_PRIVATE void SIMIX_process_killall(smx_actor_t issuer, int reset_pid);
+XBT_PRIVATE void SIMIX_process_killall(smx_actor_t issuer);
XBT_PRIVATE void SIMIX_process_cleanup(smx_actor_t arg);
XBT_PRIVATE void SIMIX_process_empty_trash();
XBT_PRIVATE void SIMIX_process_yield(smx_actor_t self);
* \ingroup simix_process_management
* \brief Kills all SIMIX processes.
*/
-void simcall_process_killall(int reset_pid)
+void simcall_process_killall()
{
- simcall_BODY_process_killall(reset_pid);
+ simcall_BODY_process_killall();
}
/**
*/
#include "src/simix/popping_private.hpp"
-static inline int simcall_process_killall__get__reset_pid(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<int>(simcall->args[0]);
-}
-static inline int simcall_process_killall__getraw__reset_pid(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<int>(simcall->args[0]);
-}
-static inline void simcall_process_killall__set__reset_pid(smx_simcall_t simcall, int arg)
-{
- simgrid::simix::marshal<int>(simcall->args[0], arg);
-}
-
static inline smx_actor_t simcall_process_cleanup__get__process(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
/* The prototype of all simcall handlers, automatically generated for you */
-XBT_PRIVATE void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid);
+XBT_PRIVATE void simcall_HANDLER_process_killall(smx_simcall_t simcall);
XBT_PRIVATE void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_actor_t process);
XBT_PRIVATE void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t process, double timeout);
XBT_PRIVATE void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration);
return simgrid::simix::unmarshal<R>(self->simcall.result);
}
-inline static void simcall_BODY_process_killall(int reset_pid)
+inline static void simcall_BODY_process_killall()
{
if (0) /* Go to that function to follow the code flow through the simcall barrier */
- simcall_HANDLER_process_killall(&SIMIX_process_self()->simcall, reset_pid);
- return simcall<void, int>(SIMCALL_PROCESS_KILLALL, reset_pid);
+ simcall_HANDLER_process_killall(&SIMIX_process_self()->simcall);
+ return simcall<void>(SIMCALL_PROCESS_KILLALL);
}
inline static void simcall_BODY_process_cleanup(smx_actor_t process)
return;
switch (simcall->call) {
case SIMCALL_PROCESS_KILLALL:
- simcall_HANDLER_process_killall(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]));
+ simcall_HANDLER_process_killall(simcall);
SIMIX_simcall_answer(simcall);
break;
# Last but not the least, you should declare the new simix call in
# ./include/simgrid/simix.h (otherwise you will get a warning at compile time)
-void process_killall(int reset_pid);
+void process_killall();
void process_cleanup(smx_actor_t process) [[nohandler]];
void process_suspend(smx_actor_t process) [[block]];
int process_join(smx_actor_t process, double timeout) [[block]];
#endif
/* Kill all processes (but maestro) */
- SIMIX_process_killall(simix_global->maestro_process, 1);
+ SIMIX_process_killall(simix_global->maestro_process);
SIMIX_context_runall();
SIMIX_process_empty_trash();
simgrid::s4u::Engine e(&argc, argv);
e.loadPlatform(argv[1]);
- if (argc > 2)
- simgrid::s4u::Actor::killAll(atoi(argv[2]));
- else
- simgrid::s4u::Actor::killAll();
+ simgrid::s4u::Actor::killAll();
simgrid::s4u::Actor::createActor("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
simgrid::s4u::Actor::createActor("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
> [ 0.001206] (sendpid@Tremblay) Send of pid "3" done.
> [ 0.001206] (killall@Tremblay) Killing process "3".
> [ 0.001206] (sendpid@Tremblay) Process "3" killed.
-
-$ ./pid ${platfdir}/small_platform.xml 2 "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
-> [ 0.000000] (sendpid@Tremblay) Sending pid of "2".
-> [ 0.000000] (sendpid@Tremblay) Sending pid of "3".
-> [ 0.000000] (sendpid@Tremblay) Sending pid of "4".
-> [ 0.000402] (killall@Tremblay) Killing process "2".
-> [ 0.000402] (sendpid@Tremblay) Send of pid "2" done.
-> [ 0.000402] (sendpid@Tremblay) Process "2" killed.
-> [ 0.000804] (sendpid@Tremblay) Send of pid "3" done.
-> [ 0.000804] (killall@Tremblay) Killing process "3".
-> [ 0.000804] (sendpid@Tremblay) Process "3" killed.
-> [ 0.001206] (sendpid@Tremblay) Send of pid "4" done.
-> [ 0.001206] (killall@Tremblay) Killing process "4".
-> [ 0.001206] (sendpid@Tremblay) Process "4" killed.