| 1 | = Configuring a Windows Bitten Slave = |
| 2 | |
| 3 | These steps should enable a bitten slave on windows for building and testing FiPy. |
| 4 | |
| 5 | * Install pythonxy <http://www.pythonxy.com> |
| 6 | * Install pysparse <http://pysparse.sf.net> |
| 7 | * Go to the command line and type "{{{python}}}" and then type "{{{import pysparse}}}" and "{{{import numpy}}}" to check that everything is basically working. |
| 8 | * Install bitten "{{{easy_install http://svn.edgewall.org/repos/bitten/trunk/}}}" |
| 9 | * Create a "{{{bitten.ini}}}" file in a directory. Something like |
| 10 | {{{ |
| 11 | [fipy] |
| 12 | inline=True |
| 13 | Trilinos=False |
| 14 | }}} |
| 15 | * Execute the bitten command "{{{bitten-slave --verbose --config=bitten.ini --log=bitten.log http://www.matforge.org/fipy/builds}}}" |
| 16 | * You should now have a working bitten slave. Of course, the bitten slave may go down periodically, like when you log off. To keep the slave running there are a number of options. Some involve creating a windows service, which I couldn't get working, but are probably better. An alternative is to just create a scheduled task. To start, create a python file "{{{bittenLaunch.py}}}" along side "{{{bitten.ini}}}" that simply relaunches the bitten slave if "{{{bitten-slave}}}" is not found with the "{{{tasklist}}}" command. |
| 17 | {{{ |
| 18 | #!python |
| 19 | |
| 20 | #!/usr/bin/env python |
| 21 | |
| 22 | import subprocess, time |
| 23 | |
| 24 | cmd = ['bitten-slave.exe', |
| 25 | '--verbose', |
| 26 | '--config=bitten.ini', |
| 27 | '--log=bitten.log', |
| 28 | 'http://www.matforge.org/fipy/builds'] |
| 29 | |
| 30 | |
| 31 | if cmd[0] not in subprocess.Popen('tasklist', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.read()[:]: |
| 32 | p = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE) |
| 33 | }}} |
| 34 | * Add the above script as a scheduled task. |
| 35 | - Go to "{{{Start -> Control Panel -> Administrative Tools -> Services}}}" |
| 36 | - Make sure the Task Scheduler is running and set to automatic. |
| 37 | - Log off and log on and check that the Task Scheduler is still running. |
| 38 | - Go to "{{{Start -> Accessories -> System Tools -> Scheduled Tasks}}}" |
| 39 | - Add "{{{\path\to\bittenLaunch.py}}}" along with the correct location to run in. |
| 40 | - To get the task to run very frequently (every few minutes), click on the "{{{schedule}}}" tab and then click on "{{{advanced}}}". Also set the time for allowing this frequency to the maximum (9999 hours). |
| 41 | |