rput 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/starter.rb +7 -5
- data/rput.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/starter.rb
CHANGED
@@ -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}
|
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(
|
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"
|
data/rput.gemspec
CHANGED
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:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Fernando Izquierdo-Carrasco
|