[drmaa-wg] Additional error for C binding

Roger Brobst rogerb at cadence.com
Wed Oct 12 15:42:21 CDT 2005


I think the spec should specify some constant like
DRMAA_JOBID_BUFFER and the implementation should
truncate the output string if a sufficient buffer
is not provided.

I do not think this omission merits breaking the
existing C-Lang API or rehashing the underlying
discussion about memory management.

-Roger


In a previous e-mail, Peter Troeger wrote:
> Oh, Dan is now back on US time. I am the only remaining person
> working at night on DRMAA ;-)
> 
> If we can agree on the last proposal from Dan, I could add an
> according test to the test suite. The first proposal would break
> all existing implementations and applications.
> 
> Hrabri, please but this on the agenda for the next phone conference,
> together with the other new issues from the last mails. Somebody
> might also add a tracker item.
> 
> Thank you,
> Peter.
> 
> Am 12.10.2005 um 21:44 schrieb Daniel Templeton:
> 
> > I think the SGE implementation just truncates the job id, but I'm not
> > sure.  My vote would be, as Hrabri fell just short of suggesting, to
> > drop the length parameter and make the buffer a char**.  I don't think
> > we have an error code which adequately represents the described error
> > condition, but I'd say Invalid Argument is the best we can do with  
> > what
> > we have.
> >
> > Daniel
> >
> > Rajic, Hrabri wrote On 10/12/05 12:20,:
> >
> >> There is how the spec treats a similar parameter job_name:
> >>
> >>    DRMAA_JOBNAME_BUFFER = 1024.
> >>
> >> At the other place spec says:
> >>
> >> job name
> >> A job name SHALL comprise alphanumeric and _ characters.
> >> The drmaa-implementation SHALL NOT provide the client with a job
> >> name longer than DRMAA_JOBNAME_BUFFER -1 (1023) characters.
> >> The drmaa-implementation MAY truncate any client-provided job name
> >> to an implementation-defined length that is at least 31 characters.
> >> The attribute name is drmaa_job_name
> >>
> >> I think that the intent was to let the implementation provide  
> >> adequate
> >> space to job_id since it was not marked as an In parameter.  The app
> >> would copy it in an adequate length buffer (incurring performance  
> >> hit).
> >> C-spec has done optimization here, but the adequate error code is now
> >> missing in the language independent spec.
> >>
> >> Hrabri
> >>
> >>
> >>
> >>> -----Original Message-----
> >>> From: owner-drmaa-wg at ggf.org [mailto:owner-drmaa-wg at ggf.org] On  
> >>> Behalf
> >>>
> >>
> >> Of
> >>
> >>
> >>> Peter Troeger
> >>> Sent: Wednesday, October 12, 2005 1:53 PM
> >>> To: DRMAA Working Group
> >>> Subject: [drmaa-wg] Additional error for C binding
> >>>
> >>> Hi,
> >>>
> >>> the DRMAA C-binding 1.0 defines an additional parameter for the
> >>> string length (job_id_out_len) whenever job_id_out is part of the
> >>> method signature. In the DRMAA spec, this is not considered - the
> >>> string is simply marked as output argument. I would be interested
> >>> what kind of error a DRMAA C-library should return of the buffer for
> >>> the job_id_out parameter is too small: OUT_OF_MEMORY ?
> >>> INVALID_ARGUMENT ?
> >>>
> >>> Regards,
> >>> Peter.
> >>>
> >>
> >>
> >>
> >
> >

-- 
Roger Brobst                            Cadence Design Systems
Internet: rBrobst at cadence.com           555 River Oaks Parkway MS-1B1
Voice: (408)894-3422                    San Jose, CA 95134





More information about the drmaa-wg mailing list