ood_core 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/ood_core/job/adapters/slurm.rb +0 -3
- data/lib/ood_core/job/adapters/torque.rb +3 -2
- data/lib/ood_core/job/script.rb +5 -22
- data/lib/ood_core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8002c2e879b001e56001b19968b7832083ed9bef
|
4
|
+
data.tar.gz: 4138c0a93735760e1ebaba489231229879f7b72b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e308714bcb389500342e493a914542b9c59b63a0a8776ec4dc6883a3ab7dc1696ef44fdee40ea2c74ae9b94c89d8d9e58336cd6f5cf252b403ba055f755f7841
|
7
|
+
data.tar.gz: f4b67e63a34642884b5bd6de6ecab47484d377b639fc174eb45c5bc11f4cc993e89105bb3092dd7cf6695d27951618ee4fc8f7b41308e6b3a8be8386243e39d2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## 0.0.4 (2017-05-17)
|
4
|
+
|
5
|
+
Features:
|
6
|
+
|
7
|
+
- removed `OodCore::Job::Script#min_phys_memory` due to lack of commonality
|
8
|
+
across resource managers
|
9
|
+
- removed `OodCore::Job::Script#join_files` due to lack of support in
|
10
|
+
resource managers
|
11
|
+
- by default all PBS jobs output stdout & stderr to output path unless an
|
12
|
+
error path is specified (mimics behavior of Slurm and LSF)
|
13
|
+
|
3
14
|
## 0.0.3 (2017-04-28)
|
4
15
|
|
5
16
|
Features:
|
@@ -275,14 +275,11 @@ module OodCore
|
|
275
275
|
args += ["-i", script.input_path] unless script.input_path.nil?
|
276
276
|
args += ["-o", script.output_path] unless script.output_path.nil?
|
277
277
|
args += ["-e", script.error_path] unless script.error_path.nil?
|
278
|
-
# ignore join_files, by default it joins stdout and stderr unless
|
279
|
-
# error_path is specified
|
280
278
|
args += ["--reservation", script.reservation_id] unless script.reservation_id.nil?
|
281
279
|
args += ["-p", script.queue_name] unless script.queue_name.nil?
|
282
280
|
args += ["--priority", script.priority] unless script.priority.nil?
|
283
281
|
args += ["--begin", script.start_time.localtime.strftime("%C%y-%m-%dT%H:%M:%S")] unless script.start_time.nil?
|
284
282
|
args += ["-A", script.accounting_id] unless script.accounting_id.nil?
|
285
|
-
args += ["--mem", "#{script.min_phys_memory}K"] unless script.min_phys_memory.nil?
|
286
283
|
args += ["-t", seconds_to_duration(script.wall_time)] unless script.wall_time.nil?
|
287
284
|
# ignore nodes, don't know how to do this for slurm
|
288
285
|
|
@@ -85,7 +85,9 @@ module OodCore
|
|
85
85
|
# ignore input_path (not defined in Torque)
|
86
86
|
headers.merge!(Output_Path: script.output_path) unless script.output_path.nil?
|
87
87
|
headers.merge!(Error_Path: script.error_path) unless script.error_path.nil?
|
88
|
-
|
88
|
+
# If error_path is not specified we join stdout & stderr (as this
|
89
|
+
# mimics what the other resource managers do)
|
90
|
+
headers.merge!(Join_Path: 'oe') if script.error_path.nil?
|
89
91
|
headers.merge!(reservation_id: script.reservation_id) unless script.reservation_id.nil?
|
90
92
|
headers.merge!(Priority: script.priority) unless script.priority.nil?
|
91
93
|
headers.merge!(Execution_Time: script.start_time.localtime.strftime("%C%y%m%d%H%M.%S")) unless script.start_time.nil?
|
@@ -101,7 +103,6 @@ module OodCore
|
|
101
103
|
|
102
104
|
# Set resources
|
103
105
|
resources = {}
|
104
|
-
resources.merge!(mem: "#{script.min_phys_memory}KB") unless script.min_phys_memory.nil?
|
105
106
|
resources.merge!(walltime: seconds_to_duration(script.wall_time)) unless script.wall_time.nil?
|
106
107
|
|
107
108
|
# Set environment variables
|
data/lib/ood_core/job/script.rb
CHANGED
@@ -66,10 +66,6 @@ module OodCore
|
|
66
66
|
# @return [Pathname, nil] file path specifying error stream
|
67
67
|
attr_reader :error_path
|
68
68
|
|
69
|
-
# Whether the error stream should be intermixed with the output stream
|
70
|
-
# @return [Boolean, nil] whether error stream intermixed with output stream
|
71
|
-
attr_reader :join_files
|
72
|
-
|
73
69
|
# Identifier of existing reservation to be associated with the job
|
74
70
|
# @return [String, nil] reservation id
|
75
71
|
attr_reader :reservation_id
|
@@ -82,12 +78,6 @@ module OodCore
|
|
82
78
|
# @return [Fixnum, nil] scheduling priority
|
83
79
|
attr_reader :priority
|
84
80
|
|
85
|
-
# The minimum amount of physical memory in kilobyte for all nodes or per
|
86
|
-
# node (dependent upon the resource manager) that should be available for
|
87
|
-
# the job
|
88
|
-
# @return [Fixnum, nil] minimum physical memory
|
89
|
-
attr_reader :min_phys_memory
|
90
|
-
|
91
81
|
# The earliest time when the job may be eligible to run
|
92
82
|
# @return [Time, nil] eligible start time
|
93
83
|
attr_reader :start_time
|
@@ -119,30 +109,26 @@ module OodCore
|
|
119
109
|
# @param input_path [#to_s, nil] file path specifying input stream
|
120
110
|
# @param output_path [#to_s, nil] file path specifying output stream
|
121
111
|
# @param error_path [#to_s, nil] file path specifying error stream
|
122
|
-
# @param join_files [Boolean, nil] whether error stream intermixed with output stream
|
123
112
|
# @param reservation_id [#to_s, nil] reservation id
|
124
113
|
# @param queue_name [#to_s, nil] queue name
|
125
114
|
# @param priority [#to_i, nil] scheduling priority
|
126
|
-
# @param min_phys_memory [#to_i, nil] minimum physical memory
|
127
115
|
# @param start_time [#to_i, nil] eligible start time
|
128
116
|
# @param wall_time [#to_i, nil] max real time
|
129
117
|
# @param accounting_id [#to_s, nil] accounting id
|
130
118
|
# @param native [Object, nil] native specifications
|
131
119
|
def initialize(content:, args: nil, submit_as_hold: nil, rerunnable: nil,
|
132
120
|
job_environment: nil, workdir: nil, email: nil,
|
133
|
-
email_on_started: nil, email_on_terminated: nil,
|
134
|
-
|
135
|
-
|
136
|
-
priority: nil,
|
137
|
-
|
138
|
-
**_)
|
121
|
+
email_on_started: nil, email_on_terminated: nil,
|
122
|
+
job_name: nil, input_path: nil, output_path: nil,
|
123
|
+
error_path: nil, reservation_id: nil, queue_name: nil,
|
124
|
+
priority: nil, start_time: nil, wall_time: nil,
|
125
|
+
accounting_id: nil, native: nil, **_)
|
139
126
|
@content = content.to_s
|
140
127
|
|
141
128
|
@submit_as_hold = submit_as_hold
|
142
129
|
@rerunnable = rerunnable
|
143
130
|
@email_on_started = email_on_started
|
144
131
|
@email_on_terminated = email_on_terminated
|
145
|
-
@join_files = join_files
|
146
132
|
|
147
133
|
@args = args && args.map(&:to_s)
|
148
134
|
@job_environment = job_environment && job_environment.each_with_object({}) { |(k, v), h| h[k.to_s] = v.to_s }
|
@@ -155,7 +141,6 @@ module OodCore
|
|
155
141
|
@reservation_id = reservation_id && reservation_id.to_s
|
156
142
|
@queue_name = queue_name && queue_name.to_s
|
157
143
|
@priority = priority && priority.to_i
|
158
|
-
@min_phys_memory = min_phys_memory && min_phys_memory.to_i
|
159
144
|
@start_time = start_time && Time.at(start_time.to_i)
|
160
145
|
@wall_time = wall_time && wall_time.to_i
|
161
146
|
@accounting_id = accounting_id && accounting_id.to_s
|
@@ -179,11 +164,9 @@ module OodCore
|
|
179
164
|
input_path: input_path,
|
180
165
|
output_path: output_path,
|
181
166
|
error_path: error_path,
|
182
|
-
join_files: join_files,
|
183
167
|
reservation_id: reservation_id,
|
184
168
|
queue_name: queue_name,
|
185
169
|
priority: priority,
|
186
|
-
min_phys_memory: min_phys_memory,
|
187
170
|
start_time: start_time,
|
188
171
|
wall_time: wall_time,
|
189
172
|
accounting_id: accounting_id,
|
data/lib/ood_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ood_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Nicklas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ood_support
|