workflow_manager 0.5.2 → 0.5.3
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 +5 -5
- data/lib/workflow_manager/cluster.rb +59 -0
- data/lib/workflow_manager/server.rb +3 -0
- data/lib/workflow_manager/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c5711738c7423585b2db31fd502f0f1dd44ac23ead6f77ae2a8bfa328d4c2649
|
4
|
+
data.tar.gz: e2a981b0065fa8e6efacb8ad4433162809bd4533f32e72e554cf98459b7f85c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fece378a564236133c30296a6b1a240dc830fb21441960c58ad1ccf9874da9eac96e78f17181cb95f1f51f1645bf124c4253b8f6abd3f871318470f2de22b6e
|
7
|
+
data.tar.gz: 15333f88e1e38458d1c963731519e35d8971f4047ea07fd7c1821fea1f291b2c4a862a693fbca0e1b4a8ab56d7435dc82eff56f4d0c89f00b09dd2749d539e4a
|
@@ -38,6 +38,8 @@ module WorkflowManager
|
|
38
38
|
end
|
39
39
|
def default_node
|
40
40
|
end
|
41
|
+
def node_list
|
42
|
+
end
|
41
43
|
end
|
42
44
|
|
43
45
|
class LocalComputer < Cluster
|
@@ -238,6 +240,63 @@ module WorkflowManager
|
|
238
240
|
'fgcz-h-010: cpu 8,mem 30 GB,scr 400G' => 'fgcz-h-010',
|
239
241
|
}
|
240
242
|
end
|
243
|
+
def node_list
|
244
|
+
node2scr = {}
|
245
|
+
command = "qhost -F scratch"
|
246
|
+
keep = nil
|
247
|
+
IO.popen(command) do |out|
|
248
|
+
while line=out.gets
|
249
|
+
hostname, arch, ncpu, loading, memtot, memuse, *others = line.split
|
250
|
+
if hostname =~ /fgcz/
|
251
|
+
keep = hostname
|
252
|
+
elsif scratch_ = line.chomp.split.last and
|
253
|
+
scratch = scratch_.split('=').last
|
254
|
+
node2scr[keep] = scratch.to_i
|
255
|
+
keep = nil
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
list = {}
|
261
|
+
keep = nil
|
262
|
+
command = 'qhost -q'
|
263
|
+
IO.popen(command) do |out|
|
264
|
+
while line=out.gets
|
265
|
+
# HOSTNAME ARCH NCPU LOAD MEMTOT MEMUSE SWAPTO SWAPUS
|
266
|
+
hostname, arch, ncpu, loading, memtot, memuse, *others = line.split
|
267
|
+
if hostname =~ /fgcz/
|
268
|
+
#puts [hostname, ncpu, loading, memtot, memuse].join("\t")
|
269
|
+
mem = memtot.gsub(/G/, '').to_i
|
270
|
+
keep = [hostname, ncpu, "#{mem}G"]
|
271
|
+
elsif hostname == "GT" and keep and cores = line.chomp.split.last and cores !~ /[du]/
|
272
|
+
hostname = keep.shift
|
273
|
+
keep[0] = cores
|
274
|
+
if scr = node2scr[hostname] and scr >= 1000
|
275
|
+
scr = "%.1f" % (scr.to_f / 1000)
|
276
|
+
scr << "T"
|
277
|
+
else
|
278
|
+
scr = scr.to_s + "G"
|
279
|
+
end
|
280
|
+
keep << scr
|
281
|
+
list[hostname] = keep
|
282
|
+
keep = nil
|
283
|
+
end
|
284
|
+
end
|
285
|
+
end
|
286
|
+
|
287
|
+
# reformat
|
288
|
+
nodes = {}
|
289
|
+
list.each do |hostname, specs|
|
290
|
+
# 20190823 masa tentatively off use f47
|
291
|
+
unless hostname =~ /fgcz-c-047/
|
292
|
+
cores, ram, scr = specs
|
293
|
+
key = "#{hostname}: cores #{cores}, ram #{ram}, scr #{scr}"
|
294
|
+
value = hostname
|
295
|
+
nodes[key] = value
|
296
|
+
end
|
297
|
+
end
|
298
|
+
nodes
|
299
|
+
end
|
241
300
|
end
|
242
301
|
|
243
302
|
class FGCZCourseCluster < FGCZCluster
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workflow_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Functional Genomics Center Zurich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -104,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
|
108
|
-
rubygems_version: 2.6.14
|
107
|
+
rubygems_version: 3.0.3
|
109
108
|
signing_key:
|
110
109
|
specification_version: 4
|
111
110
|
summary: Workflow Manager manages job submissions using dRuby.
|