"LoadError" in a jupyter notebook with Julia kernel

40 views
Skip to first unread message

Peter Luschny

unread,
Aug 4, 2016, 4:37:44 AM8/4/16
to sage-cloud
Hi all,

on SMC, in a jupyter notebook with Julia kernel:

(IN)
Pkg.add("TaylorSeries")
using TaylorSeries

(OUT)
INFO: Initializing package repository /projects/84186f14-a679-4dbe-aa52-af1999e65179/.julia/v0.4
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
INFO: Cloning cache of Compat from git://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of FactCheck from git://github.com/JuliaLang/FactCheck.jl.git
INFO: Cloning cache of TaylorSeries from git://github.com/JuliaDiff/TaylorSeries.jl.git
INFO: Installing Compat v0.8.6
INFO: Installing FactCheck v0.4.3
INFO: Installing TaylorSeries v0.2.0
INFO: Package database updated
INFO: Precompiling module TaylorSeries...
INFO: Recompiling stale cache file /projects/84186f14-a679-4dbe-aa52-af1999e65179/.julia/lib/v0.4/Compat.ji for module Compat.
INFO: Recompiling stale cache file /projects/84186f14-a679-4dbe-aa52-af1999e65179/.julia/lib/v0.4/TaylorSeries.ji for module TaylorSeries.
WARNING: Module Compat uuid did not match cache file
This is likely because module Compat does not support  precompilation but is imported by a module that does.

LoadError: __precompile__(true) but require failed to create a precompiled cache file
while loading In[2], in expression starting on line 2 in require at ./loading.jl:268

What can I do? I am not even sure that it is SMC related.

Thanks, Peter


Harald Schilly

unread,
Aug 4, 2016, 4:56:07 AM8/4/16
to sage-cloud
Hi, I'm looking into it, but I have no idea. I've very bad experiences with julia packages, and this sounds just like that. It tries to install a few dependencies in your own
~/.julia/lib/v0.4 but fails. One thing you can try, is to export an env variable in your project's .bashrc and restart the project:

export JULIA_PKGDIR=~/.local/share/julia/site/

I've never tried that,
​ ​
though. My rationale is, that this should tell julia that all packages are stored there, and hence it is fully under its control
​ ​
(and obviously empty, so it will compile everything anew).

You should probably also get rid of these partial installs in your
​ ​
~/.julia/lib/v0.4
​ ​
to let it start from scratch.

What's the list of packages you would like to have? I can try to install them globally, but on guarantees.


-- harald



--
You received this message because you are subscribed to the Google Groups "sage-cloud" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/5e0f1d95-c2aa-4575-9437-5629e8a9a821%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harald Schilly

unread,
Aug 4, 2016, 5:59:58 AM8/4/16
to sage-cloud
ok, small update, what I did is the following:

1. define this package repo as a global env variable for everyone. that's not doing any harm. So, when you restart your project and you don't set this JULIA_PKGDIR it will be one with some packages pre installed and built. So, you can remove your local one I've written above, should work without it.

2. I've updated and compiled all packages that are install in smc everywhere. That in particular also updated this metadata. It's also now the case, that there is Nemo 5.

3. Your error mentioned above is entirely Julia's fault. There is a problem when dependencies already trigger compilations and then the compilation is re-requested. There are github tickets for that, which basically tell to try again. 

Hence: do this "using" to import and locally compile it in your context, that will fail. then, restart the ijulia kernel in the notebook (for me, there was also always an error, just restart it firmly). then, with fingers cossed, re-execute this "using" cell and it should work (simply, because the compilation from the first pass is cached and hence not done again)

See screenshot (done on compute7, while you're on compute4, so I hope there aren't any subtle differences between those two machines)

-- harald

smc-julia-taylorseries.png

Peter Luschny

unread,
Aug 4, 2016, 7:21:52 AM8/4/16
to sage-...@googlegroups.com
Thanks so much Harald! Great help!
Everything works now!

> Your error mentioned above is entirely Julia's fault. 
I suspected this.

Cheers, Peter

Reply all
Reply to author
Forward
0 new messages