rbbt-util 5.33.19 → 5.33.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/hpc/batch.rb +3 -3
- data/lib/rbbt/hpc/orchestrate.rb +6 -2
- data/lib/rbbt/workflow/util/provenance.rb +6 -4
- data/share/rbbt_commands/hpc/list +6 -2
- data/share/rbbt_commands/hpc/orchestrate +18 -8
- data/share/rbbt_commands/hpc/task +11 -10
- data/share/rbbt_commands/lsf/list +6 -2
- data/share/rbbt_commands/lsf/orchestrate +18 -8
- data/share/rbbt_commands/lsf/task +11 -10
- data/share/rbbt_commands/slurm/list +6 -2
- data/share/rbbt_commands/slurm/orchestrate +18 -8
- data/share/rbbt_commands/slurm/task +11 -10
- 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: 87f3c2c6750c49c90cce3fd4f8e24d270d471538f65374e388ec6ac83bf7134c
|
4
|
+
data.tar.gz: fb4909c5ef2ab2a751271f1f49db270ea1f91c4a84ed26504ddebebf23aae75a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39ca36640608cc39e279e0402f55749d5851b3713ee1fabe1eac414ae8ec5bf8f3a7741a71551142aede5ba27c9143b54972720fe321c563ac47b5db4a868da6
|
7
|
+
data.tar.gz: a7f50b0bb6829c781c9b8081b63464997f1d2aa1e8ab68871af6d13799867f4f136385b704e1bf5badce2ed03171db421ba5f9452d491b02c96aa8fe36d8eeea
|
data/lib/rbbt/hpc/batch.rb
CHANGED
@@ -555,7 +555,7 @@ env > #{batch_options[:fenv]}
|
|
555
555
|
|
556
556
|
batch_job = run_template(batch_dir, dry_run)
|
557
557
|
|
558
|
-
return batch_job unless tail
|
558
|
+
return [batch_job, batch_dir] unless tail
|
559
559
|
|
560
560
|
t_monitor = Thread.new do
|
561
561
|
self.follow_job(batch_dir, :STDERR)
|
@@ -570,8 +570,8 @@ env > #{batch_options[:fenv]}
|
|
570
570
|
Open.ln path + '.info', job.path + '.info' if Open.exists?(path + '.info')
|
571
571
|
Open.ln path + '.files', job.path + '.files' if Open.exists?(path + '.files')
|
572
572
|
end
|
573
|
-
|
574
|
-
|
573
|
+
|
574
|
+
[batch_job, batch_dir]
|
575
575
|
end
|
576
576
|
end
|
577
577
|
|
data/lib/rbbt/hpc/orchestrate.rb
CHANGED
@@ -49,6 +49,8 @@ module HPC
|
|
49
49
|
Log.high "Compute #{batches.length} batches"
|
50
50
|
|
51
51
|
batch_ids = {}
|
52
|
+
last_id = nil
|
53
|
+
last_dir = nil
|
52
54
|
while batches.any?
|
53
55
|
top = batches.select{|b| b[:deps].nil? || (b[:deps] - batch_ids.keys).empty? }.first
|
54
56
|
raise "No batch without unmet dependencies" if top.nil?
|
@@ -87,10 +89,12 @@ module HPC
|
|
87
89
|
puts Log.color(:yellow, "Options: ") + job_options.inspect
|
88
90
|
batch_ids[top] = top[:top_level].task_signature
|
89
91
|
else
|
90
|
-
id = run_job(top[:top_level], job_options)
|
91
|
-
batch_ids[top] = id
|
92
|
+
id, dir = run_job(top[:top_level], job_options)
|
93
|
+
last_id = batch_ids[top] = id
|
94
|
+
last_dir = dir
|
92
95
|
end
|
93
96
|
end
|
97
|
+
[last_id, last_dir]
|
94
98
|
end
|
95
99
|
|
96
100
|
end
|
@@ -100,11 +100,13 @@ class Step
|
|
100
100
|
step.dependencies.each do |dep|
|
101
101
|
if dep.input_dependencies.any?
|
102
102
|
dep.input_dependencies.each do |id|
|
103
|
-
input_name = dep.recursive_inputs.fields.zip(dep.recursive_inputs).select{|f,d|
|
103
|
+
input_name, _dep = dep.recursive_inputs.fields.zip(dep.recursive_inputs).select{|f,d|
|
104
104
|
d == id || (String === d && d.start_with?(id.files_dir)) || (Array === d && d.include?(id))
|
105
|
-
}.last
|
106
|
-
|
107
|
-
|
105
|
+
}.last
|
106
|
+
if input_name
|
107
|
+
input_dependencies[id] ||= []
|
108
|
+
input_dependencies[id] << [dep, input_name]
|
109
|
+
end
|
108
110
|
end
|
109
111
|
end
|
110
112
|
end
|
@@ -193,7 +193,11 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
193
193
|
if different_system
|
194
194
|
status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : Log.color(:green, id)
|
195
195
|
else
|
196
|
-
status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : (running_jobs.include?(id) || $norunningjobs ? Log.color(:green, id) : Log.color(:red, id) )
|
196
|
+
#status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : (running_jobs.include?(id) || $norunningjobs ? Log.color(:green, id) : Log.color(:red, id) )
|
197
|
+
status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" :
|
198
|
+
(running_jobs.include?(id) || $norunningjobs ?
|
199
|
+
(is_running ? Log.color(:green, id) : Log.color(:yellow, id) ) :
|
200
|
+
Log.color(:red, id) )
|
197
201
|
end
|
198
202
|
prog_rep = []
|
199
203
|
if options[:progress]
|
@@ -204,7 +208,7 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
204
208
|
step = Step.new step_path
|
205
209
|
step.load_dependencies_from_info
|
206
210
|
has_bar = false
|
207
|
-
|
211
|
+
[step].reverse.each do |j|
|
208
212
|
next if j.done?
|
209
213
|
if j.file(:progress).exists?
|
210
214
|
bar = Log::ProgressBar.new
|
@@ -49,17 +49,27 @@ HPC::BATCH_MODULE = HPC.batch_system batch_system
|
|
49
49
|
raise ParameterException.new("Could not detect batch_system: #{Misc.fingerprint batch_system}") if HPC::BATCH_MODULE.nil?
|
50
50
|
|
51
51
|
class Step
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
def join
|
53
|
+
HPC::BATCH_MODULE.wait_for_job(@batch_job_dir)
|
54
|
+
end
|
55
|
+
|
56
|
+
def run(no_load = true)
|
57
|
+
if done?
|
58
|
+
self.load
|
59
|
+
else
|
60
|
+
begin
|
61
|
+
Log.debug "Issuing SLURM job for #{self.path}"
|
62
|
+
@batch_job_id, @batch_job_dir = HPC::BATCH_MODULE.orchestrate_job(self, SOPT::GOT_OPTIONS.merge($slurm_options))
|
63
|
+
if no_load
|
64
|
+
self
|
55
65
|
else
|
56
|
-
|
57
|
-
|
58
|
-
HPC::BATCH_MODULE.orchestrate_job(self, SOPT::GOT_OPTIONS.merge($slurm_options))
|
59
|
-
rescue HPC::SBATCH
|
60
|
-
end
|
66
|
+
join
|
67
|
+
self.load
|
61
68
|
end
|
69
|
+
rescue HPC::SBATCH
|
70
|
+
end
|
62
71
|
end
|
72
|
+
end
|
63
73
|
end
|
64
74
|
|
65
75
|
ARGV.concat ['--detach']
|
@@ -47,17 +47,18 @@ HPC::BATCH_MODULE = HPC.batch_system batch_system
|
|
47
47
|
raise ParameterException.new("Could not detect batch_system: #{Misc.fingerprint batch_system}") if HPC::BATCH_MODULE.nil?
|
48
48
|
|
49
49
|
class Step
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
50
|
+
|
51
|
+
def run(*args)
|
52
|
+
if done?
|
53
|
+
self.load
|
54
|
+
else
|
55
|
+
begin
|
56
|
+
Log.debug "Issuing SLURM job for #{self.path}"
|
57
|
+
HPC::BATCH_MODULE.run_job(self, SOPT::GOT_OPTIONS.merge($slurm_options))
|
58
|
+
rescue HPC::SBATCH
|
59
|
+
end
|
60
60
|
end
|
61
|
+
end
|
61
62
|
end
|
62
63
|
|
63
64
|
ARGV.concat ["-W", $slurm_options[:workflows]] if $slurm_options[:workflows]
|
@@ -193,7 +193,11 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
193
193
|
if different_system
|
194
194
|
status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : Log.color(:green, id)
|
195
195
|
else
|
196
|
-
status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : (running_jobs.include?(id) || $norunningjobs ? Log.color(:green, id) : Log.color(:red, id) )
|
196
|
+
#status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : (running_jobs.include?(id) || $norunningjobs ? Log.color(:green, id) : Log.color(:red, id) )
|
197
|
+
status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" :
|
198
|
+
(running_jobs.include?(id) || $norunningjobs ?
|
199
|
+
(is_running ? Log.color(:green, id) : Log.color(:yellow, id) ) :
|
200
|
+
Log.color(:red, id) )
|
197
201
|
end
|
198
202
|
prog_rep = []
|
199
203
|
if options[:progress]
|
@@ -204,7 +208,7 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
204
208
|
step = Step.new step_path
|
205
209
|
step.load_dependencies_from_info
|
206
210
|
has_bar = false
|
207
|
-
|
211
|
+
[step].reverse.each do |j|
|
208
212
|
next if j.done?
|
209
213
|
if j.file(:progress).exists?
|
210
214
|
bar = Log::ProgressBar.new
|
@@ -49,17 +49,27 @@ HPC::BATCH_MODULE = HPC.batch_system batch_system
|
|
49
49
|
raise ParameterException.new("Could not detect batch_system: #{Misc.fingerprint batch_system}") if HPC::BATCH_MODULE.nil?
|
50
50
|
|
51
51
|
class Step
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
def join
|
53
|
+
HPC::BATCH_MODULE.wait_for_job(@batch_job_dir)
|
54
|
+
end
|
55
|
+
|
56
|
+
def run(no_load = true)
|
57
|
+
if done?
|
58
|
+
self.load
|
59
|
+
else
|
60
|
+
begin
|
61
|
+
Log.debug "Issuing SLURM job for #{self.path}"
|
62
|
+
@batch_job_id, @batch_job_dir = HPC::BATCH_MODULE.orchestrate_job(self, SOPT::GOT_OPTIONS.merge($slurm_options))
|
63
|
+
if no_load
|
64
|
+
self
|
55
65
|
else
|
56
|
-
|
57
|
-
|
58
|
-
HPC::BATCH_MODULE.orchestrate_job(self, SOPT::GOT_OPTIONS.merge($slurm_options))
|
59
|
-
rescue HPC::SBATCH
|
60
|
-
end
|
66
|
+
join
|
67
|
+
self.load
|
61
68
|
end
|
69
|
+
rescue HPC::SBATCH
|
70
|
+
end
|
62
71
|
end
|
72
|
+
end
|
63
73
|
end
|
64
74
|
|
65
75
|
ARGV.concat ['--detach']
|
@@ -47,17 +47,18 @@ HPC::BATCH_MODULE = HPC.batch_system batch_system
|
|
47
47
|
raise ParameterException.new("Could not detect batch_system: #{Misc.fingerprint batch_system}") if HPC::BATCH_MODULE.nil?
|
48
48
|
|
49
49
|
class Step
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
50
|
+
|
51
|
+
def run(*args)
|
52
|
+
if done?
|
53
|
+
self.load
|
54
|
+
else
|
55
|
+
begin
|
56
|
+
Log.debug "Issuing SLURM job for #{self.path}"
|
57
|
+
HPC::BATCH_MODULE.run_job(self, SOPT::GOT_OPTIONS.merge($slurm_options))
|
58
|
+
rescue HPC::SBATCH
|
59
|
+
end
|
60
60
|
end
|
61
|
+
end
|
61
62
|
end
|
62
63
|
|
63
64
|
ARGV.concat ["-W", $slurm_options[:workflows]] if $slurm_options[:workflows]
|
@@ -193,7 +193,11 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
193
193
|
if different_system
|
194
194
|
status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : Log.color(:green, id)
|
195
195
|
else
|
196
|
-
status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : (running_jobs.include?(id) || $norunningjobs ? Log.color(:green, id) : Log.color(:red, id) )
|
196
|
+
#status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : (running_jobs.include?(id) || $norunningjobs ? Log.color(:green, id) : Log.color(:red, id) )
|
197
|
+
status = exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" :
|
198
|
+
(running_jobs.include?(id) || $norunningjobs ?
|
199
|
+
(is_running ? Log.color(:green, id) : Log.color(:yellow, id) ) :
|
200
|
+
Log.color(:red, id) )
|
197
201
|
end
|
198
202
|
prog_rep = []
|
199
203
|
if options[:progress]
|
@@ -204,7 +208,7 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
204
208
|
step = Step.new step_path
|
205
209
|
step.load_dependencies_from_info
|
206
210
|
has_bar = false
|
207
|
-
|
211
|
+
[step].reverse.each do |j|
|
208
212
|
next if j.done?
|
209
213
|
if j.file(:progress).exists?
|
210
214
|
bar = Log::ProgressBar.new
|
@@ -49,17 +49,27 @@ HPC::BATCH_MODULE = HPC.batch_system batch_system
|
|
49
49
|
raise ParameterException.new("Could not detect batch_system: #{Misc.fingerprint batch_system}") if HPC::BATCH_MODULE.nil?
|
50
50
|
|
51
51
|
class Step
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
def join
|
53
|
+
HPC::BATCH_MODULE.wait_for_job(@batch_job_dir)
|
54
|
+
end
|
55
|
+
|
56
|
+
def run(no_load = true)
|
57
|
+
if done?
|
58
|
+
self.load
|
59
|
+
else
|
60
|
+
begin
|
61
|
+
Log.debug "Issuing SLURM job for #{self.path}"
|
62
|
+
@batch_job_id, @batch_job_dir = HPC::BATCH_MODULE.orchestrate_job(self, SOPT::GOT_OPTIONS.merge($slurm_options))
|
63
|
+
if no_load
|
64
|
+
self
|
55
65
|
else
|
56
|
-
|
57
|
-
|
58
|
-
HPC::BATCH_MODULE.orchestrate_job(self, SOPT::GOT_OPTIONS.merge($slurm_options))
|
59
|
-
rescue HPC::SBATCH
|
60
|
-
end
|
66
|
+
join
|
67
|
+
self.load
|
61
68
|
end
|
69
|
+
rescue HPC::SBATCH
|
70
|
+
end
|
62
71
|
end
|
72
|
+
end
|
63
73
|
end
|
64
74
|
|
65
75
|
ARGV.concat ['--detach']
|
@@ -47,17 +47,18 @@ HPC::BATCH_MODULE = HPC.batch_system batch_system
|
|
47
47
|
raise ParameterException.new("Could not detect batch_system: #{Misc.fingerprint batch_system}") if HPC::BATCH_MODULE.nil?
|
48
48
|
|
49
49
|
class Step
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
50
|
+
|
51
|
+
def run(*args)
|
52
|
+
if done?
|
53
|
+
self.load
|
54
|
+
else
|
55
|
+
begin
|
56
|
+
Log.debug "Issuing SLURM job for #{self.path}"
|
57
|
+
HPC::BATCH_MODULE.run_job(self, SOPT::GOT_OPTIONS.merge($slurm_options))
|
58
|
+
rescue HPC::SBATCH
|
59
|
+
end
|
60
60
|
end
|
61
|
+
end
|
61
62
|
end
|
62
63
|
|
63
64
|
ARGV.concat ["-W", $slurm_options[:workflows]] if $slurm_options[:workflows]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.33.
|
4
|
+
version: 5.33.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|