rput 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/starter.rb +7 -5
  3. data/rput.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -28,8 +28,9 @@ class CycleController
28
28
  puts required_MB
29
29
  required_MB.to_i.to_s
30
30
  end
31
- def run_as_batch(script)
31
+ def run_as_batch(script, logpath)
32
32
  raise "#{script} missing" unless File.exist?(script)
33
+ raise "#{log} missing" unless File.exist?(logpath)
33
34
  raise "User Number of parsimony trees not set" unless @opts[:num_parsi_trees] > 0
34
35
  raise "Total Number of parsimony trees not set" unless @opts[:num_ptrees] > 0
35
36
  opts = @opts[:iter].to_s
@@ -42,7 +43,7 @@ class CycleController
42
43
  opts += " " + @opts[:exp_name].to_s
43
44
  opts += " " + @opts[:base_dir].to_s
44
45
  puts "./#{script} #{opts}"
45
- system "./#{script} #{opts} > #{File.join @base_dir, "starter.log")}"
46
+ system "./#{script} #{opts} >> #{logpath}"
46
47
  end
47
48
  end
48
49
 
@@ -72,9 +73,10 @@ class TreeBunchStarter
72
73
  @bestML_bunch = File.join @bestML_trees_dir, "best_bunch.nw"
73
74
  @prev_bestML_bunch = File.join @prev_dir, "best_ml_trees", "best_bunch.nw" unless @prev_dir.nil?
74
75
  @cluster_batch = opts[:cluster_batch]
76
+ @logpath = File.join @base_dir, "starter.log"
75
77
  end
76
78
  def logput(msg, error = false)
77
- @logger ||= Logger.new(File.join @base_dir, "starter.log")
79
+ @logger ||= Logger.new(@logpath)
78
80
  if error
79
81
  @logger.error msg
80
82
  else
@@ -127,7 +129,7 @@ class TreeBunchStarter
127
129
  :base_dir => @base_dir,
128
130
  :exp_name => opts[:exp_name]
129
131
  )
130
- c.run_as_batch(@cluster_batch)
132
+ c.run_as_batch(@cluster_batch, @logname)
131
133
  "cluster"
132
134
  else
133
135
  logput "****** Start update no #{@update_id} ********"
@@ -183,7 +185,7 @@ class TreeBunchStarter
183
185
  :base_dir => @base_dir,
184
186
  :exp_name => opts[:exp_name]
185
187
  )
186
- c.run_as_batch(@cluster_batch)
188
+ c.run_as_batch(@cluster_batch, @logname)
187
189
  "cluster"
188
190
  else
189
191
  logput "Start generating initial bunch"
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rput}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Fernando Izquierdo-Carrasco}]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rput
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Fernando Izquierdo-Carrasco