Class: DRMAA::JobInfo
- Inherits:
-
Object
- Object
- DRMAA::JobInfo
- Defined in:
- lib/ood_core/job/adapters/drmaa.rb
Overview
const char *drmaa_strerror(int drmaa_errno) DRMAA job info as returned by drmaa_wait()
Instance Attribute Summary collapse
-
#job ⇒ Object
readonly
Returns the value of attribute job.
Instance Method Summary collapse
-
#initialize(job, stat, rusage = nil) ⇒ JobInfo
constructor
A new instance of JobInfo.
-
#rusage ⇒ Object
returns resource utilization as string array (‘name=value’).
-
#wcoredump? ⇒ Boolean
true if job core dumped.
-
#wexitstatus ⇒ Object
returns job exit status.
- #wifaborted? ⇒ Boolean
-
#wifexited? ⇒ Boolean
true if job finished and exit status available.
-
#wifsignaled? ⇒ Boolean
true if job was signaled and termination signal available.
-
#wtermsig ⇒ Object
returns termination signal as string.
Constructor Details
#initialize(job, stat, rusage = nil) ⇒ JobInfo
Returns a new instance of JobInfo.
675 676 677 678 679 680 681 682 683 684 685 686 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 675 def initialize(job, stat, rusage = nil) @job = job @stat = stat.read_int @rusage = Hash.new if ! rusage.nil? DRMAA.get_attr_values(rusage).each { |u| nv = u.scan(/[^=][^=]*/) @rusage[nv[0]] = nv[1] } end end |
Instance Attribute Details
#job ⇒ Object (readonly)
Returns the value of attribute job.
674 675 676 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 674 def job @job end |
Instance Method Details
#rusage ⇒ Object
returns resource utilization as string array (‘name=value’)
711 712 713 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 711 def rusage return @rusage end |
#wcoredump? ⇒ Boolean
true if job core dumped
699 700 701 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 699 def wcoredump? DRMAA.wcoredump(@stat) end |
#wexitstatus ⇒ Object
returns job exit status
703 704 705 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 703 def wexitstatus DRMAA.wexitstatus(@stat) end |
#wifaborted? ⇒ Boolean
687 688 689 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 687 def wifaborted? DRMAA.wifaborted(@stat) end |
#wifexited? ⇒ Boolean
true if job finished and exit status available
691 692 693 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 691 def wifexited? DRMAA.wifexited(@stat) end |
#wifsignaled? ⇒ Boolean
true if job was signaled and termination signal available
695 696 697 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 695 def wifsignaled? DRMAA.wifsignaled(@stat) end |
#wtermsig ⇒ Object
returns termination signal as string
707 708 709 |
# File 'lib/ood_core/job/adapters/drmaa.rb', line 707 def wtermsig DRMAA.wtermsig(@stat) end |