On Nov 5, 2010, at 11:14 AM, Ole Weidner wrote:
> Hi,
> 
> I have a small problem with the GRAM C API. I can't figure out a way to 
> retrieve Error Code 5 ("the executable does not exist"). I use the client_job 
> request API call:
> 
> (void)globus_mutex_lock(&monitor.mutex);
> {
>    err = globus_gram_client_job_request(gram_url.c_str(),
>                                         rsl.c_str(),
>                                         GLOBUS_GRAM_PROTOCOL_JOB_STATE_ALL,
>                                         callback_contact,
>                                         &monitor.job_contact);
> }
> (void)globus_mutex_unlock(&monitor.mutex);
> 
> ...along with some code before and and after to make sure everything is 
> properly initialized, shutd-down and to check the monitor struct (and 
> possible errors received by it). 
> 
> The "err" variable gives me the proper error code in pretty much all 
> situations (e.g. invalid job contact, invalid rsl, etc...) but not in the 
> case of a non-existing executable! By the end of the submission process,  
> monitor.failure_core is set to GLOBUS_SUCCESS, but monitor.job_state is set 
> to -1 (Failed). 

Some errors are detected when the job is accepted into the GRAM service, and 
others when the GRAM service contacts the LRM to process the job. I think what 
you are seeing is an instance of the second case. In that case, you'll see a 
successful job request, followed by a job state callback indicating the job has 
failed with errorcode 5.

> I know that the globus command line tools return the proper error message in 
> case of a non-existing executable:
> 
> globus-job-run qb1.loni.org blah
> GRAM Job failed because the executable does not exist (error code 5)
> 
> I spent some time looking at the source code for the cmd-line tools, but 
> unfortunately, I couldn't really figure out how it is done. 
> 
> Any ideas?
> 
> Thank you,
> Ole

Reply via email to