[DRMAA-WG] [GE dev] python drmaa tutorial

Andreas.Haas at Sun.COM Andreas.Haas at Sun.COM
Wed Mar 5 03:18:03 CST 2008


On Wed, 5 Mar 2008, Cheng Soon Ong wrote:

> Hi Andreas,
>>> 
>>> I've been playing around with python and sge, and translated the drmaa 
>>> tutorial at
>>> http://gridengine.sunsource.net/project/gridengine/howto/drmaa.html
>>> to a python version. Look at sge_tutorial.rst in the attached archive.
>> 
>> wonderful tutorial!
>> 
>
> Thanks! :-)
>
>> With your allowance I would make "sge_tutorial.html" available as
>>
>>   http://gridengine.sunsource.net/howto/drmaa_python.html
>> 
>> and link it from
>>
>>   http://gridengine.sunsource.net/howto/howto.html
>> 
>> the tar.gz with the *.py files we could upload to
>>
>>   http://gridengine.sunsource.net/servlets/ProjectDocumentList
>> 
>
> I am happy to make it publicly available. I don't know how sun treats 
> contributions from the public. If there are any issues of copyright, we can 
> take it offline.

Ok. I'll send you separate mail on this.

>>> Also, I have several small bug fixes to Enrico's interface when I used 
>>> (patch attached):
>>> SGE_VERSION="6.1.u1"
>>> SWIG version 1.3.31
>> 
>> Well, I hope Enrico picks this up.
>> 
>>> Since I couldn't find any official repository for the python interface, I 
>>> am mailing it here.
>> 
>> If it helps we could certainly add a small subproject like "drmaa4python" 
>> along the lines of
>>
>>   http://drmaa4ruby.sunsource.net/
>> 
>> as a matter of course this would require Enricos acceptance. Actual benefit 
>> were a separate CVS repository and a mailing list.
>> 
>
> At the moment, I don't see a need for a project page yet. I haven't tried it 
> on anything but python, but SWIG (www.swig.org) is pretty good at generating 
> code for various languages, including ruby. So, it is possible that instead 
> of having diverging implementations of drmaa for sge, we should use the 
> reference C implementation and swig it to all the other languages.

The Ruby binding actually does not use SWIG. Instead it uses Ruby/DL module 
(Ruby 1.8.6 or later) that provides a generic mechanism for binding and 
parameter handling. Benefit is that no compilation step is needed before 
the Ruby binding can be used!

The issue of diverging implementations still exists. Recently I heard 
there is a Ruby binding for GridWay DRMAA implementation that uses SWIG. 
Actually I haven't seen it so far, but applications written on top of 
Gridway DRMAA Ruby binding would certainly need to be reworked before 
they can be run with the drmaa4ruby binding. This kind of divergence
is annoying, but certainly no threat since both bindings base on DRMAA
C that is standarized as ABI. That means reworking such an application 
was not needed, except if the Ruby binding worked with a particular
DRMAA C implementation only. In case of the drmaa4ruby binding I got
a confirmation that it works with Torque/OpenPBS DRMAA C implementation
at least.

> However, a separate python mailing list may be of use. A few of my colleagues 
> and I are playing with an even higher level interface in python, and it would 
> only be of interest to people who use the python interface.

We can set up such a mailing list, even though it turned out with drmaa4ruby that 
it is rarely used. Issues of broader interest are mostly discussed via the DRMAA 
mailing list (cc) or here at Grid Engine dev at . Until now nobody complain about 
"off-topic" mail traffic, but DRMAA mailing list would actually be the first 
choice.

Best regards,
Andreas


More information about the drmaa-wg mailing list