DRMAA PBS

PBS implementation for DRMAA applications

GroupId

GroupId

org.biouno
ArtifactId

ArtifactId

drmaa-pbs
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

DRMAA PBS
PBS implementation for DRMAA applications
Project URL

Project URL

https://github.com/biouno/drmaa-pbs
Project Organization

Project Organization

BioUno
Source Code Management

Source Code Management

https://github.com/biouno/drmaa-pbs

Download drmaa-pbs

How to add to project

<!-- https://jarcasting.com/artifacts/org.biouno/drmaa-pbs/ -->
<dependency>
    <groupId>org.biouno</groupId>
    <artifactId>drmaa-pbs</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.biouno/drmaa-pbs/
implementation 'org.biouno:drmaa-pbs:0.2'
// https://jarcasting.com/artifacts/org.biouno/drmaa-pbs/
implementation ("org.biouno:drmaa-pbs:0.2")
'org.biouno:drmaa-pbs:jar:0.2'
<dependency org="org.biouno" name="drmaa-pbs" rev="0.2">
  <artifact name="drmaa-pbs" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.biouno', module='drmaa-pbs', version='0.2')
)
libraryDependencies += "org.biouno" % "drmaa-pbs" % "0.2"
[org.biouno/drmaa-pbs "0.2"]

Dependencies

compile (5)

Group / Artifact Type Version
us.levk : drmaa-common jar 1.0
org.apache.commons : commons-exec jar 1.2
com.xebialabs.overthere : overthere jar 4.1.1
commons-lang : commons-lang jar 2.6
commons-io : commons-io jar 2.4

Project Modules

There are no modules declared in this project.

drmaa-pbs

DRMAA PBS Java library, using command executions like qsub and qstat

This library is not complete, and implements DRMAA v1 by calling native commands (qsub, qstat, pbsnodes, etc).

Example

package org.biouno.drmaa_pbs;

import java.util.HashMap;
import java.util.Map;

import org.ggf.drmaa.DrmaaException;
import org.ggf.drmaa.JobTemplate;
import org.ggf.drmaa.Session;
import org.ggf.drmaa.SessionFactory;

public class Test {

    public static void main(String[] args) {
        SessionFactory sf = SessionFactory.getFactory();
        Session s = sf.getSession();

        try {
            // http://biouno.org/2014/06/21/java-drmaa-api-part-1/
            Map<String, String> options = new HashMap<String, String>();
            options.put("os", "UNIX");
            options.put("address", "localhost");
            options.put("port", "10022");
            options.put("username", "testuser");
            options.put("password", "testuser");
            options.put("connectionType", "SCP");
            ((SessionImpl) s).init("ssh", options);
            JobTemplate jt = new JobTemplateImpl();
            jt.setRemoteCommand("/home/testuser/torque.submit");
            String id = s.runJob(jt);
            int i = s.getJobProgramStatus(id);
            System.out.println(i);
            s.deleteJobTemplate(jt);
            System.out.println("Your job has been submitted with id " + id);
            s.exit();
        } catch (DrmaaException de) {
            de.printStackTrace(System.err);
        }

        System.out.println("OK!");
        System.exit(1);
    }

}

The output will be similar to.

Sep 26, 2015 1:26:16 PM org.biouno.drmaa_pbs.SessionImpl runJob
INFO: jobId: 9.localhost

32
Your job has been submitted with id 9.localhost
OK!

Changelog

  • v0.3 - Implemented basic functions for running, stopping and monitoring jobs. Tested on NCI's Raijin which uses a modified version of Pbs Pro (thanks to @kevyin)
org.biouno

BioUno

Continuous Integration tools and techniques applied in Bioinformatics

Versions

Version
0.2
0.1