osc-machete 2.0.0.pre1 → 2.0.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/osc/machete/job.rb +1 -1
- data/lib/osc/machete/torque_helper.rb +14 -5
- data/lib/osc/machete/version.rb +1 -1
- data/test/test_torque_helper_live.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: 00b1524199570027e478eda1a0cc138cfe19c176
|
4
|
+
data.tar.gz: 33984c5911b6d573ccb152def90b129bc4d1573c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb042baf00cc3d323db113d28d8cc7d0530ecebcbce25b4be7157161199698ac28ee079237050e72fae3285ac2000a3e14882096a504b68f8602cd9a63878d05
|
7
|
+
data.tar.gz: b2147e8540d40e2befc8b9dd5201ae7178d70fcca2bad6cb234c97a86d1155c33199913af7a4417905e7c2111ab46686900da61b75bb04313b7a985aec503f01
|
data/lib/osc/machete/job.rb
CHANGED
@@ -56,7 +56,7 @@ require 'pathname'
|
|
56
56
|
# @return [String, nil] path of the job script, or nil if not set
|
57
57
|
#
|
58
58
|
class OSC::Machete::Job
|
59
|
-
attr_reader :pbsid, :script_path, :account_string
|
59
|
+
attr_reader :pbsid, :script_path, :account_string, :host
|
60
60
|
|
61
61
|
class << self
|
62
62
|
# set this to change the billable account that is used by default
|
@@ -8,11 +8,13 @@ require 'pbs'
|
|
8
8
|
# == FIXME: This contains no state whatsoever. It should probably be changed into a module.
|
9
9
|
class OSC::Machete::TorqueHelper
|
10
10
|
# FIXME: Use ood_cluster gem
|
11
|
-
|
11
|
+
LIB = ENV['TORQUE_LIB'] || '/opt/torque/lib64'
|
12
|
+
BIN = ENV['TORQUE_BIN'] || '/opt/torque/bin'
|
12
13
|
HOSTS = {
|
13
14
|
'oakley' => 'oak-batch.osc.edu',
|
14
15
|
'ruby' => 'ruby-batch.osc.edu',
|
15
|
-
'quick' => 'quick-batch.osc.edu'
|
16
|
+
'quick' => 'quick-batch.osc.edu',
|
17
|
+
'owens' => 'owens-batch.ten.osc.edu'
|
16
18
|
}
|
17
19
|
|
18
20
|
# Alias to initialize a new object.
|
@@ -64,7 +66,8 @@ class OSC::Machete::TorqueHelper
|
|
64
66
|
# isn't properly handled and the job gets limited to 4GB
|
65
67
|
pbs = PBS::Batch.new(
|
66
68
|
host: HOSTS.fetch( host || host_from_script_pbs_header(script) ),
|
67
|
-
|
69
|
+
lib: LIB,
|
70
|
+
bin: BIN
|
68
71
|
)
|
69
72
|
|
70
73
|
headers = { depend: qsub_dependencies_header(depends_on) }
|
@@ -116,7 +119,8 @@ class OSC::Machete::TorqueHelper
|
|
116
119
|
id = pbsid.to_s
|
117
120
|
pbs = PBS::Batch.new(
|
118
121
|
host: HOSTS.fetch( host || host_from_pbsid(id) ),
|
119
|
-
|
122
|
+
lib: LIB,
|
123
|
+
bin: BIN
|
120
124
|
)
|
121
125
|
|
122
126
|
status = pbs.get_job(id, filters: [:job_state])
|
@@ -134,7 +138,8 @@ class OSC::Machete::TorqueHelper
|
|
134
138
|
id = pbsid.to_s
|
135
139
|
pbs = PBS::Batch.new(
|
136
140
|
host: HOSTS.fetch( host || host_from_pbsid(id) ),
|
137
|
-
|
141
|
+
lib: LIB,
|
142
|
+
bin: BIN
|
138
143
|
)
|
139
144
|
|
140
145
|
pbs.delete_job(id)
|
@@ -152,6 +157,8 @@ class OSC::Machete::TorqueHelper
|
|
152
157
|
"ruby"
|
153
158
|
elsif (File.open(script) { |f| f.read =~ /#PBS -q @quick-batch/ })
|
154
159
|
"quick"
|
160
|
+
elsif (File.open(script) { |f| f.read =~ /#PBS -q @owens-batch/ })
|
161
|
+
"owens"
|
155
162
|
else
|
156
163
|
"oakley" # DEFAULT
|
157
164
|
end
|
@@ -165,6 +172,8 @@ class OSC::Machete::TorqueHelper
|
|
165
172
|
"ruby"
|
166
173
|
elsif (pbsid =~ /quick/ )
|
167
174
|
"quick"
|
175
|
+
elsif (pbsid =~ /owens/ )
|
176
|
+
"owens"
|
168
177
|
else
|
169
178
|
"oakley" # DEFAULT
|
170
179
|
end
|
data/lib/osc/machete/version.rb
CHANGED
@@ -30,7 +30,7 @@ class TestTorqueHelperLive < Minitest::Test
|
|
30
30
|
# This raises an issue mentioning that it is not being submitted on the
|
31
31
|
# correct host, comment out the raise to skip the live tests.
|
32
32
|
# Maybe this would be better accomplished with a separate rake task.
|
33
|
-
@submit_host = "
|
33
|
+
@submit_host = "webdev02.hpc.osc.edu"
|
34
34
|
|
35
35
|
@job_state_queued = OSC::Machete::Status.queued
|
36
36
|
@job_state_completed = OSC::Machete::Status.passed
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: osc-machete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Franz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|