[GE users] Java DRMAA does not execute job ?

reuti reuti at staff.uni-marburg.de
Mon Nov 2 14:42:30 GMT 2009


Am 02.11.2009 um 15:38 schrieb templedf:

> That's because of the default assumptions DRMAA makes.  See the
> drmaa_attributes(5) man page:
>
> By default DRMAA sets four options for all jobs.  These are "-p   
> 0", "-b
> yes", "-shell no", and "-w e".
>
> Setting -shell no and -b yes, means that it can't execute a  
> script.  In
> order to execute a script, use either the native specification or job
> category to set either "-shell yes" or "-b no".

But a script can usually also be executed as a binary - if it was  
made executable and a path was given like ./simple.sh or it's in the  
$PATH. This should also work in DRMAA.

-- Reuti


> Daniel
>
> umanga wrote:
>> Greetings all,
>>
>> I am a completely newbie to SGE.
>> I am trying to use Java DRMAA to submit jobs to SGE, I used following
>> code in one of 'submit hosts' . "/SGE6" is a shared NFS folder.
>> I execute this program as a normal user (not sgeadmin).
>> It always give the output "Job xx never ran".
>> But when I run CLI as "qsub /SGE6/simple.sh" it generates expected  
>> output.
>> What can be the issue?
>>
>> Thanks in advance,
>> umanga
>>
>>
>> SessionFactory sfactory=SessionFactory.getFactory();
>> Session  session=sfactory.getSession();
>> session.init("");
>>       JobTemplate jt=session.createJobTemplate();
>> jt.setWorkingDirectory("/SGE6");
>> jt.setRemoteCommand("simple.sh");
>>              String id=session.runJob(jt);
>>       System.out.println("Job has been submittied with id "+id);
>> session.deleteJobTemplate(jt);
>>       JobInfo info=session.wait(id,Session.TIMEOUT_WAIT_FOREVER);
>>      if (info.wasAborted()) {
>>    System.out.println("Job " + info.getJobId() + " never ran");
>>        } else if (info.hasExited()) {
>>          System.out.println("Job " + info.getJobId() +
>>                " finished regularly with exit status " +
>>                 info.getExitStatus());
>>      } else if (info.hasSignaled()) {
>>           System.out.println("Job " + info.getJobId() +
>>                 " finished due to signal " +
>>                 info.getTerminatingSignal());
>>        } else {
>>           System.out.println("Job " + info.getJobId() +
>>                " finished with unclear conditions");
>>        }
>>
>>       System.out.println("Job Usage:");
>>
>>       Map rmap = info.getResourceUsage();
>>         Iterator i = rmap.keySet().iterator();
>>
>>        while (i.hasNext()) {
>>            String name = (String)i.next();
>>         String value = (String)rmap.get(name);
>>
>>           System.out.println("  " + name + "=" + value);
>>        }           session.exit();
>>
>> ------------------------------------------------------
>> http://gridengine.sunsource.net/ds/viewMessage.do? 
>> dsForumId=38&dsMessageId=224562
>>
>> To unsubscribe from this discussion, e-mail: [users- 
>> unsubscribe at gridengine.sunsource.net].
>>
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do? 
> dsForumId=38&dsMessageId=224619
>
> To unsubscribe from this discussion, e-mail: [users- 
> unsubscribe at gridengine.sunsource.net].

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=224624

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list