Coder Social home page Coder Social logo

JNI implementation about slurm-drmaa HOT 6 CLOSED

natefoo avatar natefoo commented on May 27, 2024
JNI implementation

from slurm-drmaa.

Comments (6)

varduefr avatar varduefr commented on May 27, 2024

Hi, I'm trying to do the same using drmaa.jar from SGE but after compiling libdrmaa.so for SLURM I'm trying to point to the compiled library in:
export DRMAA_LIBRARY_PATH=/home/vargasfr/slurm_drmaa/slurm-drmaa-1.1.2/install/lib/libdrmaa.so
export LD_LIBRARY_PATH=/home/vargasfr/slurm_drmaa/slurm-drmaa-1.1.2/install/lib/

But I'm getting an error in the Java code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.grid.drmaa.SessionImpl.nativeInit(Ljava/lang/String;)V
at com.sun.grid.drmaa.SessionImpl.nativeInit(Native Method)
at com.sun.grid.drmaa.SessionImpl.init(SessionImpl.java:291)
at Test2.main(Test2.java:16)

Did you find a solution?
Thanks!

from slurm-drmaa.

GuilhemSempere avatar GuilhemSempere commented on May 27, 2024

Hi

Well the solution I went for was to write my own JobManager (which doesn't use drmaa) for Opal Toolkit.

If your goal is also to make Opal work with Slurm you will probably be able to use this out of the box: https://gitlab.southgreen.fr/AGAP_ID_Java/Opal-SlurmCompatible

Otherwise maybe you can use it as an example and adapt it to your own purpose?

G.

from slurm-drmaa.

varduefr avatar varduefr commented on May 27, 2024

from slurm-drmaa.

GuilhemSempere avatar GuilhemSempere commented on May 27, 2024

This jar is the result of running build.xml, it contains just the 2 classes that needed to be added to Opal Toolkit for it to be compatible with Slurm. So this is indeed where you have to look:

https://gitlab.southgreen.fr/AGAP_ID_Java/Opal-SlurmCompatible/-/blob/master/src/edu/sdsc/nbcr/opal/manager/SlurmJobManager.java

https://gitlab.southgreen.fr/AGAP_ID_Java/Opal-SlurmCompatible/-/blob/master/src/edu/sdsc/nbcr/opal/manager/slurm/Job.java

I must specify that if your current app entirely relies on drmaa, I think you'll have much more to implement. In my case Opal was already able to talk to several non-drmaa schedulers so it was quite easy to take one of them as example and adapt the code to Slurm syntax.

Good luck ;-)

from slurm-drmaa.

natefoo avatar natefoo commented on May 27, 2024

I'm not really familiar enough with Java to understand the details here but it seems that Java bindings for DRMAA like the one provided with SGE are not simply wrappers around the C libraries like the bindings for other languages (e.g. Python). Here is some discussion of it from a long while back for someone looking to do the same with Torque:

https://stackoverflow.com/questions/2715243/is-there-a-drmaa-java-library-that-works-with-torque-pbs

Creating a full Java DRMAA binding that is Slurm-specific is well outside the scope of this project, unless I am misunderstanding what is necessary to support a Java binding that links against slurm-drmaa.

from slurm-drmaa.

natefoo avatar natefoo commented on May 27, 2024

Closing for out of scope, but please let me know if I've misunderstood.

from slurm-drmaa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.