Actors: the Active Entities
===========================
-Starting and Stoping Actors
+Starting and Stopping Actors
---------------------------
- **Creating actors:**
Most actors are started from the deployment XML file, because this
- is a :ref:`better scientific habbit <howto_science>`, but you can
+ is a :ref:`better scientific habit <howto_science>`, but you can
also create them directly from your code.
.. tabs::
See also :cpp:func:`sg_actor_kill`, :cpp:func:`sg_actor_kill_all`, :cpp:func:`sg_actor_exit`, :cpp:func:`sg_actor_on_exit`.
- - **Controling the actor life cycle from the XML:**
+ - **Controlling the actor life cycle from the XML:**
You can specify a start time and a kill time in the deployment file.
.. tabs::
- **Platform Tracing:**
This program is a toy example just loading the platform, so that
- you can play with the platform visualization. Recommanded options:
+ you can play with the platform visualization. Recommended options:
``--cfg=tracing:yes --cfg=tracing/categorized:yes``
.. tabs::
*
* The first step is to declare the code of your actors (what they do exactly does not matter to this example) and then
* you ask SimGrid to start your actors. There is three ways of doing so:
- * - Directly, by instantiating your actor as paramter to Actor::create()
+ * - Directly, by instantiating your actor as parameter to Actor::create()
* - By first registering your actors before instantiating it;
* - Through the deployment file.
*
> [ 43.774742] (1:master@Tremblay) Goodbye now!
> [ 43.774742] (0:maestro@) Simulation time 43.7747
-p NOT testing the mixure of failures and CpuTI:
+p NOT testing the mixture of failures and CpuTI:
p This test leads to a deadlock because of a bug somewhere in surf_solve.
p We should debug this instead of ignoring the issue, but it's utterly
p complex with such an integration test. One day, we will setup a set of
package async.waitall;
-/** This example demonstrates the use of the asynchrounous communications
+/** This example demonstrates the use of the asynchronous communications
*
* Task.isend() and Task.irecv() are used to start the communications in non-blocking mode.
*
Msg.debug("Caught exception: " + e);
}
}
- Msg.info(findNodeSuccedded + "/" + (findNodeSuccedded + findNodeFailed) + " FIND_NODE have succedded.");
+ Msg.info(findNodeSuccedded + "/" + (findNodeSuccedded + findNodeFailed) + " FIND_NODE have succeeded.");
}
/**
if (counts) {
findNodeSuccedded++;
}
- Msg.debug("Find node on " + destination + " succedded");
+ Msg.debug("Find node on " + destination + " succeeded");
} else {
Msg.debug("Find node on " + destination + " failed");
Msg.debug("Queried " + queries + " nodes to find " + destination);
}
/**
- * @brief Handles an incomming task
+ * @brief Handles an incoming task
* @param task The task we need to handle
*/
public void handleTask(Task task) {
> [0.000000] [java/INFO] Using regular java threads.
> [900.000000] [java/INFO] Terminating the simulation...
> [node-0.simgrid.org:dht.kademlia.Node:(1) 0.000000] [java/INFO] Hi, I'm going to create the network with the id 0!
-> [node-0.simgrid.org:dht.kademlia.Node:(1) 900.000000] [java/INFO] 8/8 FIND_NODE have succedded.
+> [node-0.simgrid.org:dht.kademlia.Node:(1) 900.000000] [java/INFO] 8/8 FIND_NODE have succeeded.
> [node-1.simgrid.org:dht.kademlia.Node:(2) 0.000000] [java/INFO] Hi, I'm going to join the network with the id 1!
-> [node-1.simgrid.org:dht.kademlia.Node:(2) 900.000000] [java/INFO] 8/8 FIND_NODE have succedded.
+> [node-1.simgrid.org:dht.kademlia.Node:(2) 900.000000] [java/INFO] 8/8 FIND_NODE have succeeded.
> [node-2.simgrid.org:dht.kademlia.Node:(3) 0.000000] [java/INFO] Hi, I'm going to join the network with the id 2!
-> [node-2.simgrid.org:dht.kademlia.Node:(3) 900.000000] [java/INFO] 8/8 FIND_NODE have succedded.
+> [node-2.simgrid.org:dht.kademlia.Node:(3) 900.000000] [java/INFO] 8/8 FIND_NODE have succeeded.
> [node-3.simgrid.org:dht.kademlia.Node:(4) 0.000000] [java/INFO] Hi, I'm going to join the network with the id 4!
-> [node-3.simgrid.org:dht.kademlia.Node:(4) 900.000000] [java/INFO] 8/8 FIND_NODE have succedded.
+> [node-3.simgrid.org:dht.kademlia.Node:(4) 900.000000] [java/INFO] 8/8 FIND_NODE have succeeded.
This example declares several tracing categories
to that are used to classify its tasks. When the program is executed,
the tracing mechanism registers the resource utilization of hosts
- and links according to these categories. Recommanded options:
+ and links according to these categories. Recommended options:
@verbatim --cfg=tracing:yes --cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes
@endverbatim
This is an augmented version of our basic master/worker example
using several tracing features. It traces resource usage, sorted
out in several categories; Trace marks and user variables are also
- used. Recommanded options:
+ used. Recommended options:
@verbatim --cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes
@endverbatim
- <b>Process migration tracing</b>.
@ref examples/deprecated/msg/trace-process-migration/trace-process-migration.c \n
This version is enhanced so that the process migrations can be
- displayed as arrows in a Gantt-chart visualization. Recommanded
+ displayed as arrows in a Gantt-chart visualization. Recommended
options to that extend:
@verbatim -cfg=tracing:yes --cfg=tracing/msg/process:yes
@endverbatim
static int trace_fun(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
{
//Set initial values for the link user variables
- //This example uses source and destination where source and destination are the name of hosts inthe platform file.
+ //This example uses source and destination where source and destination are the name of hosts in the platform file.
//The functions will set/change the value of the variable for all links in the route between source and destination.
//Set the Link_Capacity variable
<platform version="4.1">
<zone id="AS0" routing="Full">
<!-- Multiple pstate processor capacities can be defined as a list of powers specified for a given host -->
- <!-- Attribute 'pstate' specifies the initialy selected pstate (here, the lowest pstate corresponds to the highest
+ <!-- Attribute 'pstate' specifies the initially selected pstate (here, the lowest pstate corresponds to the highest
processor speed) -->
<host core="4" id="MyHost1" pstate="0" speed="100.0Mf,50.0Mf,20.0Mf">
<!-- List of Idle:Epsilon:AllCores (in Watts) corresponding to the speed consumed when the processor is idle,
(see http://grid5000.fr for more information on that platform)
It was generated manually in 2011 and manually edited since then.
- A better (and more uptodate) description file can probably be
+ A better (and more up-to-date) description file can probably be
retrieved using https://github.com/lpouillo/topo5k as described on
https://www.grid5000.fr/mediawiki/index.php/TechTeam:Topo5k
> [ 0.000000] (0:maestro@) Check the liveness property promela_bugged1_liveness
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (3:client@Fafard) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (1:coordinator@Tremblay) CS already used. Queue the request.
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (1:coordinator@Tremblay) CS already used. Queue the request.
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (1:coordinator@Tremblay) CS already used. Queue the request.
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (1:coordinator@Tremblay) CS already used. Queue the request.
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (3:client@Fafard) Propositions changed : r=1, cs=0
> [ 0.000000] (1:coordinator@Tremblay) CS release. Grant to queued requests (queue size: 1)
> [ 0.000000] (2:client@Boivin) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (2:client@Boivin) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (0:maestro@) Pair 58 already reached (equal to pair 46) !
> [ 0.000000] (0:maestro@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
requests.push(m->return_mailbox);
} else {
if (m->return_mailbox->get_name() != "1") {
- XBT_INFO("CS idle. Grant immediatly");
+ XBT_INFO("CS idle. Grant immediately");
m->return_mailbox->put(new Message(Message::Kind::GRANT, mbox), 1000);
CS_used = 1;
}
> [ 0.000000] (2:client@Boivin) Ask the request
> [ 0.000000] (3:client@Fafard) Ask the request
> [ 0.000000] (2:client@Boivin) Propositions changed : r=1, cs=0
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (3:client@Fafard) 2 got the answer. Sleep a bit and release it
> [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle
> [ 0.000000] (3:client@Fafard) Ask the request
-> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly
+> [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediately
> [ 0.000000] (0:maestro@) Pair 22 already reached (equal to pair 10) !
> [ 0.000000] (0:maestro@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> [ 0.000000] (0:maestro@) | ACCEPTANCE CYCLE |
if(timer_on != 0 && dg->numNodes+1>timers_tot){
timer_on=0;
if(my_rank==0)
- fprintf(stderr,"Not enough timers. Node timeing is off. \n");
+ fprintf(stderr,"Not enough timers. Node timing is off. \n");
}
if(dg->numNodes && dg->numNodes>comm_size){
if(my_rank==0){
1220703125.00 ), /* Random number gen mult */
1220703125.00 ); /* Random number gen mult */
-/* Do one interation for free (i.e., untimed) to guarantee initialization of
+/* Do one iteration for free (i.e., untimed) to guarantee initialization of
all data and code pages and respective tables */
rank(gd, 1 );
xbt_dynar_push(requests, &recv_buff);
}else{
if(recv_buff != size - 1){
- printf("CS idle. Grant immediatly.\n");
+ printf("CS idle. Grant immediately.\n");
MPI_Send(&rank, 1, MPI_INT, recv_buff, GRANT_TAG, MPI_COMM_WORLD);
CS_used = 1;
}
printf("CS already used. Queue the request.\n");
xbt_dynar_push(requests, &recv_buff);
}else{
- printf("CS idle. Grant immediatly.\n");
+ printf("CS idle. Grant immediately.\n");
MPI_Send(&rank, 1, MPI_INT, recv_buff, GRANT_TAG, MPI_COMM_WORLD);
CS_used = 1;
}
2 smpi_replay.txt 32 125000000000
-This launchs an instance "2" that will replay file smpi_replay.txt with 32 processes, and each one of these processes
+This launches an instance "2" that will replay file smpi_replay.txt with 32 processes, and each one of these processes
will sleep for 125000000000 flops before the run.
In order to be replayed, a deployment file must be generatedfrom this description file, and from the intended platform
public:
enum class Type {
- latency = 100, /* this is a heap entry to warn us when the latency is payed */
+ latency = 100, /* this is a heap entry to warn us when the latency is paid */
max_duration, /* this is a heap entry to warn us when the max_duration limit (timeout) is reached */
normal, /* this is a normal heap entry stating the date to finish transmitting */
unset
*
* @param src where from
* @param dst where to
- * @param into Container into which the traversed links and gateway informations should be pushed
+ * @param into Container into which the traversed links and gateway information should be pushed
* @param latency Accumulator in which the latencies should be added (caller must set it to 0)
*/
virtual void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) = 0;
static ActorPtr create(const std::string& name, s4u::Host* host, const std::function<void()>& code);
/** Create an actor, but don't start it yet.
*
- * This is usefull to set some properties or extension before actually starting it */
+ * This is useful to set some properties or extension before actually starting it */
static ActorPtr init(const std::string& name, s4u::Host* host);
ActorPtr set_stacksize(unsigned stacksize);
/** Start a previously initialized actor */
* @rst
* Most of them are created with :cpp:func:`simgrid::s4u::this_actor::exec_init()` or
* :cpp:func:`simgrid::s4u::Host::execute()`, and represent a classical (sequential) execution. This can be used to
- * simulate some computation occuring in another thread when the calling actor is not blocked during the execution.
+ * simulate some computation occurring in another thread when the calling actor is not blocked during the execution.
*
* You can also use :cpp:func:`simgrid::s4u::this_actor::parallel_execute()` to create *parallel* executions. These
* objects represent distributed computations involving computations on several hosts and communications between them.
xbt_log_priority_trace = 1, /**< enter and return of some functions */
xbt_log_priority_debug = 2, /**< crufty output */
xbt_log_priority_verbose = 3, /**< verbose output for the user wanting more */
- xbt_log_priority_info = 4, /**< output about the regular functionning */
+ xbt_log_priority_info = 4, /**< output about the regular functioning */
xbt_log_priority_warning = 5, /**< minor issue encountered */
xbt_log_priority_error = 6, /**< issue encountered */
xbt_log_priority_critical = 7, /**< major issue encountered */
namespace simgrid {
namespace xbt {
-/** Display informations about an exception
+/** Display information about an exception
*
* We display: the exception type, name, attached backtraces (if any) and
* the nested exception (if any).