每次调用 R 都会创建 63 个子进程
Rscript --vanilla -e 'Sys.sleep(5)' & pstree -p $! | grep -c '{R}'
# 63
Run Code Online (Sandbox Code Playgroud)
哪里pstree看起来像这样
R(2562809)???{R}(2562818)
??{R}(2562819)
...
??{R}(2562878)
??{R}(2562879)
??{R}(2562880)
Run Code Online (Sandbox Code Playgroud)
这是预期的行为吗?
这是一台带有 debian 9.3、R 3.4.3、blas 3.7.0 和 openmp 2.0.2 的 72 核机器
dpkg-query -l '*blas*' 'r-base' '*lapack*' '*openmp*'|grep ^ii
ii libblas-common 3.7.0-2 amd64 Dependency package for all BLAS implementations
ii libblas-dev 3.7.0-2 amd64 Basic Linear Algebra Subroutines 3, static library
ii libblas3 3.7.0-2 amd64 Basic Linear Algebra Reference implementations, shared library
ii …Run Code Online (Sandbox Code Playgroud) 我已经编译了类文件shortScreen/out/production/classes/com/rsw/并希望在 clojure repl 中使用它们。我认为挂断已经开始,add-classpath但我不熟悉应该发生什么。或者怎么解决。
(use '[cemerick.pomegranate :only (add-dependencies add-classpath)])
(import 'clojure.pprint)
(def myclasses "shortScreen/out/production/classes/com/rsw/")
; do i have the correct path?
(-> (clojure.java.io/file myclasses) (file-seq) (pprint)) ; shows many class files
(.exists (clojure.java.io/file myclasses "util.class")) ; true
; add the path
(add-classpath myclasses)
; but nothing like myclasses path in list
(def thiscp (.getURLs (java.lang.ClassLoader/getSystemClassLoader)))
(pprint thiscp)
(filter (fn [s] (re-seq #"out" s)) ;myclasses path should match "out"
(for [x thiscp]
(.toString x)))
; fails -- …Run Code Online (Sandbox Code Playgroud)