<?php
	require_once("globals.php");
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<TITLE>PyLSF: Python Bindings for LSF</TITLE>
<base href="http://www.gingergeeks.co.uk/pylsf/">
<link rel="icon" href="favicon.ico" type="image/ico" />
<link rel="shortcut icon" href="favicon.ico" />

<?php
	echoCodeLinks();
?>

</head>
<body>

<?php
	echoOuterStart('index.php');
?>

<h2><a name="INTRO"></a><center>Introduction</center></h2>
<p>
PyLSF is a <a href="http://www.python.org/">Python</a>/<a href="http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/">Pyrex</a> 
module to allow access to the version 6.2 of <a href="http://www.platform.com/">Platform HPC LSF batch scheduler</a>.

<h2><a name="EXAMPLES"></a><center>Example Code</center></h2>
<p>
The LSF environment needs to be loaded before using the module and the LD_LIBRARY_PATH set in order to locate the LSF libraries i.e
</p>

<div class="code">
<pre>
# Source the LSF ksh environment
. /opt/share/lsf/conf/profile.lsf

# Set the Library path for the LSF libraries
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/share/lsf/6.2/linux2.6-glibc2.3-x86_64/lib/
</pre>
</div>

<p>
Below is a PyLSF example that generates a subset of the bjob data structure.
</p>

<div class="code">
<pre>
>>> from pylsf import *
>>> a = lsb_init("pylsf")
>>> b = lsb_openjobinfo()
>>> for c in range(b):
...   data = lsb_readjobinfo(c)
...   print "%s %s %s %s %s %s %s %s" % \
...   (data[0],  data[1], data[2], data[19][1],\
...    data[16], data[17], data[19][0], data[4])
>>> lsb_closejobinfo()
107 mark 16 normal makalu.localnet ['makalu.localnet'] serialjob 1160330375
>>>
</pre>
</div>

<p style="text-align:center;">
<small><i>Last modified 2nd November 2008</i></small>
</p>

<?php
	echoOuterEnd();
?>

</body>
</html>
