miga-base 1.1.0.0 → 1.1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miga/daemon/base.rb +12 -4
- data/lib/miga/daemon.rb +6 -5
- data/lib/miga/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a666ed2219c2e1573dff12caca0b841d4c649bad62f4f5c0d274fc2c5407b178
|
4
|
+
data.tar.gz: 9e6a46b35a83b8f2349bb2a676f6c2fba7e375b52156734b636084d68c4626af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61abc23642093894f068e1edc6252fb7a4e95035284f5469a0c955aebdadbdd2d62a76f395c933c7e819498e9a3b7685dd7257afe6263bc0b51111b141d00a13
|
7
|
+
data.tar.gz: 72f7024d6d5594a794dd5d7ca68d7b5896d28109a2800189981c9ba1fed85a3ad2e51303a547991fc998360426a5e85fe03dc9e7a61d38520744b6ed2dece8b9
|
data/lib/miga/daemon/base.rb
CHANGED
@@ -12,7 +12,7 @@ module MiGA::Daemon::Base
|
|
12
12
|
k = k.to_sym
|
13
13
|
unless v.nil?
|
14
14
|
case k
|
15
|
-
when :latency, :maxjobs, :ppn, :format_version, :verbosity
|
15
|
+
when :latency, :maxjobs, :ppn, :ppn_project, :format_version, :verbosity
|
16
16
|
v = v.to_i
|
17
17
|
if !force && v == 0 && k != :verbosity
|
18
18
|
raise "Daemon's #{k} cannot be set to zero"
|
@@ -51,9 +51,17 @@ module MiGA::Daemon::Base
|
|
51
51
|
end
|
52
52
|
|
53
53
|
##
|
54
|
-
# Returns
|
55
|
-
|
56
|
-
|
54
|
+
# Returns the running option +opt+ in jobs for +what+. +what+ can be
|
55
|
+
# +:dataset+ or +:projects+
|
56
|
+
def runopts_for(opt, what)
|
57
|
+
runopts(:"#{opt}_#{what}") || runopts(opt)
|
58
|
+
end
|
59
|
+
|
60
|
+
##
|
61
|
+
# Returns Integer indicating the number of CPUs per job, in jobs for +what+.
|
62
|
+
# See also #runopts_for
|
63
|
+
def ppn(what = :dataset)
|
64
|
+
runopts_for(:ppn, what)
|
57
65
|
end
|
58
66
|
|
59
67
|
##
|
data/lib/miga/daemon.rb
CHANGED
@@ -231,10 +231,11 @@ class MiGA::Daemon < MiGA::MiGA
|
|
231
231
|
# Construct the command for the given job definition with current
|
232
232
|
# daemon settings
|
233
233
|
def job_cmd(to_run)
|
234
|
+
what = to_run[:ds].nil? ? :project : :dataset
|
234
235
|
vars = {
|
235
236
|
'PROJECT' => project.path,
|
236
|
-
'RUNTYPE' =>
|
237
|
-
'CORES' => ppn,
|
237
|
+
'RUNTYPE' => runopts_for(:type, what),
|
238
|
+
'CORES' => ppn(what),
|
238
239
|
'MIGA' => MiGA::MiGA.root_path
|
239
240
|
}
|
240
241
|
vars['DATASET'] = to_run[:ds].name unless to_run[:ds].nil?
|
@@ -246,13 +247,13 @@ class MiGA::Daemon < MiGA::MiGA
|
|
246
247
|
),
|
247
248
|
vars: vars.map do |k, v|
|
248
249
|
runopts(:var).miga_variables(key: k, value: v)
|
249
|
-
end.join(
|
250
|
-
cpus: ppn,
|
250
|
+
end.join(runopts_for(:varsep, what)),
|
251
|
+
cpus: ppn(what),
|
251
252
|
log: File.join(log_dir, "#{to_run[:ds_name]}.log"),
|
252
253
|
task_name: to_run[:task_name],
|
253
254
|
miga: File.join(MiGA::MiGA.root_path, 'bin/miga').shellescape
|
254
255
|
}
|
255
|
-
|
256
|
+
runopts_for(:cmd, what).miga_variables(var_hsh)
|
256
257
|
end
|
257
258
|
|
258
259
|
##
|
data/lib/miga/version.rb
CHANGED
@@ -12,7 +12,7 @@ module MiGA
|
|
12
12
|
# - String indicating release status:
|
13
13
|
# - rc* release candidate, not released as gem
|
14
14
|
# - [0-9]+ stable release, released as gem
|
15
|
-
VERSION = [1.1,
|
15
|
+
VERSION = [1.1, 1, 0].freeze
|
16
16
|
|
17
17
|
##
|
18
18
|
# Nickname for the current major.minor version.
|
@@ -20,7 +20,7 @@ module MiGA
|
|
20
20
|
|
21
21
|
##
|
22
22
|
# Date of the current gem relese.
|
23
|
-
VERSION_DATE = Date.new(2021, 10,
|
23
|
+
VERSION_DATE = Date.new(2021, 10, 29)
|
24
24
|
|
25
25
|
##
|
26
26
|
# References of MiGA
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miga-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luis M. Rodriguez-R
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|