summaryrefslogtreecommitdiff
path: root/lib/lazar.rb
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2017-11-16 16:00:27 +0100
committergebele <gebele@in-silico.ch>2017-11-16 16:00:27 +0100
commit78d85a9c89a1db785cd555f78ecc0c76cbf9fd4b (patch)
treea4a1661fa610391441d0f74404e3c626c924b628 /lib/lazar.rb
parente6c4bf906330775c9d8a883e810b222d07430b82 (diff)
added central rserve ipfeature/pure
Diffstat (limited to 'lib/lazar.rb')
-rw-r--r--lib/lazar.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/lazar.rb b/lib/lazar.rb
index 7133d56..5347bbb 100644
--- a/lib/lazar.rb
+++ b/lib/lazar.rb
@@ -50,7 +50,11 @@ end
# http://stackoverflow.com/questions/19619582/number-of-processors-cores-in-command-line
CENTRAL_RSERVE_IP = `grep -oP "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(?=.*rserve)" /etc/hosts`.chomp
NR_CORES = `getconf _NPROCESSORS_ONLN`.to_i
-R = Rserve::Connection.new( CENTRAL_RSERVE_IP.blank? ? "127.0.0.1" : CENTRAL_RSERVE_IP)
+if CENTRAL_RSERVE_IP.blank?
+ R = Rserve::Connection.new
+else
+ R = Rserve::Connection.new(:hostname => CENTRAL_RSERVE_IP)
+end
=begin
R.eval "
suppressPackageStartupMessages({