The short introduction describes how to install the python
API for
the IBM LSF batch system (like Euler cluster of ETH Zürich).
The python API relies on the system environment that is defined
inside the file profile.lsf
. On Euler cluster it is at: $LSF_ENVDIR/profile.lsf
Load the environmental variables by
# You may need to change the location dependent on the system
source $LSF_ENVDIR/profile.lsf
Prerequisites: python
and swig
should be loaded:
# Need to load this line if you don't have the newer modules
module load new
module load python/X.Y.Z swig
Installation of the python API is recommended at the user-level, or inside a virtualenv. In both cases, clone the git repo by:
git clone https://github.com/IBMSpectrumComputing/lsf-python-api.git
cd lsf-python-api
# Don't skip the following line
python setup build
python -m pip install --user .
To test if the installation is correct, run any script inside the
lsf-python-api/examples
and see if you can read the cluster
information.
Most likely you wish to have a user-wide API installation, and use it inside every virtualenv created. Simply allow the virtualenv to use “system-site-pacakges” when you install it.
python -m venv --system-site-packages /path/to/venv
Note: this should be done at the time the virtualenv is initialized.