-
Notifications
You must be signed in to change notification settings - Fork 74
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
WIP: Include support for cross-platform deps.jl #130
base: master
Are you sure you want to change the base?
Conversation
@rened, could you restore the old behavior if the package name isn't provided? No need to break things. |
Also the |
Sure, I'll include the default behavior for install. |
This should also avoid using I really don't think mixed-platform |
I'll try to make is as uninvasive as possible. I believe having the ability to work on your own machine (with your favorite OS / distribution), and then quickly summon some machines from a cluster (oder simply other random machines in the lab) would be really neat to have. Let's see whether there is a simple and robust way to do it. |
I think that's a pretty essential requirement. |
function include_deps(pkg::String) | ||
depsfile = joinpath(Pkg.dir(pkg),"deps/deps.jl") | ||
if isfile(depsfile) | ||
include_string(readall(depsfile)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just include(depsfile)
?
While I'm sympathetic to the goal, this doesn't sound like the right level to support this. It doesn't make much sense to have Looks like we need to rethink the system more seriously. I'm not familiar with the parallel code, but in the present case it seems that the library path (or equivalently the contents of |
Given two machines
Mac
andLinux
with the respective OSes, the following currently does not work:addproc({"Linux"})
on theMac
using HDF5
The problem is that the auto-generated
deps.jl
file, which is included byHDF5/src/plain.jl
on PID1
, has the path to the dynamic library hard-coded, and every worker sees exactly that string, not the one which corresponds to the worker's machine.(HDF5 is just used as an example here, and any OS/package-manager mismatch where workers have their libraries at different paths would fail as well)
This PR includes 2 changes:
deps.jl
cannot load the hard-coded path, it looks for the local installation of the package and uses itsdeps.jl
include_deps(pkgname)
which can be used by HDF5 to load its library (see update for cross platform bindeps JuliaIO/HDF5.jl#221), which make sure to use the localdeps.jl
Only drawback I found so far is that existing
build.jl
scripts need to be updated to include the package name when calling@BinDeps.install
- any ideas how to get around this?