-
Notifications
You must be signed in to change notification settings - Fork 36
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
julia_setup fails when Julia linked to MKL? #10
Comments
Thank you for the feedback! Where is libmkl_rt.so? Does adding the path to LD_LIBRARY_PATH before starting R helps? The first time of The Locate Julia, check out the version of Julia. And compile a few C functions together with R and Julia header to embed julia in R. Currently the compilation is done every time at startup because Julia is evolve quite rapidly, and the C API also changes, and I want JuliaCall could handle the cases for different Julia versions, i.e, Julia v0.5 and Julia v0.6. Once Julia reaches a stable C API, the compilation process could be done only at the first time. Install the Julia dependencies if needed and precompile them. Part of the work here is duplicated with the next step due to #14577 for Julia v0.6.0, Start the embedding Julia in R, load the Julia dependencies and define some Julia functions for future use. There is not much things I could do about this step. So basically, I expect the |
Hmm. > library(JuliaCall)
> julia <- julia_setup()
Julia version 0.7.0-DEV.1856 found.
Julia initiation...
Finish Julia initiation.
Loading setup script for JuliaCall...
UndefVarError(:include) Error in .julia$cmd(paste0("include(\"", system.file("julia/setup.jl", :
Error happens when you try to execute command include("/home/celrod/R/x86_64-pc-linux-gnu-library/3.4/JuliaCall/julia/setup.jl") in Julia.
In addition: Warning messages:
1: In utils::compareVersion(x, y) : NAs introduced by coercion
2: In utils::compareVersion(x, y) : NAs introduced by coercion A different error. This also happens when I point it to a definitely-wrong directory with yet another libmkl_rt.so. If LD_LIBRARY_PATH however doesn't contain any directories with it, I get the When I tried giving it a path pointing to the OpenBLAS version (in a fresh session), I got: > julia <- julia_setup()
Two passes with the same argument (-juliaO0) attempted to be registered!
*** caught segfault ***
address (nil), cause 'unknown'
Traceback:
1: dyn.load(.julia$dll_file, FALSE, TRUE)
2: julia_setup()
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace Cool, looking forward to seeing how things improve for v0.7. |
And I just realize that the code reveals another bug in |
Could you test installing and testing |
I just checked out the latest master of RCall and of DataFrames. ERROR: LoadError: LoadError: LoadError: type QuoteNode has no field args from DataFrames as earlier. |
One of the bugs is that previously I didn't realize that julia version number could have such things "-DEV.xxxx", which is not valid R version number. After fixing that, the error
still happens. I'm looking at embedding documentation for Julia v0.7, and I have some clues. It seems that there is some important difference in embedding Julia from v0.6 to v0.7. |
Hmm, okay. Maybe you could ask on discourse? I imagine some people there'd know about differences that could explain things. Just got DataFrames working (tests don't pass, but I can precompile it and make data frames). Now the error upon using RCall is: ERROR: LoadError: LoadError: UndefVarError: DataArray not defined
Stacktrace:
[1] include_relative(::Module, ::String) at ./loading.jl:464
[2] include at ./sysimg.jl:14 [inlined]
[3] include(::String) at /home/celrod/.julia/v0.7/RCall/src/RCall.jl:2
[4] include_relative(::Module, ::String) at ./loading.jl:464
[5] include(::Module, ::String) at ./sysimg.jl:14
[6] anonymous at ./<missing>:2
while loading /home/celrod/.julia/v0.7/RCall/src/convert/dataframe.jl, in expression starting on line 3 |
It seems there are some problems in using |
…ulia v0.7. Relevant to #10.
The UndefVarError: DataArray not defined is because that in julia v0.6 DataFrames exports DataArray in DataArrays but not in julia v0.7. Might need to create a PR for RCall. |
After making a little modifications to |
Just for the record, UPDATE: setting |
Okay, I'd like to try and help get things working. Has this issue been resolved? > julia <- julia_setup()
Julia version 1.3.0-alpha.63 at location /home/chriselrod/Documents/languages/julia/usr/bin will be used.
Loading setup script for JuliaCall...
signal (11): Segmentation fault
in expression starting at /home/chriselrod/R/x86_64-generic-linux-gnu-library/3.6/JuliaCall/julia/setup.jl:72
unknown function (ip: 0x7f4e17970376)
Rf_ScalarInteger at /usr/lib64/R/lib/libR.so (unknown line)
__init__ at /home/chriselrod/.julia/packages/RCall/iojZI/src/setup.jl:162
unknown function (ip: 0x7f4e40192c21)
jl_apply at /home/chriselrod/Documents/languages/julia/src/julia.h:1630 [inlined]
jl_module_run_initializer at /home/chriselrod/Documents/languages/julia/src/toplevel.c:74
jl_init_restored_modules at /home/chriselrod/Documents/languages/julia/src/dump.c:2469
_include_from_serialized at ./loading.jl:685
_require_from_serialized at ./loading.jl:736
_require at ./loading.jl:1023
require at ./loading.jl:911
require at ./loading.jl:906
jl_apply at /home/chriselrod/Documents/languages/julia/src/julia.h:1630 [inlined]
call_require at /home/chriselrod/Documents/languages/julia/src/toplevel.c:399 [inlined]
eval_import_path at /home/chriselrod/Documents/languages/julia/src/toplevel.c:436
jl_toplevel_eval_flex at /home/chriselrod/Documents/languages/julia/src/toplevel.c:656
jl_eval_module_expr at /home/chriselrod/Documents/languages/julia/src/toplevel.c:181
jl_toplevel_eval_flex at /home/chriselrod/Documents/languages/julia/src/toplevel.c:640
jl_parse_eval_all at /home/chriselrod/Documents/languages/julia/src/ast.c:873
jl_load at /home/chriselrod/Documents/languages/julia/src/toplevel.c:878 [inlined]
jl_load_ at /home/chriselrod/Documents/languages/julia/src/toplevel.c:885
include at ./boot.jl:328 [inlined]
include_relative at ./loading.jl:1094
include at ./Base.jl:31
jl_apply at /home/chriselrod/Documents/languages/julia/src/julia.h:1630 [inlined]
do_call at /home/chriselrod/Documents/languages/julia/src/interpreter.c:328
eval_value at /home/chriselrod/Documents/languages/julia/src/interpreter.c:417
eval_stmt_value at /home/chriselrod/Documents/languages/julia/src/interpreter.c:368 [inlined]
eval_body at /home/chriselrod/Documents/languages/julia/src/interpreter.c:760
jl_interpret_toplevel_thunk_callback at /home/chriselrod/Documents/languages/julia/src/interpreter.c:888
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f4e2d60e40f)
unknown function (ip: (nil))
jl_interpret_toplevel_thunk at /home/chriselrod/Documents/languages/julia/src/interpreter.c:897
jl_toplevel_eval_flex at /home/chriselrod/Documents/languages/julia/src/toplevel.c:814
jl_toplevel_eval_flex at /home/chriselrod/Documents/languages/julia/src/toplevel.c:764
jl_toplevel_eval at /home/chriselrod/Documents/languages/julia/src/toplevel.c:823 [inlined]
jl_toplevel_eval_in at /home/chriselrod/Documents/languages/julia/src/toplevel.c:843
jl_eval_string at /home/chriselrod/Documents/languages/julia/src/jlapi.c:94
juliacall_cmd at /tmp/RtmpjJ9ldQ/R.INSTALL2800651bf90f/JuliaCall/src/JuliaCall.cpp:31
_JuliaCall_juliacall_cmd at /tmp/RtmpjJ9ldQ/R.INSTALL2800651bf90f/JuliaCall/src/RcppExports.cpp:26
unknown function (ip: 0x7f4e5bb67b1c)
unknown function (ip: 0x7f4e5bafc8ec)
Rf_eval at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
unknown function (ip: 0x7f4e5bb22c74)
Rf_applyClosure at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
unknown function (ip: 0x7f4e5bb07570)
Rf_eval at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
unknown function (ip: 0x7f4e5bb22c74)
Rf_applyClosure at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
unknown function (ip: 0x7f4e5bb07570)
Rf_eval at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
unknown function (ip: 0x7f4e5bb22c74)
Rf_applyClosure at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
Rf_eval at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
unknown function (ip: 0x7f4e5bb1b0b7)
Rf_eval at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
Rf_ReplIteration at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
unknown function (ip: 0x7f4e5ba9edd0)
run_Rmainloop at /usr/lib64/R/lib/haswell/avx512_1/libR.so (unknown line)
main at /usr/lib64/R/bin/exec/R (unknown line)
__libc_start_main at /usr/src/debug/glibc-2.29/csu/../csu/libc-start.c:308
_start at /usr/lib64/R/bin/exec/R (unknown line)
Allocations: 3098421 (Pool: 3097927; Big: 494); GC: 2
fish: “R” terminated by signal SIGSEGV (Address boundary error) |
@chriselrod Thanks for the feedback. I recently also saw breakdown on Julia 1.3 and is investigating into this. |
But even the official Julia 1.1 binary I already have installed fails on RCall: (v1.1) pkg> build RCall
Building Conda → `~/.julia/packages/Conda/kLXeC/deps/build.log`
Building RCall → `~/.julia/packages/RCall/iojZI/deps/build.log`
┌ Error: Error building `RCall`:
│ ERROR: LoadError: R cannot be found. Set the "R_HOME" environment variable to re-run Pkg.build("RCall").
│ Stacktrace:
│ [1] error(::String) at ./error.jl:33
│ [2] top-level scope at /home/chriselrod/.julia/packages/RCall/iojZI/deps/build.jl:49
│ [3] include at ./boot.jl:326 [inlined]
│ [4] include_relative(::Module, ::String) at ./loading.jl:1038
│ [5] include(::Module, ::String) at ./sysimg.jl:29
│ [6] include(::String) at ./client.jl:403
│ [7] top-level scope at none:0
│ in expression starting at /home/chriselrod/.julia/packages/RCall/iojZI/deps/build.jl:10
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
julia> ENV["R_HOME"]
"/usr/lib64/R" |
A friend got the same result when it found a JuliaPro v0.6.0 install connected to MKL.
On my home computer (built with OpenBLAS), it worked.
I also have an OpenBLAS install at my school computer. As the error says:
could not load library "libmkl_rt"
It seems highly likely it is related. I'll pass that install's path to julia_call and confirm it works
Also! Saying julia_setup is time consuming seems like an understatement.
Is that likely to change? Launching a Julia REPL and recompiling both Gadfly and Plots.jl seems faster. Have you profiled the function? What is it doing?
The text was updated successfully, but these errors were encountered: