During the course of an experiment on G5k, one often wants to run programs or scripts on all the reserved nodes simultaneously. For instance, to send data to remote workers. This could be achieved sequentially with a loop construct in a script, but this method does not scale well. That's why a launcher for parallel commands named TakTuk has been installed on each G5k site.
Short Explanation about TakTuk mechanics
To speed up the remote execution of the same command on a large number of nodes, TakTuk both
- uses a deployment tree to initiate several connections to remote peers at the same time
- initiates locally a few connections in parallel (the deployment window)
The balance beetween the two mechanism is ensured by an adaptive work-stealing algorithm combined with an on-line evaluation of the local machine load (see A guide to TakTuk use by Guillaume Huard for more details).
Therefore, for taktuk to operate correctly, peers should be able to connect to each other. By default, TakTuk uses ssh connections. So, to check if Taktuk execution can work, please follow instructions on this page: Test key authentication. There is also a practical example for setting up taktuk in the Advanced OAR tutorial.
Using TakTuk with the base environment
You own a reservation for some machines:
You are logged on one of the reserved nodes:
Connections can be made without password from this node and between nodes using your account.
Using Taktuk to launch scripts
To execute scripts simultaneously on all the nodes:
Note: do not forget to type the characters
] and separate them from their content (using spaces for instance).
By default, TakTuk displays a lot of informations and part of it might not be necessary. Basically, you can choose exactly what is displayed by TakTuk (type of information and format of the displayed messages) using the output-template option. For instance, the following options suppress the connector and status streams and format the output of commands to use the host name followed by the content of the output:
-o connector -o status -o output='"$host: $line\n"'
To check if time clocks are synchronized on all the nodes (Result formated correctly)
node-101.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007 node-23.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007 node-24.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007 node-67.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007 node-97.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007
To find CPUs installed on nodes:
node-101.bordeaux.grid5000.fr: model name : Intel(R) Xeon(TM) CPU 3.00GHz node-23.bordeaux.grid5000.fr: model name : AMD Opteron(tm) Processor 248 node-24.bordeaux.grid5000.fr: model name : AMD Opteron(tm) Processor 248 node-67.bordeaux.grid5000.fr: model name : Intel(R) Xeon(TM) CPU 3.00GHz node-97.bordeaux.grid5000.fr: model name : Intel(R) Xeon(TM) CPU 3.00GHz
Note: instead of using the option -c "oarsh" in each command, we could have type the following command :
and then taktuk would know that it need to use oarsh as connector.
Using TakTuk with your own environment but without TakTuk installation
Start by making a reservation:
Deploy your environment:
Using Taktuk to launch programs
Using the -s option, you can use taktuk to deploy on remote hosts that don't have taktuk installed.
To execute an apt-get as root for system update, you have to use the following option: "-l root" before any machine specification.