Class: DRMAA::JobInfo

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#jobObject (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

#rusageObject

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

Returns:

  • (Boolean)


699
700
701
# File 'lib/ood_core/job/adapters/drmaa.rb', line 699

def wcoredump?  
    DRMAA.wcoredump(@stat) 
end

#wexitstatusObject

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

Returns:

  • (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

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


695
696
697
# File 'lib/ood_core/job/adapters/drmaa.rb', line 695

def wifsignaled?  
    DRMAA.wifsignaled(@stat) 
end

#wtermsigObject

returns termination signal as string



707
708
709
# File 'lib/ood_core/job/adapters/drmaa.rb', line 707

def wtermsig 
    DRMAA.wtermsig(@stat) 
end