public void runHold() {
    this.createJob = new CreateSleeperJobTemplate(this.session, this.executable, "5", true);

    try {
      this.session.init(null);
      System.out.println("Session Init success");

      this.jt = this.createJob.getJobTemplate();

      this.id = this.session.runJob(this.jt);
      System.out.println("Job successfully submitted ID: " + this.id);

      this.status = this.session.getJobStatus(this.id);
    } catch (Exception e) {
      System.err.println("Test " + this.type + " failed");
      e.printStackTrace();
      this.stateAllTest = false;
    }
  }
Beispiel #2
0
  public void run() {
    Set attributes;
    Iterator attrIterator;

    this.createJob = new CreateSleeperJobTemplate(this.session, this.executable, "5", false);

    try {
      this.session.init(null);
      System.out.println("Session Init success");

      this.jt = this.createJob.getJobTemplate();

      attributes = this.jt.getAttributeNames();

      attrIterator = attributes.iterator();

      while (attrIterator.hasNext()) {
        String attr = (String) attrIterator.next();
        System.out.println(attr);
      }

      System.out.println("Succesfully finished test " + this.type);

    } catch (Exception e) {
      System.err.println("Test " + this.type + " failed");
      e.printStackTrace();
      this.stateAllTest = false;
    }

    try {
      this.session.exit();
    } catch (DrmaaException e) {
      System.err.println("drmaa_exit() failed");
      e.printStackTrace();
      this.stateAllTest = false;
    }
  }
  public void run() {
    int n = 20;

    this.createJob = new CreateSleeperJobTemplate(this.session, this.executable, "5", false);

    try {
      this.session.init(contact);
      System.out.println("Session Init success");

      this.jt = this.createJob.getJobTemplate();

      for (int i = 0; i < n; i++) {
        this.id = this.session.runJob(this.jt);
        System.out.println("Job successfully submitted ID: " + this.id);
      }

      for (int i = 0; i < n; i++) {
        JobInfo info = this.session.wait(Session.JOB_IDS_SESSION_ANY, Session.TIMEOUT_WAIT_FOREVER);
      }

      System.out.println("Succesfully finished test " + this.type);

    } catch (Exception e) {
      System.err.println("Test " + this.type + " failed");
      e.printStackTrace();
      this.stateAllTest = false;
    }

    try {
      this.session.exit();
    } catch (DrmaaException e) {
      System.err.println("drmaa_exit() failed");
      e.printStackTrace();
      this.stateAllTest = false;
    }
  }