Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Document the exec-ptask example
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 15 Dec 2017 08:43:16 +0000 (09:43 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 15 Dec 2017 23:38:31 +0000 (00:38 +0100)
examples/s4u/README.doc
examples/s4u/exec-ptask/s4u-exec-ptask.cpp

index 776b9b0..8814a15 100644 (file)
@@ -175,7 +175,10 @@ also the tesh files in the example directories for details.
     Show how define a set of pstatesfor a host in the XML, and how the current
     pstate can be accessed/changed with @ref simgrid::s4u::Host::getPstateSpeed and @ref simgrid::s4u::Host::setPstate.
 
     Show how define a set of pstatesfor a host in the XML, and how the current
     pstate can be accessed/changed with @ref simgrid::s4u::Host::getPstateSpeed and @ref simgrid::s4u::Host::setPstate.
 
-  TODO: add an example about parallel executions.
+  - <b>Parallel tasks</b>
+    @ref examples/s4u/exec-ptasks/s4u-exec-ptasks.cpp\n
+    These objects are convenient abstractions of parallel
+    computational kernels that span over several machines. 
 
 @subsection s4u_ex_activity_io I/O on disks and files
 
 
 @subsection s4u_ex_activity_io I/O on disks and files
 
index 267be8c..90bb2a8 100644 (file)
@@ -3,6 +3,21 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+/* Parallel tasks are convenient abstractions of parallel computational kernels that span over several machines.
+ * To create a new one, you have to provide several things:
+ *   - a vector of hosts on which the task will execute
+ *   - a vector of values, the amount of computation for each of the hosts (in flops)
+ *   - a matrix of values, the amount of communication between each pair of hosts (in bytes)
+ *
+ * Each of these operation will be processed at the same relative speed.
+ * This means that at some point in time, all sub-executions and all sub-communications will be at 20% of completion.
+ * Also, they will all complete at the exact same time.
+ *
+ * This is obviously a simplistic abstraction, but this is very handful in a large amount of situations.
+ *
+ * Please note that you must have the LV07 platform model enabled to use such constructs.
+ */
+
 #include "simgrid/plugins/energy.h"
 #include <simgrid/s4u.hpp>
 #include <xbt/ex.hpp>
 #include "simgrid/plugins/energy.h"
 #include <simgrid/s4u.hpp>
 #include <xbt/ex.hpp>