Git Product home page Git Product logo

drmaa2-python's Introduction

(c) Copyright 2008-2022 Altair Engineering Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and
limitations under the License.

UGE DRMAA v2 Python API

Prerequisites

UGE DRMAA2 requires recent versions of the following software:

  1. UGE (8.6.8 or above)
  2. Python (v2.7.5 or later in 2.7 series, or in any 3.x series)
  3. Setuptools (0.9.8 or later; for egg installation)
  4. Nose (1.3.7 or later; for testing)
  5. Sphinx (1.1.3 or later; for generating documentation)
  6. Standard development tools (make)
  7. Python wheel module (0.32.3 or later; for generating wheel package)
  8. enum34 module for IntEnum (remove enum module)

The software versions listed above were used for API development and testing, on CentOS 7.2 (64-bit).

Build/Package

In the top level directory run:

  $ make clean
  $ make

This command should create installable egg and wheel packages, as well as generate documentation and copy it into the dist directory.

Basic API Usage

For simple testing, without installing UGE DRMAA2 egg or wheel package, do the following:

  1. Setup SGE environment:
  $ source $SGE_ROOT/$SGE_CELL/common/settings.sh
  1. Setup PYTHONPATH environment variable to point to the top level directory:
  $ export PYTHONPATH=<UGE_DRMAA2_PYTHON_ROOT>

This step is not needed if UGE DRMAA2 egg or wheel package is installed.

  1. At this point you can import and use the drmaa2 module:
  $ python
  >>> import drmaa2
  >>> print(drmaa2.get_drmaa_name())
  Univa Grid Engine Drmaa V2

Note that there are a number of API usage examples located under the examples directory.

Running Test Suite

  1. Setup SGE environment:
  $ source $SGE_ROOT/$SGE_CELL/common/settings.sh
  1. In the top level directory run:
  $ make test

drmaa2-python's People

Contributors

alea55 avatar creissmann avatar drajagopal-altair avatar maxweiss avatar mdonauer avatar peterc-dls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drmaa2-python's Issues

Linking error on UGE 8.6.7

Hi, I get the following error when I try to run print(drmaa2.get_drmaa_name())

uge_root/lib/lx-amd64/libdrmaa2.so: undefined symbol: uge_vi_impl_spec_get

Conda forge

Just wondering if there are plans to release this as a Conda-forge feedstock? Would like to integrate this into our tools but it would need to be distributed as a Conda package. Would be happy to help.

Make with params.mk crates __init__.py

Hi there,

Just trying to make the project from a fresh clone.

Upon running make, __version__ gets set to 8.6.8 which is clearly not a valid number nor a proper string.

Latest source code has it set to __version__ = '8.7.0a0' in init.py. Setting the variable in params.mk to "'8.7.0a0'" fixes the issue.

Submitting array job with sudo fails.

Hi, I'm having some trouble using the Sudo object with run_bulk_jobs.

Here's an example that works, but using run_job instead.

from drmaa2 import JobSession
from drmaa2 import JobTemplate
from drmaa2 import Sudo

if __name__ == '__main__':
    auth = Sudo(username='chebee7i')
    js = JobSession()
    d = {
        'remote_command': '/bin/bash',
        'args': ['-c', 'echo hi'],
        'implementation_specific': {
            'uge_jt_native': '-w e -l h_rt=100000:00:00,estmem=51539605552.0,h_vmem=72.000G',
        },
    }
    print('Running job using dictionary: %s' % d)
    j = js.run_job(d, auth)
    print('Submitted job: %s' % j)

If I change that submission line to:

    j = js.run_bulk_jobs(d, 1, 10, 2, 2, auth=auth)

then I get a failure:

2021-11-16 23:20:42,913 DEBUG job_session.py:314:  Using sudo object: {'username': 'chebee7i'}
Traceback (most recent call last):
  File "lala.py", line 20, in <module>
    j = js.run_bulk_jobs(d, 1, 10, 2, 2, auth=auth)
  File "/path/to/site-packages/drmaa2-python/drmaa2/job_session.py", line 321, in run_bulk_jobs
    self.exception_mapper.check_last_error_code()
  File "/path/to/site-packages/drmaa2-python/drmaa2/exception_mapper.py", line 98, in check_last_error_code
    cls.check_status_code(code)
  File "/path/to/site-packages/drmaa2-python/drmaa2/exception_mapper.py", line 111, in check_status_code
    raise error
drmaa2.drmaa2_exceptions.InvalidArgument: Values too large for DRM.

Similarly, running run_bulk_jobs without auth works fine.

Any tips? Running Univa Grid Engine Drmaa V2, 8.6.17.

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.