@kristoffer.carlsson : Thank you for your patience with me and your help. Here is the MWE as promised.
Please note, that to trigger the problem it is apparently necessary to have the main program and the modules in different directories layed out like this:
% ls *
MAIN:
crtbp_modul.jl main.jl
MODUL_1:
ode_integratoren.jl
MODUL_2:
hilfsfunktionen.jl
The contents of the files are then
% cat MAIN/main.jl
push!(LOAD_PATH, "../MODUL_1/")
push!(LOAD_PATH, "./")
using ode_integratoren,crtbp_modul,Printf
jacobic=readinput()
% cat MAIN/crtbp_modul.jl
module crtbp_modul
export readinput
push!(LOAD_PATH, "../MODUL_2/")
push!(LOAD_PATH, "../MODUL_1/")
using ode_integratoren,hilfsfunktionen,Printf,
DelimitedFiles
function readinput()
print("Reading Input : ")
jacobic=parse(Float64,readline())
return jacobic
end
end
% cat MODUL_1/ode_integratoren.jl
module ode_integratoren
push!(LOAD_PATH, "../MODUL_2/")
using StaticArrays,LinearAlgebra,hilfsfunktionen
end
% cat MODUL_2/hilfsfunktionen.jl
module hilfsfunktionen
using LinearAlgebra
export interpolation
function interpolation(xdata,ydata,x)
return xdata
end
end
Then the precompilation fails after rm -rf ~/.julia/compiled/v0.7
like this for me:
MAIN % ~/bin/julia-0.7.0/bin/julia main.jl
┌ Warning: The call to compilecache failed to create a usable precompiled cache file for ode_integratoren [top-level]
│ exception = Required dependency hilfsfunktionen [top-level] failed to load from a cache file.
└ @ Base loading.jl:963
┌ Warning: Module ode_integratoren with build ID 2140014571188290 is missing from the cache.
│ This may mean ode_integratoren [top-level] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:941
Reading Input :
Please note that with the old beta 2 (so without precompilation default) after rm -rf ~/.julia/compiled/v0.7
:
MAIN % ~/bin/julia-0.7.0-beta2/bin/julia main.jl
Reading Input :
Now, the surprise ! If you put all files in one single directory and modify them accordingly like this
ALL_IN_ONE % cat main.jl
push!(LOAD_PATH, "./")
using ode_integratoren,crtbp_modul,Printf
jacobic=readinput()
ALL_IN_ONE % cat crtbp_modul.jl
module crtbp_modul
export readinput
push!(LOAD_PATH, "./")
using ode_integratoren,hilfsfunktionen,Printf,
DelimitedFiles
function readinput()
print("Reading Input : ")
jacobic=parse(Float64,readline())
return jacobic
end
end
ALL_IN_ONE % cat ode_integratoren.jl
module ode_integratoren
push!(LOAD_PATH, "./")
using StaticArrays,LinearAlgebra,hilfsfunktionen
end
ALL_IN_ONE % cat hilfsfunktionen.jl
module hilfsfunktionen
using LinearAlgebra
export interpolation
function interpolation(xdata,ydata,x)
return xdata
end
end
the precompilation starts working:
ALL_IN_ONE % ~/bin/julia-0.7.0/bin/julia main.jl
Reading Input :
I still believe this is a bug of some kind, although my use of julias facilities might be a bit non-standard !