thasso / pyjip

JIP Pipeline System
http://pyjip.readthedocs.org
Other
19 stars 8 forks source link

submit does not work on SGE #57

Open jdidion opened 9 years ago

jdidion commented 9 years ago

From what I can gather, jip submits jobs to SGE by calling qsub with its arguments and then passing "exec jip exec --db " on stdin. This does not work, at least on the version of SGE installed on our cluster. The job just ends up in the Eqw state. It seems like a much better option is just to call qsub with the -b y option and then pass the jip exec command on the command line. The fix described below works.

Add the following method to db.py/Job:

def get_cluster_command_list(self):
    """Returns the command that should send to the
    cluster to run this job as a list of arguments.

    :returns: list
    """
    if db_in_memory or db_path is None:
        return ["jip", "exec", str(self.id)]
    else:
        return ["jip", "exec", "--db", db_path, str(self.id)]

Then change cluster.py/SGE.submit:

job_cmd = job.get_cluster_command_list() ... cmd.extend(["-b", "y"]) process = Popen(cmd + job_cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)

thasso commented 9 years ago

@emi80 I don't have a access to a real world SGE implementation :( Can you confirm that you have the -b command line option as well? If its version dependent we might need to add some configuration option.

emi80 commented 9 years ago

@thasso I also have the -b option in our SGE (univa 8.2 as you can see below):

$ gsub -help
UGE 8.2.0
usage: qsub [options]
   ...
   [-b y[es]|n[o]]                          handle command as binary
   ...

I think that also the Open Grid Scheduler SGE implementation has the -b option even if I cannot check.