rbbt-util 5.33.4 → 5.33.5

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: 1e780efeaa15611ce5835bb314b9ad378719f9f744228a2c9a8a765c202e10e1
4
- data.tar.gz: 7338f595861b6f93ea0043ffabe9e78762c1acc478669f989ea23dc84820a213
3
+ metadata.gz: bea55b2e4dd5972cf0e9646e84db4ce6ffd0556bb54796927640dbe3a3ba6611
4
+ data.tar.gz: 281d52e1685badaba8427e5ffd2226e1a1ab61d66df30cc7cd88acb79ef5aa18
5
5
  SHA512:
6
- metadata.gz: 6650b5f00f6e2b8a9ccb3b2d389357ee0b9f551166d185aa2c5ec2c635150e2274c75af35fa6dc66cb09abeaa3c9e445a344015bee616ef78607933337c67e6f
7
- data.tar.gz: 4847e30f91c1fc388cb83bb842966fdf73cf150d4ed528b89e755d8ae5ed732e6886b7939031664fa0671b386c34e3daaf4ce0873f0991c4711b70bce03ed5c2
6
+ metadata.gz: 459b75076980833dc1be3bd60d9fc98707270c626ab837e76a6c09180aaa2bd3328b4dea8776cf09c8fca0358e38258a30a90d17cd615450a38398c53bacfef0
7
+ data.tar.gz: 1bb336e1a592b64fbb3e87453042e3f6f220b76c92f5e9ff7550aa25401fd3e36a823f31bddb0e8be6878fa7646b28a010ac320d6fd8e00066bd1ebf2e9f774f
@@ -31,7 +31,8 @@ module HPC
31
31
  top = batches.select{|b| b[:deps].nil? || (b[:deps] - batch_ids.keys).empty? }.first
32
32
  raise "No batch without unmet dependencies" if top.nil?
33
33
  batches.delete top
34
- job_options = options.merge(top[:rules])
34
+
35
+ job_options = HPC::Orchestration.merge_rules(options, top[:rules])
35
36
 
36
37
  if top[:deps].nil?
37
38
  batch_dependencies = []
@@ -32,6 +32,8 @@ export BATCH_SYSTEM=SLURM
32
32
  constraint = Misc.process_options options, :constraint
33
33
  gres = Misc.process_options options, :gres
34
34
 
35
+ constraint = [constraint, "highmem"].compact * "&" if highmem
36
+
35
37
  mem = Misc.process_options options, :mem
36
38
  mem_per_cpu = Misc.process_options options, :mem_per_cpu
37
39
 
@@ -50,14 +52,15 @@ export BATCH_SYSTEM=SLURM
50
52
  "cpus-per-task" => task_cpus,
51
53
  "nodes" => nodes,
52
54
  "time" => time,
55
+ "constraint" => constraint,
53
56
  "exclusive" => exclusive,
54
- "highmem" => highmem,
55
57
  "licenses" => licenses,
56
58
  "gres" => gres,
57
59
  "mem" => mem,
58
60
  "mem-per-cpu" => mem_per_cpu,
59
61
  }
60
62
 
63
+
61
64
  header =<<-EOF
62
65
  #!/bin/bash
63
66
  EOF
@@ -93,22 +93,22 @@ module Workflow
93
93
  Open.rm_rf self.files_dir if Open.exist? self.files_dir
94
94
  FileUtils.cp_r dep.files_dir, self.files_dir if Open.exist?(dep.files_dir)
95
95
 
96
- if dep.overriden
96
+ if dep.overriden || ! Workflow.job_path?(dep.path)
97
97
  Open.link dep.path, self.tmp_path
98
98
  else
99
99
  Open.ln_h dep.path, self.tmp_path
100
- end
101
100
 
102
- case remove.to_s
103
- when 'true'
104
- dep.clean
105
- when 'recursive'
106
- (dep.dependencies + dep.rec_dependencies).uniq.each do |d|
107
- next if d.overriden
108
- d.clean unless config(:remove_dep, d.task_signature, d.task_name, d.workflow.to_s, :default => true).to_s == 'false'
109
- end
110
- dep.clean unless config(:remove_dep, dep.task_signature, dep.task_name, dep.workflow.to_s, :default => true).to_s == 'false'
111
- end unless dep.overriden
101
+ case remove.to_s
102
+ when 'true'
103
+ dep.clean
104
+ when 'recursive'
105
+ (dep.dependencies + dep.rec_dependencies).uniq.each do |d|
106
+ next if d.overriden
107
+ d.clean unless config(:remove_dep, d.task_signature, d.task_name, d.workflow.to_s, :default => true).to_s == 'false'
108
+ end
109
+ dep.clean unless config(:remove_dep, dep.task_signature, dep.task_name, dep.workflow.to_s, :default => true).to_s == 'false'
110
+ end
111
+ end
112
112
  else
113
113
  if Open.exists?(dep.files_dir)
114
114
  Open.rm_rf self.files_dir
@@ -21,6 +21,7 @@ $ rbbt slurm list [options]
21
21
  -j--job* Job ids
22
22
  -s--search* Regular expression
23
23
  -t--tail* Show the last lines of the STDERR
24
+ -l--long Show more entries
24
25
  -p--progress Report progress of job and the dependencies
25
26
  -BP--batch_parameters show batch parameters
26
27
  -BPP--batch_procpath show Procpath performance summary
@@ -40,6 +41,8 @@ end
40
41
  batch_system = options.delete :batch_system
41
42
  batch_system ||= 'auto'
42
43
 
44
+ long = options.delete :long
45
+
43
46
  HPC::BATCH_MODULE = HPC.batch_system batch_system
44
47
 
45
48
  raise ParameterException.new("Could not detect batch_system: #{Misc.fingerprint batch_system}") if HPC::BATCH_MODULE.nil?
@@ -183,24 +186,24 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
183
186
 
184
187
 
185
188
  puts Log.color :blue, dir
186
- puts Log.color(:magenta, "Creation: ") << File.mtime(File.join(dir, 'command.batch')).to_s
187
- puts Log.color(:magenta, "Started: ") << File.ctime(File.join(dir, 'std.err')).to_s if File.exist?(File.join(dir, 'std.err'))
188
- puts Log.color(:magenta, "Manifest: ") << Log.color(:yellow, manifest)
189
+ puts Log.color(:magenta, "Creation: ") << File.mtime(File.join(dir, 'command.batch')).to_s if long
190
+ puts Log.color(:magenta, "Started: ") << File.ctime(File.join(dir, 'std.err')).to_s if File.exist?(File.join(dir, 'std.err')) && long
191
+ puts Log.color(:magenta, "Manifest: ") << Log.color(:yellow, manifest) if long
189
192
  puts Log.color(:magenta, "Step path: ") << Log.color(:yellow, step_path)
190
193
  puts Log.color(:magenta, "Done: ") << File.mtime(File.join(dir, 'exit.status')).to_s if File.exist?(File.join(dir, 'exit.status'))
191
- puts Log.color(:magenta, "Exec: ") << (exe || "Missing")
192
- puts Log.color(:magenta, "CMD: ") << (Log.color(:yellow, cmd) || "Missing")
193
- puts Log.color(:magenta, "HOME: ") << Log.color(:yellow, container_home) if container_home
194
+ puts Log.color(:magenta, "Exec: ") << (exe || "Missing") if long
195
+ puts Log.color(:magenta, "CMD: ") << (Log.color(:yellow, cmd) || "Missing") if long
196
+ puts Log.color(:magenta, "HOME: ") << Log.color(:yellow, container_home) if container_home && long
194
197
  if different_system
195
198
  puts Log.color(:magenta, "Job ID (#{Log.color(:red, job_batch_system)}): ") << (exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : Log.color(:green, id) )
196
199
  else
197
200
  puts Log.color(:magenta, "Job ID: ") << (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) ))
198
- end
201
+ end
199
202
  puts Log.color(:magenta, "Dependencies: ") << deps * ", " if deps
200
203
  puts Log.color(:magenta, "Dependencies (can fail): ") << cadeps * ", " if cadeps
201
- puts Log.color(:magenta, "Nodes: ") << nodes * ", "
204
+ puts Log.color(:magenta, "Nodes: ") << nodes * ", " if long
202
205
  puts Log.color(:magenta, "Time elapsed: ") << Misc.format_seconds(time_elapsed) if time_elapsed
203
- puts Log.color(:magenta, "Output: ") << File.exists?(File.join(dir, 'std.out')).to_s << (id.nil? || File.exists?(File.join(dir, 'exit.status')) ? "" : " (last update " + Misc.format_seconds(time_diff) + " ago)")
206
+ puts Log.color(:magenta, "Output: ") << File.exists?(File.join(dir, 'std.out')).to_s << (id.nil? || File.exists?(File.join(dir, 'exit.status')) ? "" : " (last update " + Misc.format_seconds(time_diff) + " ago)") if long
204
207
 
205
208
  if options[:batch_parameters]
206
209
  puts Log.color(:magenta, "BATCH parameters: ")
@@ -281,7 +284,7 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
281
284
  puts CMD.cmd("grep -i -w 'Completed step' #{File.join(dir, 'std.err')} | grep -v 'Retrying dep.' | tail -n #{tail.to_i}", :no_fail => true).read
282
285
  else
283
286
  puts Log.color(:magenta, "Log tail: ")
284
- puts CMD.cmd(" cat #{File.join(dir, 'std.err')} | grep -v '^[^\\s:]*\\[3.m' | tail -n #{tail.to_i} ").read
287
+ puts CMD.cmd(" cat #{File.join(dir, 'std.err')} | grep -v '^[^\\s:]*\\[3.m' | grep -v -e '^[[:space:]]*$' | tail -n #{tail.to_i} ").read
285
288
  end
286
289
  end
287
290
 
@@ -10,7 +10,7 @@ options = SOPT.setup <<EOF
10
10
 
11
11
  Queue a job in Marenostrum
12
12
 
13
- $ rbbt slurm tail <directory> [options]
13
+ $ rbbt slurm tail <directory|jobid> [options]
14
14
 
15
15
  -h--help Print this help
16
16
  EOF
@@ -35,8 +35,28 @@ directory = ARGV.shift
35
35
 
36
36
  raise ParameterException if directory.nil?
37
37
 
38
- directory = File.dirname(directory) unless File.directory?(directory)
38
+ if directory =~ /^[0-9]*$/
39
+ workdir = File.expand_path('~/rbbt-batch')
40
+ Path.setup(workdir)
41
+
42
+ workdir.glob("**/job.id").each do |file|
43
+ next unless directory == Open.read(file).strip
44
+ directory = File.dirname(file)
45
+ break
46
+ end
47
+ end
48
+
49
+ raise ParameterException, "Could not identify job #{directory}" unless File.exists?(directory)
39
50
 
40
51
  require 'rbbt/hpc/slurm'
41
52
 
53
+ command_txt = Open.read(File.join(directory, 'command.batch'))
54
+ if m = command_txt.match(/#STEP_PATH: (.*)/)
55
+ step_path = m[1]
56
+ else
57
+ step_path = nil
58
+ end
59
+
60
+ puts Log.color(:magenta, "Step path: ") + step_path if step_path
61
+
42
62
  HPC::BATCH_MODULE.follow_job directory, true
@@ -21,6 +21,7 @@ $ rbbt slurm list [options]
21
21
  -j--job* Job ids
22
22
  -s--search* Regular expression
23
23
  -t--tail* Show the last lines of the STDERR
24
+ -l--long Show more entries
24
25
  -p--progress Report progress of job and the dependencies
25
26
  -BP--batch_parameters show batch parameters
26
27
  -BPP--batch_procpath show Procpath performance summary
@@ -40,6 +41,8 @@ end
40
41
  batch_system = options.delete :batch_system
41
42
  batch_system ||= 'auto'
42
43
 
44
+ long = options.delete :long
45
+
43
46
  HPC::BATCH_MODULE = HPC.batch_system batch_system
44
47
 
45
48
  raise ParameterException.new("Could not detect batch_system: #{Misc.fingerprint batch_system}") if HPC::BATCH_MODULE.nil?
@@ -183,24 +186,24 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
183
186
 
184
187
 
185
188
  puts Log.color :blue, dir
186
- puts Log.color(:magenta, "Creation: ") << File.mtime(File.join(dir, 'command.batch')).to_s
187
- puts Log.color(:magenta, "Started: ") << File.ctime(File.join(dir, 'std.err')).to_s if File.exist?(File.join(dir, 'std.err'))
188
- puts Log.color(:magenta, "Manifest: ") << Log.color(:yellow, manifest)
189
+ puts Log.color(:magenta, "Creation: ") << File.mtime(File.join(dir, 'command.batch')).to_s if long
190
+ puts Log.color(:magenta, "Started: ") << File.ctime(File.join(dir, 'std.err')).to_s if File.exist?(File.join(dir, 'std.err')) && long
191
+ puts Log.color(:magenta, "Manifest: ") << Log.color(:yellow, manifest) if long
189
192
  puts Log.color(:magenta, "Step path: ") << Log.color(:yellow, step_path)
190
193
  puts Log.color(:magenta, "Done: ") << File.mtime(File.join(dir, 'exit.status')).to_s if File.exist?(File.join(dir, 'exit.status'))
191
- puts Log.color(:magenta, "Exec: ") << (exe || "Missing")
192
- puts Log.color(:magenta, "CMD: ") << (Log.color(:yellow, cmd) || "Missing")
193
- puts Log.color(:magenta, "HOME: ") << Log.color(:yellow, container_home) if container_home
194
+ puts Log.color(:magenta, "Exec: ") << (exe || "Missing") if long
195
+ puts Log.color(:magenta, "CMD: ") << (Log.color(:yellow, cmd) || "Missing") if long
196
+ puts Log.color(:magenta, "HOME: ") << Log.color(:yellow, container_home) if container_home && long
194
197
  if different_system
195
198
  puts Log.color(:magenta, "Job ID (#{Log.color(:red, job_batch_system)}): ") << (exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : Log.color(:green, id) )
196
199
  else
197
200
  puts Log.color(:magenta, "Job ID: ") << (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) ))
198
- end
201
+ end
199
202
  puts Log.color(:magenta, "Dependencies: ") << deps * ", " if deps
200
203
  puts Log.color(:magenta, "Dependencies (can fail): ") << cadeps * ", " if cadeps
201
- puts Log.color(:magenta, "Nodes: ") << nodes * ", "
204
+ puts Log.color(:magenta, "Nodes: ") << nodes * ", " if long
202
205
  puts Log.color(:magenta, "Time elapsed: ") << Misc.format_seconds(time_elapsed) if time_elapsed
203
- puts Log.color(:magenta, "Output: ") << File.exists?(File.join(dir, 'std.out')).to_s << (id.nil? || File.exists?(File.join(dir, 'exit.status')) ? "" : " (last update " + Misc.format_seconds(time_diff) + " ago)")
206
+ puts Log.color(:magenta, "Output: ") << File.exists?(File.join(dir, 'std.out')).to_s << (id.nil? || File.exists?(File.join(dir, 'exit.status')) ? "" : " (last update " + Misc.format_seconds(time_diff) + " ago)") if long
204
207
 
205
208
  if options[:batch_parameters]
206
209
  puts Log.color(:magenta, "BATCH parameters: ")
@@ -281,7 +284,7 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
281
284
  puts CMD.cmd("grep -i -w 'Completed step' #{File.join(dir, 'std.err')} | grep -v 'Retrying dep.' | tail -n #{tail.to_i}", :no_fail => true).read
282
285
  else
283
286
  puts Log.color(:magenta, "Log tail: ")
284
- puts CMD.cmd(" cat #{File.join(dir, 'std.err')} | grep -v '^[^\\s:]*\\[3.m' | tail -n #{tail.to_i} ").read
287
+ puts CMD.cmd(" cat #{File.join(dir, 'std.err')} | grep -v '^[^\\s:]*\\[3.m' | grep -v -e '^[[:space:]]*$' | tail -n #{tail.to_i} ").read
285
288
  end
286
289
  end
287
290
 
@@ -10,7 +10,7 @@ options = SOPT.setup <<EOF
10
10
 
11
11
  Queue a job in Marenostrum
12
12
 
13
- $ rbbt slurm tail <directory> [options]
13
+ $ rbbt slurm tail <directory|jobid> [options]
14
14
 
15
15
  -h--help Print this help
16
16
  EOF
@@ -35,8 +35,28 @@ directory = ARGV.shift
35
35
 
36
36
  raise ParameterException if directory.nil?
37
37
 
38
- directory = File.dirname(directory) unless File.directory?(directory)
38
+ if directory =~ /^[0-9]*$/
39
+ workdir = File.expand_path('~/rbbt-batch')
40
+ Path.setup(workdir)
41
+
42
+ workdir.glob("**/job.id").each do |file|
43
+ next unless directory == Open.read(file).strip
44
+ directory = File.dirname(file)
45
+ break
46
+ end
47
+ end
48
+
49
+ raise ParameterException, "Could not identify job #{directory}" unless File.exists?(directory)
39
50
 
40
51
  require 'rbbt/hpc/slurm'
41
52
 
53
+ command_txt = Open.read(File.join(directory, 'command.batch'))
54
+ if m = command_txt.match(/#STEP_PATH: (.*)/)
55
+ step_path = m[1]
56
+ else
57
+ step_path = nil
58
+ end
59
+
60
+ puts Log.color(:magenta, "Step path: ") + step_path if step_path
61
+
42
62
  HPC::BATCH_MODULE.follow_job directory, true
@@ -21,6 +21,7 @@ $ rbbt slurm list [options]
21
21
  -j--job* Job ids
22
22
  -s--search* Regular expression
23
23
  -t--tail* Show the last lines of the STDERR
24
+ -l--long Show more entries
24
25
  -p--progress Report progress of job and the dependencies
25
26
  -BP--batch_parameters show batch parameters
26
27
  -BPP--batch_procpath show Procpath performance summary
@@ -40,6 +41,8 @@ end
40
41
  batch_system = options.delete :batch_system
41
42
  batch_system ||= 'auto'
42
43
 
44
+ long = options.delete :long
45
+
43
46
  HPC::BATCH_MODULE = HPC.batch_system batch_system
44
47
 
45
48
  raise ParameterException.new("Could not detect batch_system: #{Misc.fingerprint batch_system}") if HPC::BATCH_MODULE.nil?
@@ -183,24 +186,24 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
183
186
 
184
187
 
185
188
  puts Log.color :blue, dir
186
- puts Log.color(:magenta, "Creation: ") << File.mtime(File.join(dir, 'command.batch')).to_s
187
- puts Log.color(:magenta, "Started: ") << File.ctime(File.join(dir, 'std.err')).to_s if File.exist?(File.join(dir, 'std.err'))
188
- puts Log.color(:magenta, "Manifest: ") << Log.color(:yellow, manifest)
189
+ puts Log.color(:magenta, "Creation: ") << File.mtime(File.join(dir, 'command.batch')).to_s if long
190
+ puts Log.color(:magenta, "Started: ") << File.ctime(File.join(dir, 'std.err')).to_s if File.exist?(File.join(dir, 'std.err')) && long
191
+ puts Log.color(:magenta, "Manifest: ") << Log.color(:yellow, manifest) if long
189
192
  puts Log.color(:magenta, "Step path: ") << Log.color(:yellow, step_path)
190
193
  puts Log.color(:magenta, "Done: ") << File.mtime(File.join(dir, 'exit.status')).to_s if File.exist?(File.join(dir, 'exit.status'))
191
- puts Log.color(:magenta, "Exec: ") << (exe || "Missing")
192
- puts Log.color(:magenta, "CMD: ") << (Log.color(:yellow, cmd) || "Missing")
193
- puts Log.color(:magenta, "HOME: ") << Log.color(:yellow, container_home) if container_home
194
+ puts Log.color(:magenta, "Exec: ") << (exe || "Missing") if long
195
+ puts Log.color(:magenta, "CMD: ") << (Log.color(:yellow, cmd) || "Missing") if long
196
+ puts Log.color(:magenta, "HOME: ") << Log.color(:yellow, container_home) if container_home && long
194
197
  if different_system
195
198
  puts Log.color(:magenta, "Job ID (#{Log.color(:red, job_batch_system)}): ") << (exit_status ? (exit_status == 0 ? Log.color(:green, "Done") : Log.color(:red, "Error")) + " (#{ id })" : Log.color(:green, id) )
196
199
  else
197
200
  puts Log.color(:magenta, "Job ID: ") << (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) ))
198
- end
201
+ end
199
202
  puts Log.color(:magenta, "Dependencies: ") << deps * ", " if deps
200
203
  puts Log.color(:magenta, "Dependencies (can fail): ") << cadeps * ", " if cadeps
201
- puts Log.color(:magenta, "Nodes: ") << nodes * ", "
204
+ puts Log.color(:magenta, "Nodes: ") << nodes * ", " if long
202
205
  puts Log.color(:magenta, "Time elapsed: ") << Misc.format_seconds(time_elapsed) if time_elapsed
203
- puts Log.color(:magenta, "Output: ") << File.exists?(File.join(dir, 'std.out')).to_s << (id.nil? || File.exists?(File.join(dir, 'exit.status')) ? "" : " (last update " + Misc.format_seconds(time_diff) + " ago)")
206
+ puts Log.color(:magenta, "Output: ") << File.exists?(File.join(dir, 'std.out')).to_s << (id.nil? || File.exists?(File.join(dir, 'exit.status')) ? "" : " (last update " + Misc.format_seconds(time_diff) + " ago)") if long
204
207
 
205
208
  if options[:batch_parameters]
206
209
  puts Log.color(:magenta, "BATCH parameters: ")
@@ -281,7 +284,7 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
281
284
  puts CMD.cmd("grep -i -w 'Completed step' #{File.join(dir, 'std.err')} | grep -v 'Retrying dep.' | tail -n #{tail.to_i}", :no_fail => true).read
282
285
  else
283
286
  puts Log.color(:magenta, "Log tail: ")
284
- puts CMD.cmd(" cat #{File.join(dir, 'std.err')} | grep -v '^[^\\s:]*\\[3.m' | tail -n #{tail.to_i} ").read
287
+ puts CMD.cmd(" cat #{File.join(dir, 'std.err')} | grep -v '^[^\\s:]*\\[3.m' | grep -v -e '^[[:space:]]*$' | tail -n #{tail.to_i} ").read
285
288
  end
286
289
  end
287
290
 
@@ -10,7 +10,7 @@ options = SOPT.setup <<EOF
10
10
 
11
11
  Queue a job in Marenostrum
12
12
 
13
- $ rbbt slurm tail <directory> [options]
13
+ $ rbbt slurm tail <directory|jobid> [options]
14
14
 
15
15
  -h--help Print this help
16
16
  EOF
@@ -35,8 +35,28 @@ directory = ARGV.shift
35
35
 
36
36
  raise ParameterException if directory.nil?
37
37
 
38
- directory = File.dirname(directory) unless File.directory?(directory)
38
+ if directory =~ /^[0-9]*$/
39
+ workdir = File.expand_path('~/rbbt-batch')
40
+ Path.setup(workdir)
41
+
42
+ workdir.glob("**/job.id").each do |file|
43
+ next unless directory == Open.read(file).strip
44
+ directory = File.dirname(file)
45
+ break
46
+ end
47
+ end
48
+
49
+ raise ParameterException, "Could not identify job #{directory}" unless File.exists?(directory)
39
50
 
40
51
  require 'rbbt/hpc/slurm'
41
52
 
53
+ command_txt = Open.read(File.join(directory, 'command.batch'))
54
+ if m = command_txt.match(/#STEP_PATH: (.*)/)
55
+ step_path = m[1]
56
+ else
57
+ step_path = nil
58
+ end
59
+
60
+ puts Log.color(:magenta, "Step path: ") + step_path if step_path
61
+
42
62
  HPC::BATCH_MODULE.follow_job directory, true
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
4
+ version: 5.33.5
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-03-03 00:00:00.000000000 Z
11
+ date: 2022-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake