Changes between Initial Version and Version 1 of Tbroadcast


Ignore:
Timestamp:
Nov 27, 2006, 3:15:21 PM (18 years ago)
Author:
/C=FR/O=CNRS/OU=UMR8607/CN=Vincent Garonne/emailAddress=garonne@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tbroadcast

    v1 v1  
     1= Tbroadcast v2 =
     2
     3Title:  MultiThreaded broadcast utility
     4Author: Vincent Garonne
     5Version: v2.0.3
     6Date:   2006/09/09
     7Note: Still under construction
     8
     9== Description ==
     10
     11This is a standalone program in python and NOT a new feature of CMT.
     12This program (named tbroadcast - for "threaded broadcast") basically operates very much like 'cmt broadcast`.
     13
     14The use network forms a Directed Acyclic Graph [DAG] (or if there are cycles, they are detected and properly handled).
     15
     16tbroadcast first gets all "leaves" of the use graph, and launches the requested command onto them in parallel in individual [POSIX]threads.
     17
     18Then, once all children of a non-leaf package are completed, the requested command is launched onto this non-leaf package [still in an individual thread].
     19
     20This is recursively repeated until all packages have been reached.
     21
     22At any time the number of active threads is controlled so as to never exceed a limit [set to 20 threads by default but can be modified using the -threads=n option]. A local scheduler maintains a queue of threads when the limit is reached.
     23
     24The individual thread activity consists in running the requested command - as usual - in the context of the reached package. The difference with the sequential cmt broadcast of course is that the output of the run is accumulated and displayed at once when every action is completed [to avoid intermixing of outputs from different threads].
     25
     26When one activity returns an error, the error status is propagated to its parent which will prematurely complete, but not before all other simultaneously running threads are actually completed.
     27
     28It's only when the threads of ALL children are completed (with success or error) that a node either starts (if all children successfully completed) or immediately terminates (if one of its children failed).
     29
     30== Basic usage ==
     31{{{
     32> tbroadcast -help
     33Usage : > tbroadcast [global options] [<command>]
     34# command :
     35#   <command>: command to execute
     36# global options :
     37#   -f=<file>             : Input file
     38#   -help                 : Print help
     39#   -local                : Reach packages only within the current project
     40#   -global               : Reach packages in all CMTPATH/CMTPROJECTPATH items
     41#   -ignore_cycles        : Suppress automatically the cycles
     42#   -make=<file>          : Generate a recursive Make, see: http://www.tip.net.au/~millerp/rmch/recu-make-cons-harm.html
     43#   -nb=<num_worker>      : Change the total number of threads[default is 20]
     44#   -output=<location>    : Output directory to store output files with the form <package>_output.log
     45#   -error=<location>     : Output directory to store error output with the form <package>_error.log
     46#   -perf=<file>          : Store for each package the time for executing the command in the <file> file
     47#   -print                : Print dependencies for each package
     48#   -version              : version of tbroadcast
     49#   -silent               : Disable print
     50#   -test                 : Simulate execution
     51}}}
     52
     53
     54== Download ==
     55
     56You can download the tarball:
     57
     58|| Versions                                     || URL                                                ||
     59|| tbroadcast-v2.0.3 (Current version )         || [http://tbroadcast-v2.0.3 tbroadcast-v2.0.3.tar.gz]||
     60
     61From svn repository:
     62
     63{{{
     64> svn co https://svn.lal.in2p3.fr:/projects/CMT/tbroadcast/<version> tbroadcast
     65}}}
     66
     67== How to install ==
     68
     69{{{
     70> tar -xvzf tbroadcast-<version>.tar.gz
     71> cd tbroadcast/<version>/cmt
     72> cmt config
     73> source setup.[c]sh
     74
     75}}}
     76
     77== References ==
     78
     79 * http://chrisarndt.de/en/software/python/threadpool/