Opened 14 years ago

Last modified 9 years ago

#328 new enhancement

IZ1973: consider support for running a script with an embedded -t option

Reported by: templedf Owned by:
Priority: low Milestone:
Component: sge Version: 6.0u2
Severity: Keywords: drmaa
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=1973]

        Issue #:      1973             Platform:     All           Reporter: templedf (templedf)
       Component:     gridengine          OS:        All
     Subcomponent:    drmaa            Version:      6.0u2            CC:    None defined
        Status:       NEW              Priority:     P4
      Resolution:                     Issue type:    ENHANCEMENT
                                   Target milestone: ---
      Assigned to:    templedf (templedf)
      QA Contact:     templedf
          URL:
       * Summary:     consider support for running a script with an embedded -t option
   Status whiteboard:
      Attachments:

     Issue 1973 blocks:
   Votes for issue 1973:


   Opened: Mon Feb 6 11:14:00 -0700 2006 
------------------------


Description:
The current form of submission to the Sun Grid Compute Utility basically
requires one to embed a -t option in a #$ directive in the command script if you
want to spawn an array job. If I want to take this same form of submission and
execute it on a local Grid Engine installation using the Java DRMAA API, I can't
use runJob because the -t option gets ignored, and in order to use runBulkJobs I
have to manually parse the script to find and extract the -t option myself.
Since the DRMAA implementation is already parsing the embedded options, it would
be much more convenient if there was a variant method available like
    List runJobs(JobTemplate jt)
that would pay attention to an embedded -t.  Short of this being added to the
DRMAA standard, perhaps an implementation-specific method could be added to
SessionImpl, perhaps implementing a non-standard subinterface of Session.
*** (#1 of 1): 2006-01-31 19:57:10 MET bob.scheifler@sun.com

Comments:
I don't see why we couldn't add a method to the com.sun.grid.drmaa.SessionImpl
class, just as suggested.  That class does *not* represent the standard DRMAA
interface.  It is only an implementation class.  The DRMAA interface would
remain the same.  If someone wanted to use the new method, they would have to
explicitly switch to using the Sun-specific class, e.g.:

SessionFactory sf = SessionFactory.newFactory();
Session s = sf.newSession ();
JobTemplate jt = s.createJobTemplate ();
com.sun.grid.drmaa.SessionImpl si = (com.sun.grid.drmaa.SessionImpl)s;

List l = si.runJobs (jt);

Evaluation:
This RFE is reasonable and shouldn't take much effort.  The only thing speaking
against it is the potential political ramifications of going outside of the
DRMAA spec.  I think, though, that as long as the work in done only in the
com.sun.grid.drmaa package, there shouldn't be any issue.

Work Around:
Parse the script before sending it to DRMAA to determine if the -t is used and
what it's value is.

Change History (0)

Note: See TracTickets for help on using tickets.