Difference between revisions of "BitTorrent (B. Cohen's version)"

From HCL
Jump to: navigation, search
(Created page with "The modified bittorrent tarball is currently under the MPIBlib repository: svn co https://hcl.ucd.ie/repos/CPM/trunk/MPIBlib/tests/bittorrent/bittorrent.tar.gz * Create a file…")
 
 
(8 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
svn co https://hcl.ucd.ie/repos/CPM/trunk/MPIBlib/tests/bittorrent/bittorrent.tar.gz
 
svn co https://hcl.ucd.ie/repos/CPM/trunk/MPIBlib/tests/bittorrent/bittorrent.tar.gz
  
 +
* Extract this under your home directory
 +
** You might need
 +
  mv $HOME/lib/python $HOME/lib/python2.6
  
 +
* export following variables to tweak the way Python paths are searched:
 +
  export PYTHONPATH=/usr/lib/python2.6/:<local-installation-path-of-Python-libs>
 +
* Modify logfile path in /home/kdichev/lib/python2.6/BitTorrent/StorageWrapper.py and create according directory structure
 
* Create a file of any size consisting of "s" characters only.
 
* Create a file of any size consisting of "s" characters only.
 
* Create torrent file:  
 
* Create torrent file:  
Line 11: Line 17:
 
* Start the tracker on the frontend:
 
* Start the tracker on the frontend:
 
   bttrack --port 6969 --dfile dstate
 
   bttrack --port 6969 --dfile dstate
* Start one client that has the full copy:
+
* Book nodes interactively:
   btdownloadheadless.py --url http://my.server/myfile.torrent --saveas myfile.ext
+
  qsub -I -lnodes=...
 +
* Start one client that has the full copy
 +
  ssh <one-node> btdownloadheadless --url http://public.lille.grid5000.fr/~kdichev/{torrent file} &
 +
 
 +
* On all other nodes, launch the client at the same time:
 +
script-per-process.sh
 +
   #!/bin/bash
 +
  cd /tmp ;  btdownloadheadless --display_interval 100 --url http://public.lille.grid5000.fr/~kdichev/{torrent file}
 +
run.sh
 +
  mpirun -n 14 --machinefile hostfile  $PWD/script-per-process.sh

Latest revision as of 12:27, 14 September 2012

The modified bittorrent tarball is currently under the MPIBlib repository:

svn co https://hcl.ucd.ie/repos/CPM/trunk/MPIBlib/tests/bittorrent/bittorrent.tar.gz

  • Extract this under your home directory
    • You might need
 mv $HOME/lib/python $HOME/lib/python2.6
  • export following variables to tweak the way Python paths are searched:
 export PYTHONPATH=/usr/lib/python2.6/:<local-installation-path-of-Python-libs>
  • Modify logfile path in /home/kdichev/lib/python2.6/BitTorrent/StorageWrapper.py and create according directory structure
  • Create a file of any size consisting of "s" characters only.
  • Create torrent file:
 btmakemetafile myfile.ext http://<frontend on G5K>:6969/announce
 bttrack --port 6969 --dfile dstate
  • Book nodes interactively:
 qsub -I -lnodes=...
  • Start one client that has the full copy
 ssh <one-node> btdownloadheadless --url http://public.lille.grid5000.fr/~kdichev/{torrent file} &
  • On all other nodes, launch the client at the same time:

script-per-process.sh

 #!/bin/bash
 cd /tmp ;  btdownloadheadless --display_interval 100 --url http://public.lille.grid5000.fr/~kdichev/{torrent file}

run.sh

 mpirun -n 14 --machinefile hostfile  $PWD/script-per-process.sh