[drmaa-wg] Additional error for C binding

Daniel Templeton dan.templeton at sun.com
Wed Oct 12 14:44:11 CDT 2005


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.
> 
> 





More information about the drmaa-wg mailing list