mskcc / bunny

Reproducible Analyses for Bioinformatics - Java; used for Voyager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Explore LSF SLA submission options

allanbolipata opened this issue · comments

Currently we cannot submit to the CMOPI SLA queue because the library we're using doesn't support it right now. Off the top of my head, we have a few options:

  1. Modify the library ourselves or wait for them to implement it. I've submitted an issue; @imprezka88 can look into implementing it in the meantime.
  2. Request HPC to have specific users auto attach to the SLA. As seen here, we could request a change in the way our SLA is defined so that we can auto attach to the SLA without using the -sla option.
  3. Use a different library. We can try this one; see https://github.com/JaneliaSciComp/java-lsf/blob/master/README.md:
JobManager mgr = new JobManager(api);
JobMonitor monitor = new JobMonitor(mgr);
monitor.start();

JobTemplate jt = new JobTemplate();
jt.setRemoteCommand("bash");
jt.setArgs(Arrays.asList(scriptPath));
jt.setJobName("test");
jt.setInputPath(inputDirPath+"/input.#");
jt.setOutputPath(outputDirPath+"/out.#");
jt.setErrorPath(outputDirPath+"/err.#");
jt.setNativeSpecification(Arrays.asList("-W 1", "-n 2"));

final JobFuture future = mgr.submitJob(jt);

future.whenCompleteAsync(new BiConsumer<Collection<JobInfo>, Throwable>() {
    @Override
    public void accept(Collection<JobInfo> infos, Throwable t) {
        if (t!=null) {
            log.error("Error running job", t);
        }
        log.info("Job has completed: "+infos);
    }
});

We are in contact with genestack, they are helping us add SLA to their lsf client

genestack/lsf-java-client#4