[drmaa-wg] Additional error for C binding

Peter Troeger peter.troeger at hpi.uni-potsdam.de
Wed Oct 12 15:07:48 CDT 2005


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





More information about the drmaa-wg mailing list