diff options
author | gebele <gebele@in-silico.ch> | 2018-05-04 09:45:05 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2018-05-04 09:45:05 +0000 |
commit | c57ae4ce01e0f0a135db7c22d4d4284c217df57f (patch) | |
tree | bf947d790eb4158dcb8745c49e4e137015c92f2e /lib/lazar.rb | |
parent | fe0c95d26da042f99441a114b34fc0ecd3a40601 (diff) | |
parent | e1c8e082e19917c208b53edcb5a8b9b657d2ace0 (diff) |
removed registerDoMC
Diffstat (limited to 'lib/lazar.rb')
-rw-r--r-- | lib/lazar.rb | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/lazar.rb b/lib/lazar.rb index 66f6777..1f909b7 100644 --- a/lib/lazar.rb +++ b/lib/lazar.rb @@ -45,17 +45,9 @@ when "development" end # R setup -#rlib = File.expand_path(File.join(File.dirname(__FILE__),"..","R")) -# should work on POSIX including os x -# http://stackoverflow.com/questions/19619582/number-of-processors-cores-in-command-line -CENTRAL_RSERVE_IP = "rserve" -NR_CORES = `getconf _NPROCESSORS_ONLN`.to_i -if CENTRAL_RSERVE_IP.blank? - R = Rserve::Connection.new -else - R = Rserve::Connection.new(:hostname => CENTRAL_RSERVE_IP) -end -=begin +rlib = File.expand_path(File.join(File.dirname(__FILE__),"..","R")) +R = Rserve::Connection.new +R.eval ".libPaths('#{rlib}')" R.eval " suppressPackageStartupMessages({ library(labeling,lib=\"#{rlib}\") @@ -69,10 +61,8 @@ suppressPackageStartupMessages({ library(doMC,lib=\"#{rlib}\") library(randomForest,lib=\"#{rlib}\") library(plyr,lib=\"#{rlib}\") - registerDoMC(#{NR_CORES}) }) " -=end # OpenTox classes and includes CLASSES = ["Feature","Substance","Dataset","LazarPrediction","CrossValidation","LeaveOneOutValidation","RepeatedCrossValidation","Experiment"]# Algorithm and Models are modules |