Module: DRMAA
- Defined in:
- lib/ood_core/job/adapters/drmaa.rb,
lib/ood_core/refinements/drmaa_extensions.rb
Defined Under Namespace
Classes: DRMAAAlreadyActiveSessionError, DRMAAAuthenticationError, DRMAACommunicationError, DRMAAConflictingAttributeValuesError, DRMAADefaultContactError, DRMAADeniedError, DRMAAException, DRMAAHoldInconsistent, DRMAAInternalError, DRMAAInvalidArgumentError, DRMAAInvalidAttributeFormatError, DRMAAInvalidAttributeValueError, DRMAAInvalidContactError, DRMAAInvalidJobError, DRMAANoActiveSessionError, DRMAANoDefaultContactSelected, DRMAANoMemoryError, DRMAANoMoreElements, DRMAAReleaseInconsistent, DRMAAResumeInconsistent, DRMAASessionExitError, DRMAASessionInitError, DRMAASuspendInconsistent, DRMAATimeoutExit, DRMAATryLater, JobInfo, JobTemplate, Session, SessionSingleton
Constant Summary collapse
- STATE_UNDETERMINED =
drmaa_job_ps() constants
0x00
- STATE_QUEUED_ACTIVE =
0x10
- STATE_SYSTEM_ON_HOLD =
0x11
- STATE_USER_ON_HOLD =
0x12
- STATE_USER_SYSTEM_ON_HOLD =
0x13
- STATE_RUNNING =
0x20
- STATE_SYSTEM_SUSPENDED =
0x21
- STATE_USER_SUSPENDED =
0x22
- STATE_USER_SYSTEM_SUSPENDED =
0x23
- STATE_DONE =
0x30
- STATE_FAILED =
0x40
- ACTION_SUSPEND =
drmaa_control() constants
0
- ACTION_RESUME =
1
- ACTION_HOLD =
2
- ACTION_RELEASE =
3
- ACTION_TERMINATE =
4
- PLACEHOLDER_INCR =
placeholders for job input/output/error path and working dir
"$drmaa_incr_ph$"
- PLACEHOLDER_HD =
"$drmaa_hd_ph$"
- PLACEHOLDER_WD =
"$drmaa_wd_ph$"
- DRMMA_TO_OOD_STATE_MAP =
{ DRMAA::STATE_UNDETERMINED => :undetermined, DRMAA::STATE_QUEUED_ACTIVE => :queued, DRMAA::STATE_SYSTEM_ON_HOLD => :queued_held, DRMAA::STATE_USER_ON_HOLD => :queued_held, DRMAA::STATE_USER_SYSTEM_ON_HOLD => :queued_held, DRMAA::STATE_RUNNING => :running, DRMAA::STATE_SYSTEM_SUSPENDED => :suspended, DRMAA::STATE_USER_SUSPENDED => :suspended, DRMAA::STATE_USER_SYSTEM_SUSPENDED => :suspended, DRMAA::STATE_DONE => :completed, DRMAA::STATE_FAILED => :completed }
Class Method Summary collapse
-
.contact ⇒ Object
returns string specifying contact information int drmaa_get_contact(char *, size_t, char *, size_t).
-
.drm_system ⇒ Object
returns string specifying the DRM system int drmaa_get_drm_system(char *, size_t , char *, size_t).
-
.drmaa_implementation ⇒ Object
returns string specifying DRMAA implementation int drmaa_get_DRMAA_implementation(char *, size_t , char *, size_t).
-
.version ⇒ Object
returns DRMAA version (e.g. 1.0 or 0.95) int drmaa_version(unsigned int *, unsigned int *, char *, size_t ).
Class Method Details
.contact ⇒ Object
returns string specifying contact information int drmaa_get_contact(char *, size_t, char *, size_t)
252 253 254 255 256 257 258 259 260 261 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 252 def DRMAA.contact contact = " " * ErrSize err = " " * ErrSize r,r1 = FFI_DRMAA.drmaa_get_contact(contact, ErrSize, err, ErrSize) r1 = [contact, ErrSize, err, ErrSize] contact.delete! "\000" contact.strip! DRMAA.throw(r, r1[2]) return r1[0] end |
.drm_system ⇒ Object
returns string specifying the DRM system int drmaa_get_drm_system(char *, size_t , char *, size_t)
239 240 241 242 243 244 245 246 247 248 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 239 def DRMAA.drm_system drm = " " * 20 err = " " * ErrSize r = FFI_DRMAA.drmaa_get_DRM_system(drm, 20, err, ErrSize) r1 = [drm, 20, err, ErrSize] DRMAA.throw(r, r1[2]) drm.delete! "\000" drm.strip! return r1[0] end |
.drmaa_implementation ⇒ Object
returns string specifying DRMAA implementation int drmaa_get_DRMAA_implementation(char *, size_t , char *, size_t)
265 266 267 268 269 270 271 272 273 274 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 265 def DRMAA.drmaa_implementation err = " " * ErrSize impl = " " * 30 r = FFI_DRMAA.drmaa_get_DRMAA_implementation(impl, 30, err, ErrSize) r1 = [impl, 30, err, ErrSize] DRMAA.throw(r, r1[2]) impl.delete! "\000" impl.strip! return r1[0] end |
.version ⇒ Object
returns DRMAA version (e.g. 1.0 or 0.95) int drmaa_version(unsigned int *, unsigned int *, char *, size_t )
278 279 280 281 282 283 284 285 286 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 278 def DRMAA.version err= " " * ErrSize major = FFI::MemoryPointer.new(:int, 1) minor = FFI::MemoryPointer.new(:int, 1) r = FFI_DRMAA.drmaa_version major,minor, err, ErrSize r1 = [major.read_int,minor.read_int, err, ErrSize] DRMAA.throw(r, r1[2]) @version = r1[0] + (Float(r1[1])/100) end |