From 5125f56e6f0f5ee5427f2687eb5f962589ae4c5e Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Mon, 11 Mar 2013 15:35:41 +0100
Subject: parallelize.rb: proper command line arguments
---
training/dtrain/parallelize.rb | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
(limited to 'training/dtrain')
diff --git a/training/dtrain/parallelize.rb b/training/dtrain/parallelize.rb
index 50c966d7..acfd7290 100755
--- a/training/dtrain/parallelize.rb
+++ b/training/dtrain/parallelize.rb
@@ -5,7 +5,7 @@ require 'trollop'
def usage
if ARGV.size != 8
STDERR.write "Usage: "
- STDERR.write "ruby parallelize.rb -c -e [--randomize/-z] -s <#shards|0> -p -i -r [--qsub/-q]\n"
+ STDERR.write "ruby parallelize.rb -c -e [--randomize/-z] -s <#shards|0> -p -i -r [--qsub/-q] --dtrain_binary \n"
exit 1
end
end
@@ -20,13 +20,18 @@ opts = Trollop::options do
opt :input, "input", :type => :string
opt :references, "references", :type => :string
opt :qsub, "use qsub", :type => :bool, :default => false
+ opt :dtrain_binary, "path to dtrain binary", :type => :string
end
puts opts.to_s
dtrain_dir = File.expand_path File.dirname(__FILE__)
-dtrain_bin = "#{dtrain_dir}/dtrain"
+if not opts[:dtrain_binary]
+ dtrain_bin = "#{dtrain_dir}/dtrain"
+else
+ dtrain_bin = opts[:dtrain_binary]
+end
ruby = '/usr/bin/ruby'
lplp_rb = "#{dtrain_dir}/hstreaming/lplp.rb"
lplp_args = 'l2 select_k 100000'
--
cgit v1.2.3