[GE users] failed searching requested shell sge6 u3 drmaa - solution

Ralf Sigmund sigmund at ipk-gatersleben.de
Fri Mar 11 10:10:27 GMT 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

Hi Fred,
you helped me so much with using the drmaa  java binding.
to summarize:
if one wants to submit a shell script using the drmaa java api the 
following works:


<!-------------------- file TEST1.java 
-------------------------------------------->
package de.ipk.agbi.jdrCl;

import org.ggf.drmaa.*;

public class TEST1 {
    public static void main(String[] args) throws DrmaaException {
        SessionFactory factory = SessionFactory.getFactory();
        Session session = factory.getSession();
        session.init(null);
        JobTemplate jt = session.createJobTemplate();
        jt.setNativeSpecification("-cwd -shell y -b n");
        jt.setRemoteCommand("/home/sigmund/simple.sh");
        String id = session.runJob(jt);
        System.out.println("job submitted with id: "+id);
    }
}
<!------------------------------------>
the drmaa howto should really have 2 lines that suggest to set 
NativeSpecification to "-cwd -shell y -b n"

thanks again Fred!
cheers ralf


Fred L Youhanaie wrote:

>
> Hi Ron,
>
> This is on 6.0u1 courtesy binaries on a linux x86. FC2, 2.6.9.
>
> I can reproduce the problem with the howto2.c in 
> $SGE_ROOT/examples/drmaa. Copy the file to a local directory, compile, 
> create a .sge_request file with '-b no' and '-shell yes' and run it. 
> It is this submit process (howto2) that segfaults.
>
> The segfault occurs in drmaa_run_job, and more specifically in 
> parse_script_file (gdb shows somewhere inside fopen!) The crash occurs 
> whether the script file, sleeper.sh, exists or not.
>
> However, if I set SGE_DRMAA_ALLOW_CWD and '-cwd' everything works fine!
>
> I'll dig deeper and report back.
>
> Cheers
> f.
>
> Ron Chen wrote:
>
>> --- Fred L Youhanaie <fly at anydata.co.uk> wrote:
>>
>>> However, trying to pass '-b no' to the drmaa job, either via the 
>>> native_specifications attribute or ~/.sge_request causes the drmaa 
>>> process to segfault!! '-shell yes' is OK, but one needs both options.
>>
>>
>>
>> I can't reproduce the problem, so may be you can provide more detail?
>>
>> - which version of SGE are you using?
>> - can you reduce the C program a bit and post it here?
>> - by "the drmaa process to segfault", you mean the submit process, 
>> not the job?
>> - and the platform you are on?
>>
>>  -Ron
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list