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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4076b3b3a4a4143ac9100ce4d58fada7615f68ad3e6174445510655f62904867
4
- data.tar.gz: '0975a5feb4c9eb71a474be87dd14b58297ef1aa7bd8612c20f1ce65febbdf980'
3
+ metadata.gz: a666ed2219c2e1573dff12caca0b841d4c649bad62f4f5c0d274fc2c5407b178
4
+ data.tar.gz: 9e6a46b35a83b8f2349bb2a676f6c2fba7e375b52156734b636084d68c4626af
5
5
  SHA512:
6
- metadata.gz: ebcb7fe28d415ca9709433975585518eb1ecd8e8270c584b6579da222e4d3733cc20d810787c3f764f6a6136e1a6f09b7cb6b1c00114c3ea9c0885370654f3a7
7
- data.tar.gz: '082bd856ed21487e5de709e2067f1d3453f824e0ece7a77716c6fbe70d88a16c4d295196d5c6133e5667142e25f55f7e48e4a785afd160a14e8195a9b7efa6c2'
6
+ metadata.gz: 61abc23642093894f068e1edc6252fb7a4e95035284f5469a0c955aebdadbdd2d62a76f395c933c7e819498e9a3b7685dd7257afe6263bc0b51111b141d00a13
7
+ data.tar.gz: 72f7024d6d5594a794dd5d7ca68d7b5896d28109a2800189981c9ba1fed85a3ad2e51303a547991fc998360426a5e85fe03dc9e7a61d38520744b6ed2dece8b9
@@ -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 Integer indicating the number of CPUs per job
55
- def ppn
56
- runopts(:ppn)
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' => runopts(:type),
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(runopts(:varsep)),
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
- runopts(:cmd).miga_variables(var_hsh)
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, 0, 0].freeze
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, 28)
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.0.0
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-28 00:00:00.000000000 Z
11
+ date: 2021-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons