Forum: Ruby DRMAA for Ruby

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Andreas Haas (Guest)
on 2006-06-08 03:37
(Received via mailing list)
Hi all,

please find under

a Ruby binding for DRMAA based on Ruby/DL.

DRMAA is an interface standard for job submission and control
to Distributed Resource Manager (DRM) systems such as Condor,
PBS/OpenPBS/Torque, Platform LSF, Sun's N1 Grid Engine and

The example below possibly illustrates best how DRMAA can
be used to run jobs: A short sleeper-job is submitted one times
as sequential job and then 20 times as a bulk job to the DRM.
Once the jobs are done their exit status gets nicely reported.

Documentation is contained in drmaa.rb, but you shouldn't expect it
to be complete. The best resource for DRMAA as such is the "language
independent specification" on Besides looking
into the documentationof the implementing DRM certainly is not a
bad idea.

Best regards,


require 'drmaa'

class Sleeper < DRMAA::JobTemplate
    def initialize

version = DRMAA.version
drm = DRMAA.drm_system
impl = DRMAA.drmaa_implementation
contact =
puts "DRMAA #{drm} v #{version} impl #{impl} contact #{contact}"

session =

t =

jobid =
puts "job: " + jobid

session.run_bulk(t, 1, 20).each { |job|
    puts "job: " + job

session.wait_each{ |info|
    if ! info.wifexited?
       puts "failed: " + info.job
       puts info.job + " returned with " + info.wexitstatus.to_s

exit 0
This topic is locked and can not be replied to.