English 中文(简体)
Is there a DRMAA Java library that works with Torque/PBS?
原标题:

Does anybody know a Java implementation of the DRMAA-API that is known to work with PBS/Torque cluster software?

The background behind this: I would like to submit jobs to a newly set-up linux cluster from Java using a DRMAA compliant API. The cluster is managed by PBS/Torque. Torque includes PBS DRMAA 1.0 library for Torque/PBS that contains a DRMA-C binding and provides in libdrmaa.so and .a binaries. I know that Sun grid engine includes a drmaa.jar providing a Java-DRMAA API. In fact I opted to use SGE but it was decided to try PBS first.

The theory behind that decision was:
DRMAA is a standard and therefore a Java API needs only a standards compliant drmaa-c binding. However, I couldn t find such general DRMAA-C-java API and now assume that this assumption is wrong and that the Java libraries are engine specific.

Edit: I just experimented with the drmaa.jar from sun grid engine package and tried to cross-use it with the pbs libdrmaa.so. Not surprisingly, that failed (JNI unsatisfied link error).

Conclusion: It does not work that way! After some search I see only these few options:

  1. Install GridWay ontop of Globus toolkit. Installed ontop of PBS, GridWay claims to provide DRMAA in Java. Looks far too complex for my setting.
  2. Scrap DRMAA, submit to PBS by calling system command qsub, qstat, etc. from Java. Simple but not so nice.
  3. Implement a drmaa binding myself. Way too complex...

  4. Switch to Grid Engine. GE in my opinion is superior over PBS with respect to language bindings.

I tend to prefer option 2. or 4. Any recommendations?

最佳回答

After some more searching it looks like I have to write something myself. There seems to be not optimal answer yet, but it can serve as a warning for those attempting the same.

The best place to ask these questions is possibly the Torque mailing list: www.clusterresources.com/resources/mailing-lists.php

First of all, the reason why you cannot just use any DRMAA-Java library and use it with any DRMAA-C implementation is: DRMAA describes the interface of the resource control, not how it is implemented. The vendor could use a DRMAA-C implementation and use only these functions, but they do not have to. It can use whatever is there in the engine. So one important message is: if you need certain language bindings, make sure they are there for all languages required.

Regarding the options mentioned:

  1. Using GridWay/Globus Toolkit: http://www.gridway.org/doku.php?id=start Advantage: Gridway is a meta scheduler that supports many resource management systems (SGE, PBS,...). Possibly, the only way to get a DRMAA interface to work with PBS at the moment. Disadvantage: It seems like an inflation of layers and complexity. Have no experience with that.

  2. Using system commands, qsub, qstat, qdel. Advantage: quick hack Disadvantages: dirty hack, need to implement parsers for the output, might not notice if something goes wrong, pass around messages from stdin/stdout/stderr, not portable

  3. Using JNI it should be possible to create a binding for each c-function in drmaa.c Advantage: would provide a full drmaa implementation (hopefully) Disadvanteges: involves compiled code, lot of manual wrapping of C-functions (maybe this can be automated)

  4. Switch to another grid engine. Possibly, we should have done this analysis before. However, we already have one other Torque cluster, and there is experience with this. Operating two would create more heterogeneous infrastructure.

  5. Changing an existing drmaa library from a different vendor. No idea if that is feasible... We will look into that too.

问题回答

I also had this problem. This is a project to create an Object Oriented C++ and Java DRMAA Binding for PBS/Torque.

The downside is that you have to be able to load the library created from the C++ code, so it is not a "pure Java" implementation that can be distributed only as a .jar file, expecting the end user to provide "libdrmaa.so" themselves.

For what it s worth, here it is: https://github.com/bryan-lunt/PBSJavaDRMAA/

Did you ever decide what to do with this? Did you manage to get Java DRMAA bindings working with Torque/PBS? I m looking to get some Java DRMAA code working on a Torque/PBS system, and if you ve done the hard work already, I d love to steal it.

However, if you haven t, it shouldn t be too bad to make some Java bindings, and I will do it if nobody else does. Several years ago I successfully modified the DRMAA Java bindings for SGE to work with a new DRMAA implementation for Xgrid (now stale, but perhaps soon to be revived).

I even wrote a brief blog post on my experiences (includes a link to general instructions):

http://edbaskerville.com/2006/07/11/java-bindings-working/





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签