• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language SWIG
  • License
    Eclipse Public Li...
  • Created about 11 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Location for the LSF Python wrapper for controlling all things LSF

LSF Python API

These python wrappers allow customers to submit and control jobs and obtain status of queues, hosts and other LSF attributes from Python directly. They work with various versions of LSF and are maintained by LSF developement, though we take contributions from the Open Source community.

If you plan or would like to contribute to the library, you must follow the DCO process in the attached DCO Readme file in the root of this repository. It essentially requires you to provide a Sign Off line in the notes of your pull request stating that the work is clear of infinging work by others. Again, for more details, please see the DCO Readme file.

Release Information

  • IBM Spectrum LSF Python Wrappers
  • Supporting LSF Release: 10.1
  • Wrapper Version: 1.0.6
  • Publication date: 16 October 2013
  • Last modified: 31 August 2018

Contents

  • Introduction
  • Supported Environment
  • Compatibility
  • Installation
  • Release Notes
  • Community Contribution Requirements
  • Copyright

Introduction

This library allows you to call the LSF APIs directly through Python. You can find some examples here. The wrapper is created using Pythons SWIG interface and links directly to LSF's shared libraries.

You are encouraged to contribute your own Python wrappers to the Open Source LSF APIs for Python, and you may find more information and usage notes in IBM Knowledge Center and IBM Support Community.

IBM provides formal support for this software to entitled clients via the normal IBM support channels.

This software is Licensed under the Eclipse Public License.

Please note you must use lsf.lsb_init before any other LSBLIB library routine in your application.

Supported Environment

  • OS

    This package is only tested on Linux platforms.

     Supported operating systems: 
     Linux 2.6 glibc 2.3 x86 64 bit: RHEL 6.2, RHEL6.4, RHEL6.5, RHEL6.8
     Linux 3.10 glibc 2.17 x86 64 bit: Red Hat 7.4, 7.5, 8.8, 8.9
     Linux for Power Systems Servers 8 Little Endian (Linux 3.10, glibc 2.17): RHEL 7.4
     Linux for Power Systems Servers 9 Little Endian (Linux 4.14, glibc 2.17): RHEL 7.5
    
  • SWIG

     SWIG version 2.0, or 3.0
    

    The following versions are tested: SWIG: 2.0.10, 3.0.12

    If isntalling SWIG with pip or pip3, please specify 3.0.12 version. $ pip3 install swig==3.0.12

  • Python

     Python2 and Python3 are all supported.
    

    The following versions are tested: Python 2.6.6, 2.7.15, 3.0, 3.6.0, 3.7.0, 3.12.2

Compatibility

    For LSF 10.1.0.2 or earlier version, the compatibility is not guaranteed
  	if you update LSF at a later time. To avoid this compatibility issue, 
  	update LSF to version 10.1.0.3, or later, then rebuild and reinstall the 
  	LSF Python API package.

Installation

Before compiling the library, set the LSF environment variables:

$ source profile.lsf

If using python version higher than 3.10, distutils has been deprecated, install setuptools:

$ pip3 install setuptools

To compile and install the library, go to the main source directory and type:

$ python setup.py build or $ python3 setup.py build

$ sudo python setup.py install or $ sudo python3 setup.py install

To instead build an RPM:

$ python setup.py bdist_rpm or $ python3 setup.py bdist_rpm

Resulting RPMs will be placed in the dist directory

Release Notes

Release 1.0.6

  • Support Python3
    • If you install Python2 and Python3 in the different directories on the same host, you may build & install LSF Python API package separately with Python2 and Python3. After doing this, you can run Python2 script or Python3 script by using $ python your_lsf_script or $ python3 your_lsf_script.

Release 1.0.5

  • Resolve compatibility issue

    • The issue is due to dynamic library. From now on, the static library will be used by LSF Python API pacakge.
    • For Linux ppc64le, IBM XL C/C++ compiler should be installed firstly.
    • For LSF 10.1.0.2 or earlier version, the compatibility is not guaranteed if you update LSF at a later time. To avoid this compatibility issue, update LSF to version 10.1.0.3, or later, then rebuild and reinstall the LSF Python API package.
    • The code is tested on Linux x86_64 & ppc64le platform with Python2.7
    • For creating RPM package on Linux ppc64le platform, executing the following instruction not to create debug information package due to compatibility issue: $ echo '%debug_package %{nil}' >> ~/.rpmmacros
  • Release RPM binary package for ppc64le platform

    • lsf-pythonapi-10.1.0.6.csm.ppc64le.rpm

Release 1.0.4

  • Fixed a bug for using lsf.lsb_readstream()
  • Added a new example, readstream.py

Release 1.0.3

  • Added 2 extra routines below :
    • lsb_fseek()
    • lsb_ftell()

Release 1.0.2

  • Fix a compliation error

Release 1.0.1

  • This is the first release from IBM Platform Computing.
  • Tested with LSF 9.1.2 on Linux 2.6.
  • In addition to the wrapper for LSF APIs, the following routines were added:
    • get_load_of_hosts() - Returns a list of hostLoad objects.
    • get_host_names() - Returns the name of the hosts in the cluster.
    • get_host_info() - Returns a list of hostInfo objects.
    • get_host_load() - Returns the current values for the resources of a host.

Community Contribution Requirements

Community contributions to this repository must follow the IBM Developer's Certificate of Origin (DCO) process and only through GitHub Pull Requests:

  1. Contributor proposes new code to community.

  2. Contributor signs off on contributions (i.e. attachs the DCO to ensure contributor is either the code originator or has rights to publish. The template of the DCO is included in this package).

  3. IBM Spectrum LSF development reviews contribution to check for: i) Applicability and relevancy of functional content ii) Any obvious issues

  4. If accepted, posts contribution. If rejected, work goes back to contributor and is not merged.

Copyright

(C) Copyright IBM Corporation 2016-2020

U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

IBM(R), the IBM logo and ibm.com(R) are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

More Repositories

1

lsf-kubernetes

Home of the HPC Compatible Kubernetes Integration for IBM Spectrum LSF
40
star
2

lsf-drmaa

Location for the LSF DRMAA API originally creaded by FedStage
Shell
19
star
3

lsf-perl-api

Location for the LSF Perl Module to manipulate all things LSF
XS
17
star
4

lsf-hybrid-cloud

This repository contains sample code to help you extend your LSF cluster to the cloud. It provides fully functional examples of how to setup Hybrid LSF clusters on both IBM Cloud and AWS. It includes Resource Connector configuration to allow automatic scaling of the LSF cloud cluster based on the workload demand. Note: This is sample code.
Shell
15
star
5

lsf-integrations

Integrations between commercial and open source applications and LSF published by IBM and others.
Shell
15
star
6

ray-integration

Ray with LSF. Users can start up a Ray cluster on LSF, and run DL workloads through that either in a batch or interactive mode.
Python
13
star
7

cloud-provider-plugins

Location of cloud provider plugins for LSF Resource Connector
Java
10
star
8

lsfmq

lsfmq provides one way for lsf users to integrate different kinds of messge queues with lsf.
C
10
star
9

lsf-plugins

A location for everything 'e' in LSF elims, esubs, eexec and eauth
C
6
star
10

lsf-faas

LSF Python Function service
Python
5
star
11

lsf-slurm-wrappers

These are a set of wrapper scripts to common Slurm commands that execute LSF commands in the background. The scripts are intended as a migration aid for customers migrating from Slurm to LSF and not as a replacement for the LSF commands.
Perl
5
star
12

lsf-utils

a collection of LSF utilities
Python
5
star
13

spectrum-schematics-cluster

deploy symphony clusters with IBM bluemix schematics
Shell
2
star
14

lsf-operator

Open source of IBM LSF integration on kubernete and openshift
Shell
1
star